views:

126

answers:

4

For styling purposes i want to insert some dummy text on the page, but it shouldn't be getting linked to the actual content. Is there a way to block it for search engines, or do i have to use good old images for that?

Or would it be possible to load it dynamically via javascript? because i heard that google will read certain amounth of javascript.

+1  A: 

Can you show the content in a borderless iframe, and block the iframe's src (a completely separate "page") from the search engines?

Alternatively, add the content with javascript, storing the javascript in a .js file that you block from the engines?

lance
A: 

I'd guess that loading in the content after the page has finished loading (when the document.ready event fires, for example) would be a fairly safe way to do what you're talking about. Not 100% sure about this, though.

inkedmn
+1  A: 

If you load that text via AJAX it probably won't be indexed - last time I checked, GoogleBot doesn't actually execute JS (nor do the other spiders (but some spambots apparently can and do)).

Caveat: the AJAX response should probably contain a X-Robots-Tag: noindex header, in case its URL is actually linked somewhere.

Piskvor
A: 

I'd be extremely careful with whatever trick you decide on. Odds are just as likely google will think you're trying to display different content to the user than to it.

I've always believed that Google actually works by rendering the page (possibly using some server-side version of the Chrome rendering engine) and then reads the result back with OCR software to confirm that the text in the source matches what the user would see with JS and frames enabled. Google has always openly warned webmasters not to try serving robots different content to the users, OCR would be the perfect way to find out (especially if your 'verifier' used IE's user-agent string and crawled from IP ranges not registered by Google).

Short answer then, serve the decoration as either:

  • an iframe
  • an object
  • an SVG image

Since your clearly linking the document into your page google will proably consider it a seperate resource and rate things accordingly, especially if the same text appears on every page. Which brings me to:

Are you going to use the same text decor on all/most pages? If so Google will almost certainly treat it as "window dressing" and ignore it (it apparently does this with menus and such).

SpliFF
Google certainly doesn't use OCR to read the page. That's absurd.
Antony Carthy
It isn't absurd at all. Google has some of the most powerful datacenters in the world. If anyone can render and scan millions of HTML documents per second - they can. Not to mention they probably have OCR systems for Google Books and GMails' spam filters which could be adapted to this purpose. Google have always claimed they penalise sites for trying to feed different page content to browsers than they do to search engines. Rendering the page and doing a comparison seems a perfectly reasonable way of detecting this. If it isn't being done now it's likely just a matter of time.
SpliFF
Rendering images of web pages is absurd!
fuzzy lollipop
@fuzzy lollipop: Absurd, yet possible; another step in the Red Queen race.
Piskvor