Magento URL Key: The Comprehensive Guide
Overview of Magento URL Key
A Magento URL key is a unique part of each product or category’s web address, helping make store URLs simple, clear, and easy for search engines and customers to understand. Magento creates these URL keys automatically, depending on product or category names, but store admins can customize them to be even more descriptive and helpful for SEO. This setup makes it easier for search engines to find pages, leading to better rankings and an improved user experience.
Key Benefits of Magento URL Key
- Improved SEO – URL keys make it easier for search engines to index pages, contributing to higher search engine rankings and more organic traffic.
- Better user experience – Clean, simple URLs are easier for customers to follow, helping them navigate your site smoothly and improving overall usability.
- Customization – Admins can customize URL keys to create descriptive and memorable links, which can help in managing large catalogs or complex product lines.
How to Manage URL Keys in Magento 2
To manage URL keys in Magento, you can access the Search Engine Optimization (SEO) section for each product or category:
1. Navigate to Catalog > Products in the admin panel and select the product you want to edit.
2. In the SEO section, enter your custom URL in the URL Key field. Avoid spaces and special characters to keep it clean.
3. Go to Catalog > Categories and choose the category you want to modify.
4. Update the URL Key field to reflect your preferred URL.
How to Regenerate Category URL Rewrites in Magento 2
When making changes in category URL keys, Magento 2 can automatically create new URL rewrites. However, in some cases, you may need to regenerate category URL rewrites manually to prevent broken links or outdated URLs.
1. Go to System > Cache Management and select Flush Magento Cache to make sure that any URL changes are visible on the frontend.
2. Navigate to System > Index Management and choose Catalog URL Rewrites from the list and click Reindex Data. This process updates URL rewrites for all products and categories.
3. Go to Catalog > Categories and open the category where you’ve updated the URL key, checking that Create Permanent Redirect for Old URL field is enabled in the SEO section. This setting automatically redirects users and search engines to the new URL.
4. Navigate to Marketing > SEO & Search > URL Rewrites and look for your category’s new URL rewrite. If there’s no rewrite or if the URL isn’t updating, you can create one manually by clicking Add URL Rewrite
5. Select Category as the Create URL Rewrite type, choose the category, and enter the new URL key.
But, if you make frequent URL changes or manage complex catalogs regenerate category URL rewrites manually is not a feasible option. With extensions like Amasty’s SEO URL Rewrite you can easily handle URL updates, resolve conflicts, and ensure all URLs stay optimized for SEO with minimal manual work.
Login and Registration Form