Sign up ×
Webmasters Stack Exchange is a question and answer site for pro webmasters. It's 100% free, no registration required.

How to make redirect /index.html -> / in Apache?

Redirect /index.html

Is causeing infinite loop when opening home page.

share|improve this question
You might want to check out this question on stackoverflow… –  Anagio Nov 25 '12 at 18:12
Here the whole about the one you looking for… –  Rajesh Magar Nov 26 '12 at 11:43

3 Answers 3

It is most likely causing an infinite loop as they are the same. The default pages in Apache are index.html and index.htm.

If the browser does not request a file name the web server will return one of those files if it finds them. So When you go to you are actually viewing just without /index.html

share|improve this answer

Just do it the other way round, instead of redirecting to the domain, tell the server which page to display when a user requests the domain directly.

In the .htaccess file you can write (this is the default anyway):

DirectoryIndex index.html

Now if somebody requests the server will actually send back the index.html file, but the browser still displays If somebody requests there is no reason not to deliver this page, as long as you do not link to this URL somewhere, nobody will ever request it in this form.

share|improve this answer

From an SEO perspective, if and are the same, use canonical links to address it.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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