Google intermittently fails to download CSS and JS from CloudFront CDN

by Ivan Nikitin   Last Updated July 04, 2018 10:04 AM

We noticed a lot of "Mobile Usability" errors in the Search Console. When I clicked on them and chose "Check live version" option - it always said the page was mobile friendly. However, the mobile usability errors didn't go away from the search console.

We continued testing and once or twice we got a "Page loading issues" error on top of the "Mobile Friendly Test" and the page was rendered with text content and images but CSS wasn't loaded.

It turns out Google Bot from time to time fails to download CSS from CloudFront distribution. This causes "Mobile Usability" errors in the Search Console and potentially search penalty.

We have a static website hosted on S3/CloudFront. CSS and HTML documents are on the same distribution. We have HTTP/2 enabled and I expect CSS to be served via the same connection as HTML. However, it doesn't happen from time to time and CSS fail to download. Errors happen rarely but yet they affect our website rankings.

CSS and JS are NOT in robots.txt

We have NO Geolocation restrictions.

Viewer protocol policy is set to Redirect HTTP to HTTPS.

Links to CSS are relative and look like that: https://www.visualwatermark.com/css/all-24c79a5ab7f0103302353199ecf9f1cf.css

The CloudFront distribution in question is https://www.visualwatermark.com/

Do you have any ideas what can be changed to ensure Google Bot always able to download CSS from CloudFront CDN?



Related Questions


Help - Google doesn't crawl CDN files

Updated March 28, 2015 06:01 AM



SEO - make amazon cloudfront images crawlable

Updated April 22, 2015 21:01 PM