Post Pic

How to: hide portions of text to Google on your WordPress blog

I already shown you how to easily prevent Search Engine indexing on a certain post or page. But how to only hide a portion of text to Google, your navigation menu for example? Just read on to get started.

Hiding a portion of text to Google is damn easy, but not everyone is aware of this method. Simply use the following html comments in your source files (or in WordPress editor, in html mode) to hide a specific sentence or text to Google robots.

This text will be indexed by Google...
<!--googleoff: all--> ...but not that one! <!--googleon: all>

That's all. These tags tells Google that the text embeded within them should not be indexed. Of course, you can use it on your theme files, posts and non-WordPress websites/webpages.

Apart from that, I recently purchased a new blog, which is called PsdVibe. If you're interrested in Photoshop tutorials (mostly for designing websites/WordPress blogs) don't hesitate to add PsdVibe's feed to your rss reader!

Related Posts

Related Posts

No related posts.

21 Responses

Jun 03 2009 10:13

Great tutorial…!
i need your little help about showing word count of the post.
if word count is more than 160 than it shows that post length is 2 and if it is more than 250 than it shows that post length is 3.
how can i do this
can you write a tutorial on it ?
this post length must be shown at the bottom of every post :)

Thanks

Jun 03 2009 13:05

This code is working like a robot.txt

Jun 03 2009 13:34

The Google “googleoff: all / googleon: all” tags only work on sites that use the Google search appliance. As far as I know it doesn’t work for the regular Google bots. It would make cloaking just to easy.

Jun 03 2009 13:46

@Lenen: Never heard of it, though regarding to what you said you are probably right. I’ll do some research about it.
Thanks for letting me know!

Jun 03 2009 14:34

@Jean-Baptiste Jung, this is the documentation I found:

Searchappliance documentation

Jun 03 2009 16:55

lenen is right, these tags are interpreted by the google search appliance, not the googlebot web crawler.

http://code.google.com/apis/searchappliance/documentation/50/admin_crawl/Preparing.html

Jun 03 2009 18:22

Great tutorial man. Never thought before.

Jun 03 2009 22:13

I wish there were a tag like this for the regular google bot, too. It would be sooo helpful!

Jun 04 2009 10:50

it would be great if someone answer the question asked by me in 1st comment :)
Thanks

Jun 04 2009 13:41

@SMS: This post is a good start for what you’re attempting to do :)

Jun 04 2009 21:14

Great tip and useful in the same time.

Jun 05 2009 07:31

This won’t trigger any problem in terms of indexing and search engine rankings? This is a nice piece of a code but I am afraid this one will be exploited by the others?

Jun 06 2009 15:45

That’s pretty neat. I’ve never would have guessed that wordpress could embed it’s own sort of robots file. Thanks.

Jun 07 2009 06:34

Its completely match with robot.txt and i think its not a good trick, its a black
hat seo technique..

Jun 07 2009 07:17

@Seo83: Black hat, something created/released by Google?

Jun 08 2009 07:42

Isn’t this like the best seo trick on earth?

Jun 08 2009 16:39

Awesome trick Jung. I was looking for it for months. I simply couldn’t find any hack or method that could allow you to hide simple text from google. Thank you very much! Bookmarked :)

Jun 09 2009 18:30

This is awesome. Thank you very much for this. I have never seen this before so i really appreciate you sharing this trick.

I should be able to use this soon. :)

Jun 12 2009 04:47

Great info…. thanks…

Jul 21 2009 01:24

Whoa, I’ve totally never heard of this before, and I’ve listened to alot of Matt Cutt’s lectures, hehe.

Till then,

Jean

Trackbacks:

Leave a Comment

* Name, Email, Comment are Required