Does Google Read Your CSS Files?

Nov 11, 2005 • 8:53 am | comments (12) by twitter Google+ | Filed Under Google Search Engine Optimization
 

In the past, everyone knew that Google and the other engines, stayed away from your CSS files. However, after on October 19th, Matt Cutts posted a blog entry named SEO Mistakes: Unwise comments which showed an example of someone using CSS. Matt wrote;

I don’t recommend that people use CSS to hide text, and I don’t recommend that they document it, either.

Then Jagger update hit us, and many now believe that Google does peak at your CSS files. A DigitalPoint Forum thread asks Does google read external CSS files yet? Some reply "no" right off the bat, but I wouldn't be so quick to say no. Many respectable SEOs have been chattering about Google reading your CSS just for this. So just be careful, especially now.

Previous story: Going to WMW PubCon? Ask Matt Cutts Forum Thread Live
 

Comments:

Blair Miller

11/11/2005 04:03 pm

I don't have a DP account, so I'll post this here. First off, there are only two ways Google would be able to tell whether you are using CSS to hide information: One, they spider the page with a CSS-enabled bot, scrape the visible content and do a word count, and then spider the page a second time with CSS-disabled bot, scrape the visible content, and do another word count, and finally do a word-count-comparison. Or... They simply read the external CSS file, which would take a heck of a lot less work, processing power, bandwidth, etc. The problem with the second option is almost as great as the first. There are *many* differrent techniques that can be used to hide content, whether for good or for evil. Display: none is easy, but what about using text-indent and overflow: hidden? Or simply including an extra span, and then placing the span *over* the content? Or zeroing out the height of the element? Etc., etc., etc., and so on and so forth. And again, these techniques can be used to deliver a much more user-rich experience, or to try and trick a search-engine. Either way, I don't think Google is dumb enough to start penalizing sites based on their CSS techniques alone. More likely, they can just continue to ignore the CSS files, and concentrate instead on the content of the page. Too much hidden content is going to raise a keyword-spamming flag, since the content is still there on the page. Pages that don't raise such a flag may get included, only to be reported using Google's "Report a Spam Result" page. In short, though CSS *might* be used to game the search engines, it can't be used to stop a site from being penalized, excluded, etc., due to the regular spam-result detection Google is constantly working to improve.

Doki

11/12/2005 08:51 am

Is this a problem ? Just forbid Google to access your CSS files with the robot.txt :-)

Blair Miller

11/14/2005 02:07 pm

As an honest question, is there anyting in place (TOS, etc.) that prevents Google from simply changing their policy and ignoring the robots.txt file for CSS exclusions (or entirely)?

Sam Hastings

12/05/2005 11:35 am

Type in the following in Google: cache:www.samhastings.com I'm not trying to self-promote here, just to make a point. My site's presentation is controlled ONE HUNDRED PERCENT with CSS. If Google didn't look at my CSS file, you wouldn't see my homepage presented as it is. It would be a plain text page with a few images chucked in. Now would anyone, having seen this, like to say that Google doesn't look at CSS files? Sam

evan

07/12/2006 02:18 pm

I saw a few hits from Googlebot on css files when I was first setting up my site, but never since then, so if it is fetching them, it's lying about its identity. Regarding Sam's claim, the cache still contains the original links to the stylesheets on your own server, and loads the styles from there. If you delete the stylesheet from your server, the google cache will look horrible too. Google doesn't cache stylesheets.

Charles

09/10/2006 12:09 am

Can someone explain this cache? http://72.14.209.104/search?q=cache:a7K98LYwSKsJ:www.bravenet.com/

b.b. goyal barnala

10/09/2006 01:13 pm

google certainly reads css files, otherwise people will fill it with h1, h2 tags and then make it appear as normal text through css to fool the google.

Jason

01/05/2007 09:03 pm

Of course Google reads external CSS files. Matt Cutts talks about this openly when he says not to cloak content with z-index values. Most people use external CSS nowadays to style their sites and therefore from this we can work out that Google can work these tricks out from sites and therefore mark them down for such tricks. Thanks, Jason www.flexewebs.com

ThomasB

01/07/2007 04:45 pm

They do this since June: http://www.thomasbindl.com/blog/index.php?title=googlebot_fetches_external_css_file

Inder

04/27/2007 06:35 pm

why sometimes in serp results its showing cache result of my site but when i am trying it in toolbar option it's not showing any result?

John Adams

12/28/2008 10:02 am

Sam Hastings wrote: "I'm not trying to self-promote here, just to make a point. My site's presentation is controlled ONE HUNDRED PERCENT with CSS. If Google didn't look at my CSS file, you wouldn't see my homepage presented as it is. It would be a plain text page with a few images chucked in. Now would anyone, having seen this, like to say that Google doesn't look at CSS files?" All a search engine sees is plain text, Sam. It never sees those css-generated styles. Playing around with stylesheets in order to conceal text may or may not get you banned. Want to gamble? I certainly don't.

John

11/02/2013 12:04 pm

You cannot instruct Google not to look at your CSS files. You can only successfully stop it from indexing it, which it wouldn't bother doing in the first place.

blog comments powered by Disqus