Skip to main content
3 of 3
edit to add some info after comments
Max
  • 6.2k
  • 17
  • 40

Google have very recently updated their guidelines to officially state that you should not block access to CSS or JS files in robots.txt. This ensures that when Google crawls the site, it can render it exactly as a browser would.

If you block CSS or JS files, it could harm how well your website performs in the rankings.

More info here: Updating our technical Webmaster Guidelines and here: Webmaster Guidelines

As this is a recent recommendation, many websites and CMS's (such as Joomla) will often have such files blocked in robots.txt. The reasoning behind this was usually that search engines did not need to crawl or index these files, so to stop unnecessary files and directories from getting indexed and to save 'crawl budget', these would often be blocked in robots.txt.

Max
  • 6.2k
  • 17
  • 40