Celeb Glow
news | March 03, 2026

Why Is .html File In Root Directory Not Rendering In Browser? Shows Index Of/

Hello I just have a simple .html file in the root directory of my site:

enter image description here

But when I visit that site in the browser,

it's showing me index of/ and I have to click on test.html in order to display the page properly:

enter image description here

(and then after clicking on test.html)

enter image description here

Any idea why it's showing the test.html file first and then I have to click on it in order to get the page to display properly?

This is the only file in the directory.

Thanks.

1

2 Answers

You either need to change test.html to index.html or put the following code in your .htaccess file:

DirectoryIndex test.html

Works Perfectly fine on my Chrome Browser.

Have you tried clearing the cache and then retrying? I've had a similar issue because of the browser cache.

Hope this helps.

1

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

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