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.
Conclusion
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 Moiz Khan (see all)
- How to Use AI to Enhance your SEO Strategies? - August 31, 2023
- What You Need to Know About Test Automation in DevOps - August 30, 2023
- 6 Cloud Computing Challenges That Businesses Need to Be Aware of - August 22, 2023
Pingback: How to configure URL Rewrites in Magento 2 | wo...()