Skip to content

Instantly share code, notes, and snippets.

@rafaelstz
Last active September 23, 2020 14:53
Show Gist options
  • Save rafaelstz/40ac32ffc948dd1e7949947c3deed314 to your computer and use it in GitHub Desktop.
Save rafaelstz/40ac32ffc948dd1e7949947c3deed314 to your computer and use it in GitHub Desktop.
Robots.txt Magento 2
# Allow Full Access
User-agent:*
Disallow:
# Disallow Access to All Folders
User-agent:*
Disallow: /
# Default Instructions
Disallow: /lib/
Disallow: /*.php$
Disallow: /pkginfo/
Disallow: /report/
Disallow: /var/
Disallow: /catalog/
Disallow: /customer/
Disallow: /sendfriend/
Disallow: /review/
Disallow: /*SID=
# Restrict User Account & Checkout Pages
Disallow: /checkout/
Disallow: /onestepcheckout/
Disallow: /customer/
Disallow: /customer/account/
Disallow: /customer/account/login/
# Disallow Catalog Search Pages
Disallow: /catalogsearch/
Disallow: /catalog/product_compare/
Disallow: /catalog/category/view/
Disallow: /catalog/product/view/
Disallow URL Filter Searches
Disallow: /*?dir*
Disallow: /*?dir=desc
Disallow: /*?dir=asc
Disallow: /*?limit=all
Disallow: /*?mode*
# Restrict CMS Directories
Disallow: /app/
Disallow: /bin/
Disallow: /dev/
Disallow: /lib/
Disallow: /phpserver/
Disallow: /pub/
# Disallow Duplicate Content
Disallow: /tag/
Disallow: /review/
# Allow pagination
Allow: /*?p=
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment