Fix WordPress duplicate content issue – Use Canonical URL in WordPress

Avoiding Duplicate Content is the primary uphill task for all webmasters and site owners.

If your site has lot of Duplicate content then there is every chance of getting penalized by Search Engines.

Back in 2009 all Major Search Engines like Google, Yahoo and MS Live came together to work against Duplicate Content which is getting indexed on the web & they have announced support for a new HTML tag, the <link> tag.

How to enable WordPress Canonical URLs - Duplicate Content issue fix

How to Enable Canonical URL’s in WordPress :

At times WordPress website has identical or vastly similar content that’s accessible through multiple URLs, using Canonical Link Element here can help you redirect all the URL’s to Authoritative one.

There are lot of Plugins which can help you in Enabling Canonical URL’s in WordPress, but I don’t think you need a plugin for this simple task.This can be done at the Theme Level by modifying header.php.

  • Open the file header.php (wp-content/themes/<Current_Theme>) for editing using your favorite Text editor.
  • Add the below line’s of code before </head> tag in Header.php file.

<?php if ( is_singular() ) { ?>
<link rel=”canonical” href=”<?php the_permalink(); ?>” />
<?php } ?>

  • Save the file and upload it to your server.

From Now canonical URL element will be added to <head> section of all the posts & pages of your WordPress blog.

Looking to Learn How to Manage,Maintain & tweak WordPress then you are in the right place.Navigate through this Link for  Excellent List of WordPress Tutorials.

Hope this Simple tip can help you in Fixing Duplicate content issue on your WordPress website. Please Let us know if you have any questions /Suggestions using the comment section below.

  • Spot on with this write-up, I honestly think this
    website needs much more attention. I’ll probably be back again to
    read more, thanks for the info!