All You Need To Know About the Robots.txt File

January 1st, 2009   •   6 Comments   

There is lots of bad information out there regarding SEO, and internet marketing.

Whether you are a savvy internet marketer or a rookie I am confident that you have heard of the robots.txt file.

You have probably heard myths, conflicting information, and advice on how to use to use it.

The robots.txt file was designed to inform bots how to behave on your site. What information they can get and what information they can’t. It’s a simple text file that is very easy to create, once you understand the proper format.

An important point to remember is to create your robots.txt file in Notepad or another text editor. DO NOT, under any circumstances, create your robots.txt file in an HTML Editor like DreamWeaver, GoLive or FrontPage. FTP clients usually convert the file into Unix, but there are occasions when it will fail. Do not take the chance, create it in Notepad instead.

User-agent
The User-agent line specifies the robot.
For example: User-agent: googlebot
You may also use the wildcard character ‘*’ to specify all robots. For example: User-agent: * You can find user agent names in your own logs by checking for requests to robots.txt. Most major search engines have names for their spiders.
Here is a partial list:

Googlebot MSN Robot Yahoo! Slurp (recently renamed) Google AdSense Robot Noxtrumbot Xenu Link Sleuth

The second part of a robots.txt file consists of Disallow: directive lines. Just because the Disallow statement is there, doesn’t mean that the bot(s) are completely disallowed on the site. These lines can specify files and/or directories. For example, if you want to instruct spiders to not download private.htm, you would enter: Disallow: private.htm

You can also specify directories: Disallow: /cgi-bin/ This will block spiders from your cgi-bin directory.
Common Questions about the Robots.txt File

Q: Why should I use it when I can use the meta-robots tag instead.
A: First of all, the meta-robots tag is not compliant to the needs of search engines.   All the major engines and most of the minor engines look for the robots.txt and do their best to obey it. This is not true with the meta-robots tag. Also, if you use the meta-robots tag, don’t use the “index,follow” parameter. That is what a search bot does by default. You don’t need to be told to do that and neither do the bots.

Q: Where do I place the robots.txt file?
A: The file should be placed in the root directory of your server. In other words, in the same place as your index.html file for your home page.

Q: What are some things that I would want to exclude from the robots?
A: Here are a few examples: * Any folder that is “off limits” to public eye that you have not (for whatever reason) password protected. * Print Friendly versions of pages (to avoid the duplicate content filter) * Images – to protect them and to avoid spidering problems * CGI-BIN (programming code) * Review your weblogs and find spiders that you don’t want to come to your site and deny them.

Q: I exclude bots from indexing my site in the robots.txt file, but they come and crawl anyway. What am I doing wrong?
A: Make sure you validate your robots.txt file. I prefer the one from Search Engine World. Another option would be that you have encountered an “evil” bot that wants to harvest either your content, or your email addresses for spam. “Evil Bots” are not going to obey the robots.txt file on purpose. Instead, you will need to use your HTAccess file (Apache Server) to do this.

Conclusion Creating your robots.txt file is not complicated and will take less than seven minutes if you follow these steps:
1. Copy and paste the robots.txt file from our blog to Notepad

2. FTP to your web server and write down the folders you want to exclude

3. Modify the Disallow lines in the robots.txt to reflect the folders you targeted

4. Save the file

5. Upload to your server

6. Validate the file

7. If you need to make changes, do so and then repeat steps 4-6 In about two weeks, you will begin to see improve spidering, a greater depth of indexing and maybe even a rise in your rankings.

Share this article

6 Responses

  1. Whether you “approve” of it or not is irrelevant. Do you approve of divorce? The Bible doesn’t, but it’s legal. Do you approve of premarital sex? Most people don’t care anymore, but it was a grievous sin for hundreds of years.We disagree on all kinds of moral issues, but we rarely exclude people from important forms of civic life because we disagree with them. Adulterers can marry and remarry all they want. Polygamists can join the army, along with some convicted criminals. But gays are excluded an incredibly important rite of passage in American culture because others think their private love lives are “immoral?” It doesn’t make sen

  2. Enjoyed reading

    the report – most informative thanks

  3. nice share, good article, very usefull for me…thanks

  4. this is no time to give amnesty; 3% of our pupulation are illegals, that means 3% added to the number of people seeking jobs, while the job growth is still slow, i recommend a halt to legal immigration and just declare open season on the borders, thats a cheap fix, then maybe once we have growth can we start legal immigration back up; and we need diversity, no more hispanics…i live in los angeles and most employers are now hispanic and only hire their own kind…..on top of that, a friend of mine, half white half asian applied for a job at a mcdonalds whos manager was mexican, and he got his identity stolen. I have no doubts some of these hispanic employers are stealing peoples identities…we need more diversity; we are turning into mexico

  5. OMG, if you wanna go where drama belongs. Check this. When Tila Tequila entered middle school, she developed a “tomboy” attitude and got into a lot of fights. She eventually was sent to a boarding school for 6 months before transferring schools again. In high school, Tila started using her sister’s identification cards to get into nightclubs and bars where she began drug abuse and joined a gang. I kind of feel bad for the girl, but she does love the attention, let me tell you. It is no surprise that she is stuck in a sex tape controversey.

  6. Antone Crays says:

    Hah! You want to talk about controversy? Tila Tequila was born in Singapore. Her family quickly emigrated to a few places then eventually ended up moving to a small town in Texas. The fact that she is ending up with a sex tape is no surprise to me. That girl is crazy, but you gotta love her. She keeps the attention coming.

Leave a Reply