Welcome to WebmasterWorld Guest from 3.93.75.242

Forum Moderators: Robert Charlton & goodroi

Will Folder Permissions Affect Google's Ability to Index Pages?

     
11:17 pm on Apr 16, 2019 (gmt 0)

New User

joined:Feb 22, 2019
posts: 15
votes: 1


Hello,

I have a website for my small company, and I recently discovered that if a visitor
typed in the address bar a URL that referred to a folder - not a file - such as the following:

www.mycompany.com/foldername/

they will see a listing of all the files in the folder.

I don't want visitors to be able to view the contents of folders. So I asked the webmaster
of the hosting company to prevent this. He told me he changed the permissions of the folders
so that visitors who type the URL of a folder will now see a message stating they cannot view the folder's contents.

This is what I wanted. But a question came to mind - If the permission settings prevent visitors
from viewing the contents of folders, will this interfere with Google indexing the pages in the folders
on a routine basis? I didn't think it would, since I know visitors can access all the pages of the site
by clicking links on site's pages.

So I'm hoping for your thoughts on the question: If the permissions of folders prevent visitors
from viewing a folder's contents, will Google have trouble indexing the files in the folders.

Thank you.
7:49 am on Apr 17, 2019 (gmt 0)

Senior Member from GB 

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month

joined:Sept 7, 2006
posts: 1137
votes: 140


It depends on which permissions are given (or denied), and how this is done.

If chmod (on a Linux server) has been used to deny read permission on a folder (not on its contents), it will prevent listing without preventing file access (it will have no effect on Google indexing) - see [linux.org ]. There is probably a Windows server equivalent, but I don't know what it is.

If permission has been denied in some other way (e.g. using .htaccess) it may well affect Google's ability to index files.

A simpler solution would be to put an index file (e.g. index.htm) in the folder, as www.mycompany.com/foldername/ will then always return www.mycompany.com/foldername/index.htm. Although it is called index.htm, it doesn't have to contain anything, let alone an actual index.

However, if Google indexes the files, then anyone can see what they are using site:mycompany.com in Google search. This raises the question of why you woukd want to prevent listing them in one way but allow it in another. Why not just put files you don't want anyone to access in their own folder(s), and set permissions for the folder(s) in .htaccess?
8:51 am on Apr 17, 2019 (gmt 0)

New User

joined:Feb 22, 2019
posts: 15
votes: 1


Thank you for your answer. I will check with the webmaster and see what method was used to deny permissions.

BTW, I would like to mark this "Best Answer", or up vote it, but there aren't any buttons for doing this.
I asked about this once before and was told it was an automated process and since I'm a new member
it may take time for the up-vote button/icon to show up. In any case, thanks again!
9:44 am on Apr 17, 2019 (gmt 0)

Administrator

WebmasterWorld Administrator phranque is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month

joined:Aug 10, 2004
posts:11873
votes: 245


assuming this is an apache server, you should look at the Options Directive:
https://httpd.apache.org/docs/current/mod/core.html#options

it appears you have the following specified somewhere in your configuration directives:
Options +Indexes
you should be using using Options -Indexes which you can specify in .htaccess.
9:55 am on Apr 17, 2019 (gmt 0)

New User

joined:Feb 22, 2019
posts: 15
votes: 1


Thank you. I will see if the webmaster used .htaccess.