Difference between revisions of "Robots.txt file"

From Joomla! Documentation

m (Hutchy68 moved page Robots.txt to Robots.txt file without leaving a redirect: moving to prevent problems with actual robot text, no redirect)
(→‎Joomla in a subdomain: Subdirectory, not subdomain.)
Line 8: Line 8:
 
The robots.txt file must reside in the root of the domain and must be named "robots.txt".
 
The robots.txt file must reside in the root of the domain and must be named "robots.txt".
  
===Joomla in a subdomain===
+
===Joomla in a subdirectory===
 
A robots.txt file located in a subdirectory isn't valid, as bots only check for this file in the root of the domain.
 
A robots.txt file located in a subdirectory isn't valid, as bots only check for this file in the root of the domain.
If the Joomla site is installed within a folder such as at e.g. www.example.com/joomla/ the robots.txt file MUST be moved to the site root at e.g. www.example.com/robots.txt .
+
If the Joomla site is installed within a folder such as at e.g. <code>example.com/joomla/</code> the robots.txt file MUST be moved to the site root at e.g. <code>example.com/robots.txt</code>.
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/
+
Note: The joomla folder name MUST be prefixed to the disallowed path, e.g. the Disallow rule for the <code>/administrator/</code> folder MUST be changed to read <code>Disallow: /joomla/administrator/</code>
  
 
==Joomla robots.txt contents==
 
==Joomla robots.txt contents==

Revision as of 18:20, 14 March 2013

Copyedit.png
This Article Needs Your Help

This article is tagged because it NEEDS REVIEW. You can help the Joomla! Documentation Wiki by contributing to it.
More pages that need help similar to this one are here. NOTE-If you feel the need is satistified, please remove this notice.


Web Robots (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 agent names. 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 my robots.txt file?[edit]

A standard robots.txt its included in your joomla root. The robots.txt file must reside in the root of the domain and must be named "robots.txt".

Joomla in a subdirectory[edit]

A robots.txt file located in a subdirectory isn't valid, as bots only check for this file in the root of the domain. If the Joomla site is installed within a folder such as at e.g. example.com/joomla/ the robots.txt file MUST be moved to the site root at e.g. 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[edit]

This is the contents of a standard Joomla robots.txt

User-agent: *
Disallow: /administrator/
Disallow: /cache/
Disallow: /cli/
Disallow: /components/
Disallow: /images/
Disallow: /includes/
Disallow: /installation/
Disallow: /language/
Disallow: /libraries/
Disallow: /logs/
Disallow: /media/
Disallow: /modules/
Disallow: /plugins/
Disallow: /templates/
Disallow: /tmp/

Robot Exclusion[edit]

You can exclude directories or block robots from your site adding Disallow rule to the robots.txt

Infos:

Syntax checking[edit]

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

Infos[edit]

For additional infos please read:

Joomla! Documentation[edit]

How to: Robots.txt and Joomla[edit]

General informations[edit]

Tools for Webmasters[edit]