Avoid duplicate content in WordPress blog

January 19, 2009 · Print This Article

Duplicate content is often a problem with WordPress blog, and as you probably know it, it can hurt your blog SEO.

Here is a small code to insert on your header.php file, to get rid of duplicate content in your WordPress blog.

Simply paste theses line between the <head> and </head> tags in your header.php file.

<?php if((is_home() && ($paged < 2 )) || is_single() || is_page() || is_category()){
echo '<meta name="robots" content="index,follow" />';
} else {
echo '<meta name="robots" content="noindex,follow" />';
}

By using WordPress conditionnal tags, this code ensure that your homepage, posts, pages and category pages are indexed by search engines spiders, but prevent all other pages (feeds, archives, etc) from being indexed and create involuntary duplicate content.


Your choice for site templates and wordpress themes

Comments

One Response to “Avoid duplicate content in WordPress blog”

  1. Posts about SEO as of January 19, 2009 | The Lessnau Lounge on January 19th, 2009 11:24 pm

    […] will be on mobile SEO and development, but also briefly cover SMS and mobile email strategies Avoid duplicate content in WordPress blog – livexp.net 01/19/2009 Duplicate content is often a problem with WordPress blog, and as you […]

Got something to say?

You must be logged in to post a comment.