How to Hide From Robots
By Stephen Bucaro
A "robot" is a program that search engines use to follow links, read web pages, and
create indexes of the information they find on the web pages. Also referred to as a
"spider" or "crawler", many people think a robot travels around the web. A robot travels
the web the same way your browser surfs the web, never leaving the machine it is running on.
There are several reasons why you might want to prevent robots from indexing your web page.
1.You may store administrative information on your web host for backup purposes.
2.You can password protect files without getting involved with the servers authentication mechanisms.
3.You can prevent users from running scripts arbitrarily.
4.You can reduce the bandwidth consumption of your web site.
One way to exclude robots is to place a text file named robots.txt at the root of your
web site. In the file, list the robots that you want to exclude, and the files or
folders that you want to exclude.
Since it is difficult to know the identities of the robots, you probably want to exclude
all robots. The first line of your robots.txt file should be:
User-Agent: *
Below that list the files or folders that you want to exclude. Below is an example of the
contents of a robots.txt file that excludes all robots from a folder named "backup" and a
folder named "cgi-bin".
User-Agent: *
Disallow: /backup/
Disallow: /cgi-bin/
If you need to exclude many files on a file-by-file basis, you may find a robots.txt file
too difficult to maintain. In that case, you may prefer to use meta tag exclusion. A meta
tag is an html tag that you place in the HEAD section of your web page. Below is a meta
tag that instructs robots to not index the web page.
<meta name="robots" content="noindex">
If you want robots to index the page, but not to follow links on the page, us the meta tag shown below.
<meta name="robots" content="nofollow">
The meta tag shown below instructs robots to not index and not follow links on the page.
<meta name="robots" content="noindex, no follow">
The methods described above allow you control how robots index your web site. Preventing
robots from indexing a web page hides it from visitors to your web site. This assumes
that you have configured your web site to not allow visitors to "list" the files on your
web site. Of course even without the ability to list, a visitor can still access a file
if they can guess the name of the file.
More Web Design Coding Issues: • Web Design Troubleshooting Guide • Video - HTTP caching • Syndicate your own content Using aspSyndicator • RSS Basics • How To Effortlessly Use Streaming Audio • Creating a Secure Website Using Secure Socket Layer (SSL) • Don't Let doors.txt Take Control of Your Email Server • Basic Dynamic Website Security • Seven Effective Ways to Build Your Own Web Site • Seven WordPress Security Tips
|