Robots.txt file

From Joomla! Documentation

Web robots, also known as crawlers, web wanderers or spiders, are programs that traverse the Web automatically. Among many uses, search engines use them to index the Web content.

Robots.txt implements the REP (Robots Exclusion Protocol), which allows the Web site administrator to define what parts of the site are off-limits to specific robot user agents. Web administrators can Allow access to their Web content and Disallow access to cgi, private and temporary directories, for example, if they do not want pages in those areas indexed.

Where to Place the robots.txt File

A standard robots.txt file is included in your Joomla root. The robots.txt file must reside in the root of the domain or subdomain and must be named robots.txt.

Joomla in a Subdirectory

A robots.txt file located in a subdirectory isn't valid. The bots only check for this file in the root of the domain. If the Joomla site is installed within a folder such as example.com/joomla/, the robots.txt file must be moved to the site root at example.com/robots.txt.

Note: The Joomla folder name must be prefixed to the disallowed path, e.g. the Disallow rule for the /administrator/ folder must be changed to read Disallow: /joomla/administrator/

Joomla robots.txt Contents

This is the contents of a standard Joomla robots.txt:

User-agent: *
Disallow: /administrator/
Disallow: /bin/
Disallow: /cache/
Disallow: /cli/
Disallow: /components/
Disallow: /includes/
Disallow: /installation/
Disallow: /language/
Disallow: /layouts/
Disallow: /libraries/
Disallow: /logs/
Disallow: /modules/
Disallow: /plugins/
Disallow: /tmp/

Robot Exclusion

You can exclude directories or block robots from your site by adding a Disallow rule to the robots.txt file. For example, to prevent any robots from visiting the /tmp directory, add this rule:

Disallow: /tmp/

See also:

Syntax Checking

For syntax checking you can use a validator for robots.txt files. Try one of these:

See Also

For additional information please read:

Joomla! Documentation

How to: Robots.txt and Joomla

General Information

Tools for Webmasters