Home » Our Blog » Want To Keep Moving Up In Rank? Don’t Block CSS and JavaScript
November 22, 2015

Want To Keep Moving Up In Rank? Don’t Block CSS and JavaScript

Recently, webmasters received emails from Google alerting them to the fact that Google could not access some of their files, namely those that were CSS and JavaScript.  Anytime Google sends an alert like this SEO’s feel the hairs on the back of their necks prickle because let’s face it – it’s Google and its crawlers that matter.  Here’s the breakdown on what you need to know about the warning and its ramifications so that your website ranking isn’t affected.

HTML, CSS, and JavaScript

Any time you enter text in a document, it is saved as HTML – with special codes embedded that designate font, where you used bold and italics, font size, and formatting.  Web pages do this, too.  You see: HTML is a series of tags that tell a computer how to display text.  But where you to look at the source you would see: <b>HTML is a series of tags that tell a computer how to display text.</b>  The code doesn’t show up in the text but is behind the scenes, telling the program exactly how to display it.

When creating web pages, there are two other languages used: CSS and JavaScript.  These are the two that are making waves in the SEO community.

CSS (Cascading Style Sheets) are used to set how many columns a page displays, the specifics of text like bold and italics.  CSS is all about how a page looks.  Some SEO choose to hand select and code pages, selecting where to use what.  Web editors, however, automatically separate information (content) into HTML and appearance into CSS.

HTML and CSS are display related languages.  They are, essentially, very simple creating a causal relationship of, “If this code, then this display.”  One could think of them as static rules that hold the same no matter what the environment.  But what about when you want something that isn’t so black and white?  What about when you need something conditional or responsive?

This is where JavaScript comes in.  JavaScript is used to perform operations that are conditional.  Whether it’s a survey or a sign up – most things on web pages go far beyond text and appearance.

Three languages, three different purposes.  And now Google cares.  Why?

Traditionally SEO have blocked Google from crawling these codes for different reasons, ranging from the most innocuous to the less.  We’ll get into that a little more below.  Let’s look at two reasons why Google’s bots want to get into your CSS and JavaScript.

Google Has To Say One Step Ahead

We’ll always find ways to break the rules.  We bring a big bag to the movies to sneak in our own reasonably priced candy. Or we stay within 7 MPH of the posted speed limit we won’t get nailed for speeding.

This rule bending is found everywhere, including in code.  We all know not to break the 3% keyword density rule, but what if we could hide this somewhere else?  Plenty of SEO discovered they could hide it in CSS and JavaScript, stuffing to their hearts’ content, and then block the bots.  Google has discovered this and that is one of the reasons they want in now.

Above The Fold: Not Just A Newspaper Term

Because code like CSS and JavaScript control the appearance of a page, Google uses its bots to determine just where on a page context is in relation to ads.  Ad-riddled sites that are more about promoting things like goods and services over content rank lower.  But what if a webmaster could code to have lots of content and just place it after all the ads?  Webmasters can – and do!  But when Google is able to get into a page’s CSS and JavaScript to crawl it will find out whether the page is content or and heavy above the fold and rank accordingly.

The philosophy here is simple: if sites don’t have anything to hide, they’ll let the bots crawl.  Blocking Google bots from CSS and JavaScript perusal?  That sends a signal that the site is using CSS and JavaScript for things like keyword and link stuffing, format manipulation to have bogus content and lots of ads, or any other trick people have discovered to get around Google.

The Web, and How It’s Viewed, Is Changing

Three years ago the numbers proved a trend was coming. Nearly 80% of Americans accessed the web primarily from smartphones. Fewer than 70% used laptops.  This only increases with the addition of tablets and other handheld devices.

But remember the early days of doing this?  And how awful it was?  Websites weren’t made for mobile devices.  Enter websites optimized to know how they’re being access and display differently depending on the type of device.*

Google ranks using a variety of factors and allowing the bots to crawl JavaScript means allowing Google to see that your site is web-friendly.  This can get you a higher rating and allows Google to tag it as such for when people are searching on their mobile devices.

What Next?

It’s time to jump into your site’s robot.txt file or talk to your SEO and webmaster to make sure that you unblock your CSS and JavaScript now.  It’s pretty easy to unblock CSS and JavaScript for most sites and you can find some other information about it here.

What If I Keep CSS and JavaScript Blocked?

Let’s face it: in the word of SEO Google reigns supreme. If Google says, “Hey, let us crawl these files,” it’s a good idea to just let Google crawl those files.  We all want good results when we search. The best way to guarantee that is to play by the rules. The newest rule is let the bots crawl your CSS and JavaScript.


*Give yourself ten points if you just said to yourself something that involved the term “JavaScript”.

Ready to boost your organic traffic?

Get a free SEO Audit

Complete the form to download

Don’t you wish you could pay for your morning coffee with just an email address?

Congrats on the new ebook
Thanks for downloading it.

Digital Firefly Marketing is excited about our collection of eBooks.

That’s because they are conceptualized, planned and written by us drawing from our expertise and experience. That means you get information that doesn’t just sound good, but has been used to actually help our clients.

Be sure to check out all of our eBooks and contact us if you’d like help developing your website or building your marketing strategy.

For now, pour yourself a beverage and tuck into our user-friendly eBooks to learn how you can improve your website’s visibility.

Visit Our Blog

No, Thanks. I’ll Check out Later.