0

I've added a url key at section "Search Engine Optimization" for example default-category in root category "Default Category", but when i access the frontend http://www.example.com/default-category.html or http://www.example.com/default-category, it redirects me to 404 page.

do anyone know is it possible to do that?

1 Answer 1

0

If you have set a URL key for a category in Magento's "Search Engine Optimization" section and you're experiencing redirects to a 404 page when accessing the category URL, there are a few potential causes and solutions you can try:

1.Reindexing: It's possible that the URL rewrite for the category hasn't been generated or updated properly. Try reindexing the URL Rewrites. You can do this by going to "System" > "Index Management" in the Magento admin panel and clicking on the "Reindex" button next to "Catalog URL Rewrites". After the reindexing process is complete, check if the category URL works correctly.

2.Cache Clearing: Clear the cache in Magento to ensure that any cached data related to URL rewrites is cleared. You can do this by going to "System" > "Cache Management" in the admin panel, selecting all cache types, and then clicking on "Flush Magento Cache". After clearing the cache, check if the category URL redirection issue persists.

3..htaccess Configuration: Check your website's .htaccess file for any rules or configurations that might interfere with the category URL. Look for any rewrite rules that could cause redirects or conflicts. Ensure that there are no rules that specifically redirect the category URL to a 404 page. If necessary, consult with a developer or Magento expert to review your .htaccess file and make any necessary adjustments.

4.URL Rewrite Conflict: It's possible that there is a conflict with existing URL rewrites. Check if there are any conflicting URL rewrites for the same URL key. Go to "Marketing" > "SEO & Search" > "URL Rewrites" in the admin panel and search for the URL key you've set for the category. If you find multiple entries for the same URL key, delete the conflicting ones or adjust their settings accordingly.

5.Third-Party Extensions: If you have any third-party extensions related to URL management or SEO, they could be causing conflicts or interfering with the category URL. Disable any such extensions temporarily to see if the issue persists. If disabling the extensions resolves the issue, contact the extension developer for support or consider using an alternative extension.

php bin/magento indexer:reindex catalog_url_rewrite


php bin/magento cache:flush

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.