Search This Blog

Wednesday, June 08, 2011

Prevent Duplicate Content in Wordpress Self Host

For wordpress self host (not free blog on wordpress.com), you can prevent duplicate content by keeping certain information out of the search engines spiders.

Open your robots.tx file and type code below:

User-agent: *
Disallow: /search
Disallow: /feed/
Disallow: /comments/feed/
Disallow: /xmlrpc
Disallow: /?p=
Disallow: /wp-
Disallow: /tag/
Disallow: /category/


You can also adding noindex, nofollow meta tags on header.php


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


License/Copyright: Creative Commons Attribution - Non Commercial - No Derivative Works 3.0 Unported

Popular Posts