I have a running store with around 600 products and wanted to remove the HTML suffix from my URLs.

I removed the HTML in the config and reindexed. All HTML pages are being redirected to the non-HTML variants.

I have read online people are putting the 301 redirects manually in their .htaccess

e.g. RewriteRule ^index.php/?(.*).html$ /$1 [R=301,L]

But is this really necessary when I don't get 404s?

Is manual .htaccess 301 redirect necessary?

Any insight appreciated


  • Is the current redirect status code 302 or 301 – danronmoon Oct 18 '19 at 18:17
  • Hello, I have "Search Engine Optimizations" -> "Create Permanent Redirect for URLs if URL Key Changed" set to yes and magento seems to automaticaly add a 301 redirect for all .html pages. But there is nothing in my .htaccess Thanks – Achleitner Oct 20 '19 at 10:52
  • it's completely unnecessary to redundantly do this in .htaccess then – danronmoon Oct 20 '19 at 15:39
  • Thanks, don't have much experience with Magento, yet. – Achleitner Oct 21 '19 at 18:21

In theory when you updated the config magento should have created the redirects in the url rewrite db table. Therefore updating htacess is unnecessary.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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