Sunday, May 23, 2010

How not to get a folder on my web host index?

One easy way is to create an index.html file. The web server will load that file instead of displaying your folder on your web server. Even if your index.html file is empty, the web server will just show that empty file instead.



Another way is to create a .htaccess file, if your web server is running the Apache web server, create an ASCII text file called %26quot;.htaccess%26quot; and place the following line in it:



Options -Indexes



How not to get a folder on my web host index?





There are two ways to do this. First create a robots.txt file in the root of your web site where you can instruct indexbots how to handle files and folders in your site - http://www.robotstxt.org/wc/exclusion-ad...



User-agent: *



Disallow: /~joe/private.html



Disallow: /~joe/foo.html



Disallow: /~joe/bar.html



Disallow: /~joesnoindexfolder/



Second is to add a %26lt;meta%26gt; tag to the page you do not want indexed - http://www.robotstxt.org/wc/meta-user.ht...



%26lt;meta name=%26quot;robots%26quot; content=%26quot;noindex,nofollow%26quot;%26gt;

No comments:

Post a Comment

Blog Archive