Redirect 301 /index.html and index is redirecting but index.html is not redirecting?

It seems that the issue might be with the exact URL of the requested page. The Redirect 301 /index.html directive only triggers if the URL of the requested page is exactly /index.html.

If you want to redirect both /index and /index.html to, you can use the following code in your .htaccess file:

RedirectMatch 301 ^/index(\.html)?$

This directive uses a regular expression to match both /index and /index.html in the requested URL and redirects them to

If the redirect for and are working but not for, it’s likely because the redirect rule is not matching the exact URL pattern /index.html. To handle this, you can add an additional Redirect directive for /index.html specifically:

Redirect 301 /index.html
Redirect 301 /index

With these two separate rules, both /index and /index.html will be redirected to


Welcome to the world of DomainRooster, where roosters (and hens) rule the roost! We're a one-stop shop for all your entrepreneurial needs, bringing together domain names and website hosting, and all the tools you need to bring your ideas to life. With our help, you'll soar to new heights and hatch great success. Think of us as your trusty sidekick, always there to lend a wing and help you navigate the sometimes-complex world of domain names and web hosting. Our team of roosters are experts in their fields and are always on hand to answer any questions and provide guidance. So why wait? Sign up today and join the ranks of the world's greatest entrepreneurs. With DomainRooster, the sky's the limit! And remember, as the saying goes, "Successful people do what unsuccessful people are not willing to do." So don't be afraid to take that leap of faith - DomainRooster is here to help you reach for the stars. Caw on!