Home Wordpress How To How To Blocking Your WordPress Categories and Archives From Google

How To Blocking Your WordPress Categories and Archives From Google

1
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.

1 COMMENT

LEAVE A REPLY

Please enter your comment!
Please enter your name here

 

Exit mobile version