Dec
13

Configuring Your Theme’s Meta Tags to Avoid Duplicate Content Penalization with Search Engines

By Wordpress Guru

To give your WordPress driven site the best possible chances of reaching top page rank, it’s important to avoid duplicate content from being indexed by Google and the other search engines.

Most WordPress themes list either the excerpt or the full content of posts on index pages, this includes category index pages. What this does is display the same content on more than one page.

One way to avoid this is to provide ‘nofollow’ and ‘noindex’ instructions to the search engines on all pages that are not home and not full content pages. This can best be done with the help of conditional tags.

In the following example the home page, single post pages and WordPress ‘Pages’ will tell the search engines to index and archive, while all other pages will tell them NOT to:

<?php if (is_home() || is_page() || is_single()) {?><meta name="robots" content="index,follow,archive" /><meta name="googlebot" content="archive" /><?php } else { ?><meta name="robots" content="noindex,nofollow,noarchive" /><meta name="googlebot" content="noarchive" /><?php } ?>
Make sure this goes within the <head> section of the header.php file of your theme. As long as it is placed before </head> it will work as it should.

Feel free to experiment with the conditional tags to include/exclude other page types.




Related Posts:
Categories : Wordpress Tips

Leave a Reply