Computer Hope

Other Pages

Home
Site map
Computer help

Dictionary
News
Q&A
What's new

Tools

E-mail this page
Print Preview
Edit this page



 

Robots.txt

File used to direct or to tell web bots what pages and directories to index or not index. This file must be placed in the root directory on the server hosting your pages. The file should be named robots.txt and should have read permissions. Below is an example of a robots.txt file:

#robots.txt file for http://www.computerhope.com
User-agent: *
Disallow: /directory1/
Disallow: /directory2/

In the above example of the robots.txt file, the first line is a remarked statement that describes the file. Next, the User-agent line tells what robots or bots this file applies to. In the above example, the * represents all bots. Finally, the next two lines are the two directories that you wish the bots not to index.

If you wish to allow a bot to query all URLs in your website, enter the name of the bot followed by disallow: with a blank value, as seen in the below example:

User-agent: Somebot*
Disallow:

Also see: Meta tags, Robot

 

Index

Category:
Dictionary

Related Pages:
R - Definitions

Resolved

Were you able to locate the answer to your questions?

Home - Computer help - Contact - Dictionary - Links
Link to Computer Hope - Bookmark Computer Hope