We all know that duplicate content can be a proble... " />

Blocking Your WordPress Categories and Archives From Google

May 6, 2008 · Print This Article

We all know that duplicate content can be a problem. People copy your work, re-post it on their website, then you both are penalized for duplicate content! Unfortunately, there isn’t much that can be done about that, but did you know that often blogs have duplicate content within their own blog? The biggest culprit for duplicate internal content is your archives page, which is usually used for categories and monthly archives. Unless you only display partial posts in your archives, you’ll want to make sure Google doesn’t index it. If you aren’t handy with Robots.txt, you can instead use this code to easily tell Google not to index your archive.php page.

<?php if(is_archive()){ ?><meta name="robots" content="noindex"><?php } ?>

You’ll want to grab that code and paste it anywhere in the header of your theme above the closing of the head tag. That way, Google will not index these, and search engines won’t refer traffic to your archive pages instead of your single post pages.


Your choice for site templates and wordpress themes

Comments

Got something to say?

You must be logged in to post a comment.