Skip to content

Instantly share code, notes, and snippets.

@ottonet
Created October 6, 2015 12:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ottonet/40e3947f06d3ecfb0f7e to your computer and use it in GitHub Desktop.
Save ottonet/40e3947f06d3ecfb0f7e to your computer and use it in GitHub Desktop.
Multistore autogenerated robots.txt for Magento
location /robots.txt { return 200 "### Autogenerated robots.txt\n
# Sitemap
Sitemap: http://$http_host/sitemap.xml
# Basic Crawler setup. We allow for everything
User-agent: *
Allow: /
Crawl-delay: 10
# Then we start disallowing stuff
# Directories
Disallow: /404/
Disallow: /app/
Disallow: /cgi-bin/
Disallow: /downloader/
Disallow: /errors/
Disallow: /includes/
Disallow: /magento/
Disallow: /pkginfo/
Disallow: /report/
Disallow: /scripts/
Disallow: /shell/
Disallow: /stats/
Disallow: /var/
# Paths (clean URLs)
Disallow: /index.php/
Disallow: /catalog/product_compare/
Disallow: /catalog/category/view/
Disallow: /catalog/product/view/
Disallow: /catalogsearch/
Disallow: /control/
Disallow: /contacts/
Disallow: /customer/
Disallow: /customize/
Disallow: /newsletter/
Disallow: /poll/
Disallow: /sendfriend/
Disallow: /tag/
Disallow: /wishlist/
Disallow: /catalog/product/gallery/
# Files
Disallow: /cron.php
Disallow: /cron.sh
Disallow: /error_log
Disallow: /install.php
Disallow: /LICENSE.html
Disallow: /LICENSE.txt
Disallow: /LICENSE_AFL.txt
Disallow: /STATUS.txt
# Paths (no clean URLs)
Disallow: /*.php
Disallow: /*?SID=
";
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment