How to make your site invisible to Google

…because why would you want anyone to go to your website, right?

<disclaimer: if you think I misuse some piece of
terminology 
or am just plain wrong, you still don’t
get the right to punch me
 in the jaw or anything.  >

The Problem
The Solution
tl;dnr

Imagine that you spent years slinging webcode in the good old-fashioned way.  And you saw that it was good. When Perl-CGI gave way to PHP, ColdFusion and .ASP you saw that it was really good.

Then came Cascading Style Sheets and with them the Bad Times.  HTML tables became anathema, used only by troglodytes.  While CSS allowed wonderful things, no two browsers would display anything the same, frequently with hilariously disastrous results.

Then came HTML5 and the advent of (cue roll of thunder) the Semantic Web.  You sweat and strain, finding that the adoption of the Miracles was spotty and again no two browsers support the ‘standard’ the same way. Eventually you decide that HTML 4.7 validated to an XHTML doctype would just have to be good enough.  Fine, so be it. Let Time pass.

tl;dnr
Then comes AJAX, soon followed by jQuery and such, and the nature of the Web is Fundamentally Transformed into something dynamic and alive like you’ve never seen.

You’re no longer making Web Pages, you’re programming distributed client-server applications with object-oriented, event-driven architectures… oh my god oh my gOD!  I need a tissue…

You use this new goodness not just in database-centric Applications, but also in your general Website methodology.  jQuery ueber alles, no more tables but for moments of weakness.  Every element is loaded via javascripted AJAX events – gone are primitive HREFs. Interfaces are sweetly responsive and you see that it is in fact now Far the Fuck Out.

Then it occurs to you to think about things like ads, search engines, SEO and all that stuff.  So you run your site through some “SEO browsers” and Google’s cache.  Wow. Nothing.  They all see the images in the page header and absolutely nothing else.  It would be simple enough to load those via AJAX as well and go completely dark, but why bother.

tl;dnr

HOW TO FIX THIS

Easily enough done.

Add a div that uses “position:absolute; display:none;” and put an “<a href=…” in it for every page that you want to be seen by search engines. Note that this almost certainly does NOT mean dumping a simple file-list of every .html or .php or whatever on your system.  With a little thought and a little work you should be able to automate this.  I mean, Drupal and shit do that for you automagically, so you know it ain’t no big-deal trickyity trick.  Just don’t forget to do it!


Make sure to include old-fashioned hrefs in an invisible div that is always always always there.

Nothing good ever happened to the Invisible Man.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s