How to get rid of the "index of/" page?

TheCompWiz

Well-known member
Registered
Joined
Apr 20, 2016
Messages
130
Points
18
Do you use "park the domain" or just create a new account on a new hosting?
When I enter my domain for the first time, which is yet under construction, a "index of/" page with all the files shows up.
What can I do to get rid of the "index of/" page??
Thanks in advance.
 

LJSHost

Well-known member
Hosting Provider
Registered
Joined
Jul 5, 2016
Messages
1,031
Points
63
Just create a blank index.html. Your domain will just display a blank page instead of a directory listing.
Other solutions can fix this, but this is a simple quick fix.
 

HostPace

Active member
Registered
Joined
Apr 15, 2016
Messages
65
Points
8
Do you use "park the domain" or just create a new account on a new hosting?
When I enter my domain for the first time, which is yet under construction, a "index of/" page with all the files shows up.
What can I do to get rid of the "index of/" page??
Thanks in advance.
It is called directory listing, you can disable it from panel i.e following:

To disable directory listing / browsing from cPanel, follow these steps:

1) Login to your cPanel
2) Click on File Manager
3) Open "public_html" folder and create a .htaccess [You can also create it inside to any other directory.]
4) Include any of the following as per the requirements:

Options -Indexes [To prevent all the directory and files.]
IndexIgnore * [The '*' represents a wildcard, this means it will not display any files.]
IndexIgnore *.zip [To prevent all files that end with '.zip' extension.]
IndexIgnore *.zip *.jpg *.gif [To prevent all files that end with '.zip', '.jpg], '.gif' extension.]

5) Click the Save Changes button to save your changes.

Check out our knowledge-base for more info..
 

KevinHV

Member
Registered
Joined
Sep 8, 2016
Messages
57
Points
8
Contact your hosting provider and ask him to disable directory index server wide. With directory index enable its very easy to see all your files and download them with single click.
 

UWH-David

Member
Registered
Joined
Jan 18, 2016
Messages
45
Points
8
You didn't specify if this is website/account wide or not. Easiest way is to to set your .htaccess to contain the following:

Code:
Options -Indexes
Combo this with a 404 page line in there:

Code:
ErrorDocument 404 /404.html
 

TheCompWiz

Well-known member
Registered
Joined
Apr 20, 2016
Messages
130
Points
18
Thanks you guys, I could get rid of the "index of/" page by adding a index.html file into public_html as LJSHost suggested. It's that simplest way that I can apply on my hosting.
 

uniwebhosting

Member
Registered
Joined
Nov 30, 2014
Messages
55
Points
8
The Index Manager allows you to customize the way a directory will be viewed on the web. You can select between a default style, no indexes, or two types of indexing. If you do not wish for people to be able to see the files in your directory, choose No Indexing”.

Open cPanel/Indexes and check public_html , and select No Indexing

;)
 
Older Threads
Replies
0
Views
2,972
Replies
7
Views
3,726
Replies
6
Views
3,198
Latest Threads
Replies
1
Views
15
Replies
0
Views
170
Replies
1
Views
36
Replies
2
Views
80
Recommended Threads
Replies
4
Views
3,330
Replies
3
Views
3,277
Replies
2
Views
2,559
Replies
4
Views
2,797

Latest postsNew threads

Latest Hosting OffersNew Reviews

Sponsors

Tag Cloud

You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an alternative browser.

Top