
Most of the time, you want your posts to be indexed by search engines as such as Google as soon as possible. But if for some reason, you don’t want a particular post to be indexed by search engines, just read on!

Most of the time, you want your posts to be indexed by search engines as such as Google as soon as possible. But if for some reason, you don’t want a particular post to be indexed by search engines, just read on!
To achieve, first get the ID of the post you'd like to be not indexed by search engines. In this exemple, I assume your post id is 17.
Open your header.php file and paste the following code between the <head> and </head> tags:
<?php if ($post->ID == 17) {
echo '<meta name="robots" content="noindex">';
}
That's all. Pretty useful if you don't want some infos to be accessible from search engines!
Note that it is possible to do something better by using custom fields. If you're interested about this second method, just leave a comment and I'll write a recipe!
4 Responses
Hello
good article. i would be interested in the custom filed method too
Hey. already google it on Smashing magazine. Here is the link http://wp.smashingmagazine.com/2009/05/13/10-custom-fields-hacks-for-wordpress/
Good article,thanks for posting.
How do I confirm that the Google is not crawling the article which I do not want to index. I guess through source code of this article but is there any other idea where I can test like on webmaster or any google product.
Thank you
In my early days of learning WordPress, I found myself coming to your site on several (countless) occasions. These days, it always makes me smile to stumble upon another one of your links.
So, thank you once again!
Trackbacks: