Skip to content

Instantly share code, notes, and snippets.

@keithmorris
Forked from chuckreynolds/robots.txt
Created November 10, 2012 18:10
Show Gist options
  • Save keithmorris/4051985 to your computer and use it in GitHub Desktop.
Save keithmorris/4051985 to your computer and use it in GitHub Desktop.
Hardened robots.txt for wordpress installs
# Robots Rule! - Sometimes... #
User-agent: *
Allow: /
# Disallow these directories, url types & file-types
Disallow: /cgi-bin
Disallow: /wp-admin/
Disallow: /wp-includes/
Disallow: /wp-content/
Disallow: /search/*/feed
Disallow: /search/*/*
Disallow: /readme.html
Disallow: /license.txt
Disallow: /*?*
Disallow: /*?
Disallow: /*.php$
Disallow: /*.js$
Disallow: /*.inc$
Disallow: /*.css$
Disallow: /*.gz$
Disallow: /*.wmv$
Disallow: /*.cgi$
Disallow: /*.xhtml$
Allow: /wp-content/uploads/
Allow: /*?page=*
User-agent: Mediapartners-Google
Allow: /
User-agent: Adsbot-Google
Allow: /
User-agent: Googlebot-Image
Allow: /
User-agent: Googlebot-Mobile
Allow: /
User-agent: ia_archiver*
Disallow: /
User-agent: duggmirror
Disallow: /
Sitemap: http://domain.com/sitemap.xml
@thegulshankumar
Copy link

Hello,

Update: Please don't block CSS and JS as it will create an issue in bypassing Google Mobile friendly Test. Here is updated one written by me.

References

  1. https://yoast.com/dont-block-css-and-js-files/
  2. https://moz.com/blog/why-all-seos-should-unblock-js-css

Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment