Directory Showing

Hello, after i publish My Website it says congradulation your site is published. but it doesn’t load my page it loads infintyfree congradulation page again and again. In that page it opens from htdocs and i delete it from there and publish the web again but now it sais “Directory listing” and shows the htdocs folder contains. So what should i do to Solve this problem

I saw your reply (You need a file called index.php or index.html which has your main page. Called the file anything else means it will not be recognized as the main file of the folder )
but i do not understand, Could you please help me by steps because i am not a programmer and i tried to understand what did you mean but i didnt, Please Help
Thank You

i dont want to show them directory list simply directly the website

Website URL, please?

Let’s just say that the naming convention of index was accepted by most people years ago as “the first thing a computer should look at”.

Which means, if there was no index.html, index.php, index.aspx, or anything that is called index, the computer is simply confused, and giving feedback as directory listing.

To prevent this, there are two easy ways:

  • create an index.html by yourself, or
  • implementing this one liner Option -Indexes to your .htaccess file.

But I would like to suggest you to do the first point. It’s like mandatory file for websites.

Hosting takes index just because of

DirectoryIndex index.php index.html index2.html

in .htaccess. Anyone is able to change indexes to their websites.

Also not every hosting shows the directory listing, it depends on configuration and engine.

Option -Indexes returns will return 403 Forbidden for any folder that has no index and being requested.

We should make sure that atharva11 uploaded the files at least, not sure about what problem this user facing.

Simple: you need to have a file which is called index.html. The file needs to be called exactly that. If it’s called home.html, InDeX.html or index-123.html, it will not be recognized as the main page of the folder.

I checked your account and you have a file called index (2).html. If you want it to be loaded as the main page, you need to rename it to index.html.