Deny Access To Folder On A Website

In the days of the Google Panda Algorithm there are times when we want to stop Google bot or for that matter all bots indexing content from within a particular folder. The following command below also stops users viewing files within the folder and listing the contents of the folder on the website.  First we need to create a file within notepad or your favorite HTML editor. Call it .htaccess.

.htaccess

Then within the file add the following lines of text .

ust htaccess to block access to folder

The simply save that /htaccess file to the folder on your website that you do not want to index. Take a look at the earlier article on how to remove pages from googles index.
To test simply try and go to the folder to view the contents or to be 100% sure that google cannot browse that folder do a google fetch from within webmaster tools.

Tags: htaccess

Allen White

Allen is a Consultant for ITPS in the North East of England and holds the following accreditations. MCSA, MCSE, MCTS, MCITP, CCA, CCSP, VCP 4,5 and HP ASE, AIS - Network Infrastructure.

Leave a comment

Categories

Vote!

What Web Browser Do You Use?

View Results

Loading ... Loading ...

Vote!

What do you prefer..VMware or Hyper-V?

View Results

Loading ... Loading ...