Googlebot cannot access CSS and JS files

Need help with the Administration of your Joomla! 3.x site? This is the spot for you.

Moderator: General Support Moderators

Forum rules
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
Forum Post Assistant - If you are serious about wanting help, you will use this tool to help you post.
Windows Defender SmartScreen Issues <-- please read this if using Windows 10.
User avatar
DaveOzric
Joomla! Ace
Joomla! Ace
Posts: 1591
Joined: Sat May 22, 2010 10:29 pm
Contact:

Re: Googlebot cannot access CSS and JS files

Post by DaveOzric » Tue Jul 28, 2015 6:45 pm

That's the fun part. Google blocks themselves and says we need to fix it. How in the heck do you allow a resource on their server via my robots.txt file?

User avatar
VThomas
Joomla! Intern
Joomla! Intern
Posts: 75
Joined: Tue Oct 23, 2007 2:49 pm

Re: Googlebot cannot access CSS and JS files

Post by VThomas » Tue Jul 28, 2015 6:53 pm

I may have removed one too many folders, but had some css in the cache, so this is the list I have for J2.5 site and google is happy today. :
User-agent: *
Disallow: /administrator/
Disallow: /cli/
Disallow: /components/
Disallow: /includes/
Disallow: /installation/
Disallow: /language/
Disallow: /logs/
Disallow: /tmp/

Right now (weeks later), I don't recall why I removed modules and plugins folder. Should have taken better notes...
Last edited by VThomas on Tue Jul 28, 2015 7:15 pm, edited 1 time in total.
An old dog can learn new tricks - I saw it on Mythbusters!

User avatar
DaveOzric
Joomla! Ace
Joomla! Ace
Posts: 1591
Joined: Sat May 22, 2010 10:29 pm
Contact:

Re: Googlebot cannot access CSS and JS files

Post by DaveOzric » Tue Jul 28, 2015 6:58 pm

Yep, just need some clarification on what impact this will have on search results. Component folder is a must for the disallow but the modules & plugins folder????

Anyone?

User avatar
trogladyte
Joomla! Guru
Joomla! Guru
Posts: 583
Joined: Sat May 03, 2008 9:27 pm
Location: Phoenix, AZ
Contact:

Re: Googlebot cannot access CSS and JS files

Post by trogladyte » Tue Jul 28, 2015 7:22 pm

Won't help them blocking their own resources, but just read this reply on a Google groups forum that may help everyone.
I have the same problem! I have been advised to add to my robot txt file:

Allow: *.css
Allow: *.js

Hope it works.
Hmmm, sounded brilliant, but didn't work for me.
Ian Shere - Phoenix Website Design & Hosting
http://www.citruskiwi.com
Certified Flight Instructor http://www.flygoodyear.com

User avatar
billedwin
Joomla! Fledgling
Joomla! Fledgling
Posts: 1
Joined: Thu May 13, 2010 8:15 pm
Contact:

Re: Googlebot cannot access CSS and JS files

Post by billedwin » Tue Jul 28, 2015 8:47 pm

I believe google want access to the media folder.

This is the new Joomla 3.5.3
As you can see the media folder does not appear on the new robots.txt file

User-agent: *
Disallow: /administrator/
Disallow: /bin/
Disallow: /cache/
Disallow: /cli/
Disallow: /components/
Disallow: /includes/
Disallow: /installation/
Disallow: /language/
Disallow: /layouts/
Disallow: /libraries/
Disallow: /logs/
Disallow: /modules/
Disallow: /plugins/
Disallow: /tmp/

HunterWillis
Joomla! Apprentice
Joomla! Apprentice
Posts: 9
Joined: Sat Mar 21, 2015 11:00 pm

Re: Googlebot cannot access CSS and JS files

Post by HunterWillis » Tue Jul 28, 2015 9:32 pm

Nothing new in the article but Search Engine Land reported on it: http://searchengineland.com/google-sear ... css-226227.

So this happened today and SEL reported on it today. That means that Mashable will report on it... Friday?

This article actually has some useful info:

http://www.thesempost.com/new-google-se ... -js-files/
Last edited by HunterWillis on Tue Jul 28, 2015 9:59 pm, edited 1 time in total.

HunterWillis
Joomla! Apprentice
Joomla! Apprentice
Posts: 9
Joined: Sat Mar 21, 2015 11:00 pm

Re: Googlebot cannot access CSS and JS files

Post by HunterWillis » Tue Jul 28, 2015 9:42 pm

Try this and see if it works for you:

#Googlebot
User-agent: Googlebot
Allow: *.css
Allow: *.js

# global
User-agent: *
Disallow: /administrator/
Disallow: /includes/
Disallow: /[ANY OTHER DIRECTORY YOU SEE FIT]

Wildcat1
Joomla! Fledgling
Joomla! Fledgling
Posts: 1
Joined: Wed Jul 13, 2011 2:02 am

Re: Googlebot cannot access CSS and JS files

Post by Wildcat1 » Wed Jul 29, 2015 1:45 am

HunterWillis wrote:Try this and see if it works for you:

#Googlebot
User-agent: Googlebot
Allow: *.css
Allow: *.js

# global
User-agent: *
Disallow: /administrator/
Disallow: /includes/
Disallow: /[ANY OTHER DIRECTORY YOU SEE FIT]
Thanks HunterWillis this worked for me. Now the only pages Google is complaining that it can't access are it's own maps pages haha, :eek:

genegun
Joomla! Intern
Joomla! Intern
Posts: 51
Joined: Sat Oct 01, 2011 1:55 pm

Re: Googlebot cannot access CSS and JS files

Post by genegun » Wed Jul 29, 2015 4:33 am

Not a specialist but would that work?

Code: Select all

User-agent: Googlebot
Allow: /plugins/ *.css
Allow: /plugins/*.js
Allow: /modules/ *.css
Allow: /modules/*.js

chrispapa
Joomla! Intern
Joomla! Intern
Posts: 72
Joined: Fri Feb 09, 2007 4:38 pm

Re: Googlebot cannot access CSS and JS files

Post by chrispapa » Wed Jul 29, 2015 4:41 am

This is definitely a part of Panda. This is an issue I noticed but thought little of as there seemed to be no decline in rankings on mobile since all of our client sites are responsive. I was reviewing the rendering and noted that it was text only on our Joomla clients. Now I know why - the JS and CSS isn't being indexed.

I also noticed I haven't had a full crawl on a Joomla site recently and it has been nauseating.

Does this mean that Joomla (and WP) needs to move the JS and CSS files to a root directory like /public_html/css and js?
President/Owner of First Page Media
http://www.firstpagemedia.com | 888-732-2215

chrispapa
Joomla! Intern
Joomla! Intern
Posts: 72
Joined: Fri Feb 09, 2007 4:38 pm

Re: Googlebot cannot access CSS and JS files

Post by chrispapa » Wed Jul 29, 2015 4:45 am

One temporary workaround would be this fun addendum ...

User-agent: *
Disallow: /administrator/
Disallow: /bin/
Disallow: /cache/
Disallow: /cli/
Disallow: /components/
Disallow: /includes/
Disallow: /installation/
Disallow: /language/
Disallow: /layouts/
Disallow: /libraries/
Disallow: /logs/
Disallow: /media/
Disallow: /modules/
Disallow: /plugins/
Disallow: /templates/
Disallow: /tmp/
Disallow: /media/jui/
Allow: /media/jui/css
Allow: /media/jui/js
President/Owner of First Page Media
http://www.firstpagemedia.com | 888-732-2215

cyberrider
Joomla! Fledgling
Joomla! Fledgling
Posts: 2
Joined: Wed Sep 18, 2013 8:19 pm

Re: Googlebot cannot access CSS and JS files

Post by cyberrider » Wed Jul 29, 2015 7:58 am

This video https://www.[youtube].com/watch?v=6Io2tH-guRI recommends:

#Googlebot
User-agent: Googlebot
Allow: *.css
Allow: *.js

genegun
Joomla! Intern
Joomla! Intern
Posts: 51
Joined: Sat Oct 01, 2011 1:55 pm

Re: Googlebot cannot access CSS and JS files

Post by genegun » Wed Jul 29, 2015 8:02 am

cyberrider wrote:This video https://www.[[youtube]].com/watch?v=6Io2tH-guRI recommends:

#Googlebot
User-agent: Googlebot
Allow: *.css
Allow: *.js

but it this going to overrride the
Disallow: /modules/
Disallow: /plugins/
?

cyberrider
Joomla! Fledgling
Joomla! Fledgling
Posts: 2
Joined: Wed Sep 18, 2013 8:19 pm

Re: Googlebot cannot access CSS and JS files

Post by cyberrider » Wed Jul 29, 2015 8:33 am

genegun wrote: but it this going to overrride the
Disallow: /modules/
Disallow: /plugins/
?
Yes, but just for Googlebot and just for .js and .css files

User avatar
grafixpro
Joomla! Apprentice
Joomla! Apprentice
Posts: 44
Joined: Mon Feb 27, 2006 9:50 pm

Re: Googlebot cannot access CSS and JS files

Post by grafixpro » Wed Jul 29, 2015 1:08 pm

I have implemented the changes that cyberrider suggested and got a "complete" status so that seemed to help.
I searched first, I swear I did...

J3.9+ / PHP Version 7.1 / Linux 2.6.32 / Apache/2.4.33 / MySQLi 5.6.43
/G\

Faldinio
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 112
Joined: Mon Mar 14, 2011 10:15 am
Location: UK
Contact:

Re: Googlebot cannot access CSS and JS files

Post by Faldinio » Wed Jul 29, 2015 1:47 pm

I too just added:

Code: Select all

#Googlebot
User-agent: Googlebot
Allow: *.css
Allow: *.js
And that got me from Partial to Complete status.

User avatar
ribo
Joomla! Virtuoso
Joomla! Virtuoso
Posts: 3507
Joined: Sun Jan 03, 2010 8:47 pm
Contact:

Re: Googlebot cannot access CSS and JS files

Post by ribo » Thu Jul 30, 2015 6:00 am

if we will put

Code: Select all

Allow: *.css

Allow: *.js
will this solve our issue?
chat room spontes : http://www.spontes.com

User avatar
ribo
Joomla! Virtuoso
Joomla! Virtuoso
Posts: 3507
Joined: Sun Jan 03, 2010 8:47 pm
Contact:

Re: Googlebot cannot access CSS and JS files

Post by ribo » Thu Jul 30, 2015 7:14 am

google blocks css and js in folders components, modules and plugins and as i saw this on robots.txt
cyberrider wrote: #Googlebot
User-agent: Googlebot
Allow: *.css
Allow: *.js
allow css and js in google
My question is this will impact positive or negative in search results?
chat room spontes : http://www.spontes.com

User avatar
ribo
Joomla! Virtuoso
Joomla! Virtuoso
Posts: 3507
Joined: Sun Jan 03, 2010 8:47 pm
Contact:

Re: Googlebot cannot access CSS and JS files

Post by ribo » Thu Jul 30, 2015 7:43 am

also i had this warning
Fix mobile usability issues found on http://www.zante-celebrations.gr/
To: Webmaster of
Google systems have tested 4 pages from your site and found that 50% of them have critical mobile usability errors. The errors on these 2 pages severely affect how mobile users are able to experience your website. These pages will not be seen as mobile-friendly by Google Search, and will therefore be displayed and ranked appropriately for smartphone users.
Fix this now:
1
Find problematic pages
View a report of the non-mobile-friendly pages found on your site, and the issues discovered
View a report
2
Learn about mobile-friendly design
There are a variety of techniques you can use to make your site mobile-friendly. Specifically, look for information about the issues brought up in Search Console
make your site mobile-friendly
3
Fix mobile usability issues on your site
Fix the issues preventing your site from being mobile-friendly

When i was view a report the non-mobile-friendly pages the google not see a mobile friendly some pages.
So when i allowed now css and js files in robots.txt the report of google see that pages mobile friendly.
chat room spontes : http://www.spontes.com

DebW
Joomla! Apprentice
Joomla! Apprentice
Posts: 10
Joined: Tue May 19, 2015 4:23 pm

Re: Googlebot cannot access CSS and JS files

Post by DebW » Fri Jul 31, 2015 9:14 am

My site has a file called robots.txt.dist as well as robots.txt
Do I have to add the googlebot allow commands to both files?

When I retest I'm also getting a 'partial' result and when I look to see why there are items described as 'temporarily unreachable'. DO I need to do something about these or just wait and re-test?

User avatar
ribo
Joomla! Virtuoso
Joomla! Virtuoso
Posts: 3507
Joined: Sun Jan 03, 2010 8:47 pm
Contact:

Re: Googlebot cannot access CSS and JS files

Post by ribo » Fri Jul 31, 2015 10:01 am

No need to put it in robots.txt.dist. just put what @cyberrider and @ HunterWillis said in robots.txt.
After check in google webmaster tools for blocked resources and do what it says to fix it. When you update robots.txt from GWT it takes 1-2 minutes to update it. check it
chat room spontes : http://www.spontes.com

ataman79
Joomla! Apprentice
Joomla! Apprentice
Posts: 34
Joined: Wed Oct 25, 2006 10:02 pm

Re: Googlebot cannot access CSS and JS files

Post by ataman79 » Fri Jul 31, 2015 2:37 pm

HunterWillis wrote:Try this and see if it works for you:

#Googlebot
User-agent: Googlebot
Allow: *.css
Allow: *.js

# global
User-agent: *
Disallow: /administrator/
Disallow: /includes/
Disallow: /[ANY OTHER DIRECTORY YOU SEE FIT]
This should really work.
The only scripts, css which will be blocked are external ones - for ex. like twitter js, facebook .js, so on...

User avatar
Chacapamac
Joomla! Ace
Joomla! Ace
Posts: 1088
Joined: Wed Feb 20, 2008 6:50 am
Location: Canada, Montreal
Contact:

Re: Googlebot cannot access CSS and JS files

Post by Chacapamac » Sat Aug 01, 2015 9:56 am

Code: Select all

#Googlebot
User-agent: Googlebot
Allow: *.css
Allow: *.js
Work for me on Joomla 2.5 and 3
Can God help us?
Marketing, SEO, Web development - Powered by Joomla!
http://www.grafcomm.ca/


Locked

Return to “Administration Joomla! 3.x”