0 Shares 12087 Views 1 Comments

How to configure URL Rewrites in Magento 2

Mubashir Ahmed Sep 26, 2016

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.

create permanent redirect


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.

search engine optimization

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 🙂

Mubashir Ahmed

Mubashir Ahmed

Magento Community Manager at Arpatech
Mubashir has served many clients in the domain of Web Development. He loves to work in Business Intelligence and Data-warehousing. He is engaged in latest eCommerce trends and also loves to Travel. You can follow him on Twitter @m_ahmdd or e.mail mubashir.ahmad[at]arpatech.com
Mubashir Ahmed