Received aGoogle Search console warning - "Googlebot cannot access CSS and JS"
Mine robots.txt
User-agent: *
Disallow: /_System
Disallow: /bcas-homepage-slider
Disallow: /css
Disallow: /fonts
Disallow: /images
Disallow: /js
Disallow: /Layouts
Disallow: /Medigap logos
Disallow: /POST-IMAGES
Disallow: /products
Disallow: /professional-specialities
Disallow: /_backups
Disallow: /thank-you
Disallow: /stylesheets
Disallow: /source
Disallow: /Report
Disallow: /new
How to remove this warning?
Received aGoogle Search console warning - "Googlebot cannot access CSS and JS"
Mine robots.txt
User-agent: *
Disallow: /_System
Disallow: /bcas-homepage-slider
Disallow: /css
Disallow: /fonts
Disallow: /images
Disallow: /js
Disallow: /Layouts
Disallow: /Medigap logos
Disallow: /POST-IMAGES
Disallow: /products
Disallow: /professional-specialities
Disallow: /_backups
Disallow: /thank-you
Disallow: /stylesheets
Disallow: /source
Disallow: /Report
Disallow: /new
How to remove this warning?
Share Improve this question asked Jul 29, 2015 at 5:58 Regina MarshRegina Marsh 515 bronze badges 05 Answers
Reset to default 3You need to edit your robots.txt file which is at the root directory of your site. Wherever there's a "Disallow" row, it means that you ask google bots not to crawl through those directories.
In the case of Joomla 3, this may be the simplest solution. Add it to the end of the default robots.txt file.
#Googlebot
User-agent: Googlebot
Allow: *.css
Allow: *.js
If you'd like to be a bit more specific, go with this:
User-agent: Googlebot
Allow: /plugins/ *.css
Allow: /plugins/*.js
Allow: /modules/ *.css
Allow: /modules/*.js
More on that
Just need to Delete this following from the robots.txt
Disallow: /css
Disallow: /js
Back in April 2015, I modified my robots.txt files in line with the updated robots.txt file distributed with Joomla 3.x at the time so that the following lines were removed:
Disallow: /media/
Disallow: /templates/
Google has sent out a new round of warning messages and it appears more access is needed.
The best way to see exactly what needs to be unblocked is to log in to Webmaster Tools (aka "Search Console") and go to Google Index -> Blocked Resources. This assumes Search Console is enabled for your website.
It looks like Google expects me to now unblock the following folders which contain CSS and JS resources:
Disallow: /ponents/
Disallow: /libraries/
Disallow: /modules/
Disallow: /plugins/
Your mileage may vary.
Comprehensive solution for "Googlebot Cannot Access CSS and JS Files" issue, is described here
What does the message mean?
This message is all about Google's new focus on responsive design.
Your robots.txt file is telling Google not to use some of your CSS and/or Javascript files.
Google now needs these files to test your site for mobile friendliness. Without them, your ranking will go down. We covered almost exactly the same problem back in April during Google's "Mobile Armageddon".
What is the solution?
Go to Google's Mobile-Friendly Test and check your site. Here's a screenshot of a site that's received Google's e-mail.
Thankfully, Google's tester is very informative and points out the exact issue for this particular site. It's that the robots.txt file is blocking Google from accessing the resources it needs.
You can find the exact resources that are blocked by Google by clicking on the "Show resources" link on the right-hand-side of Google's tester Compare the files there to your robots.txt to determine what needs unblocking.
How to fix the problem
The solution will depend on the CMS you use, because each platform stores CSS and Javascript files in different locations.
- Joomla solution (OSTraining.)
- Drupal solution (jimbir.ch)
- WordPress solution (petermahoney)