How to configure URL Rewrites in Magento 2
URL Rewriting is often the quickest and healthy way to improve SEO and ranking of your website. The links pointing to a URL are redirected to the new web address. This helps in making URL search engine friendly along with improved readability for humans. To begin with, you will need to enable web server Apache rewrites. It is part of initial setup of Magento 2. Magento perform automatic URL Rewrites by removing the file name that lay no value for search engine and users. The system exclude the part of URL in root page which says “index.php”. The part of URL has no value to users and even for search engine. Today, we will focus on how to setup URL rewrites and Automatic product redirects in Magento 2.
After this tutorial you will be able to configure URL Rewrites in Magento 2.x
Let’s enable URL rewrites in Magento 2.x
Enable Url rewrites
- Login in to the admin panel, on the side bar click stores
- Choose configuration.
- On left pane expand catalog and select catalog from the list
- The configuration window will open, click on Search Engine Optimization and look for Create Permanent Redirect for URLs if URL Key Changed. Set it to yes.
Automatically Redirect URl Catalog
To automatically redirect catalog URls, follow the steps given below.
- On side bar click Products and select catalog.
- The list of products will appear. Find the product from the list and open it
- Go to Search Engine Optimization and expand it.
- Make sure Create Permanent Redirect for old URL is checked.
- Set the url and remove any white spaces with hyphens and characters to make it search engine friendly . Use correct Meta Title and Description which suits the product.
After saving you will be prompted to refresh the cache. Don’t worry, just follow the links stated in the message. Congratulations your permanent redirect is now in effect. To view the records click on Marketing on left pane and select URL Rewrites under SEO and Search. The permanent redirects will be visible in the list.
You can take benefits from automatic URL Rewrites in Magento 2. I hope these steps are clearly described. Feel free to drop any suggestion or query in comments below. If you like it, please don’t forget to share it 🙂
Latest posts by Mubashir Ahmed (see all)
- Step-By-Step Guide On How To Transfer Bulk Products Between Categories In Magento - December 14, 2016
- “It’s almost like you have to tame Magento” – Interview With Magento Front-End Developer, Ben Crook - December 9, 2016
- “Magento Is A Really Complex Platform” – Interview With Magento Guru, Gabriel Guarino - December 2, 2016