Skip to main content

How to Add Canonical Urls to WordPress Blogs

How to Add Canonical Urls to WordPress Blogs

June 06, 2013 at 06:25PM

It is very essential to add canonical urls to every WordPress blog web page to avoid duplicate content penalties by search engines. Canonical urls represent the permalink of the page and helps search engines identify and index the page, ignoring other parameters or mistyped urls loading similar content.

Add Canonical Urls

target canonical url1. WordPress AutoInsert – The latest versions of WordPress automatically adds the canonical url to the posts and pages only, but not to archives, tags, categories etc. So while for most blogs, it takes care of all your single posts and pages, it does not fix canonical url issues for your archives and other paginated categories/tags.

2. SEO WordPress plugins –  Popular SEO WordPress plugins like All in One SEO or Yoast SEO have options to set canonical urls on all your blog pages and is the best way to add canonical urls in on click.

canonical urls by plugins

3. Premium WordPress Theme Frameworks – Some advanced theme frameworks like Thesis and Genesis have SEO options which allow auto setting of canonical urls, without use of above SEO plugins. However, they are paid WordPress themes, and most WordPress themes might not have options to set canonical urls automatically.

4. Manual Code Addition – If for some reason you wish to add canonical urls to all your single posts and pages manually, you can add the following code in the HEAD tags of your HTML code by editing header.php

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

Similarly if you want to add code manually to any page, you can simply add the canonical url on the page in the HEAD tags. For example, we have a problem using SEO plugins because we host WordPress in an alternative directory and the SEO plugins cannot create the correct url for the front page. So we directly add our main front page canonical url through a separate index.php file.

Original article: How to Add Canonical Urls to WordPress Blogs

©2013 QuickOnlineTips (QOT). All Rights Reserved.

Hostgator Hosting

from Quick Online Tips


Popular posts from this blog

Ten Apps you Must Download when you Buy A New Android Smartphone

Ten Apps you Must Download when you Buy A New Android Smartphone

May 14, 2013 at 11:21PM You have spent loads of time researching which is the best Android smartphone that fits your budget, spoken to people in the know about gadgets and have saved accordingly. After contemplating a fair bit if this is the right time to pick a device and there is no other device you would rather have, you take a plunge into the astonishing world of Android and pick that shiny new Android device. Right now it is sitting proudly in your hands as you admire every curve, every pixel, visible or not of your new Android smartphone.It is the time to load your Android smartphone, to make it truly yours, a device that would be with you through your thick and thin. Time to install those applications which will complete your world, if not complete, at least make your world a lot more organized and a lot more fun. So which apps do you start off with?Like the famous Nokia commercial goes, you have our back. Here …

How to Password Protect & Encrypt Files [Mac/Windows]

How to Password Protect & Encrypt Files [Mac/Windows]

May 16, 2013 at 06:33PM Nowadays, the computer has a very important place in everybody’s life, as a personal gadget used for a lot of different things. Everything is digital and it is stored on a computer’s hard-disk or on a cloud system, offering you easier access to your favorite data.Computers have become the place where you hold pictures, documents, favorite music and everything else in the same place. While storing may include regular data, random and even useless information, people may also keep important stuff, such as wedding photos, work documents, projects and others.Have you ever thought about protecting critical data with a password? Taking into consideration that all information could be vulnerable to hackers or to unauthorized persons, this is a rather obvious procedure. Another reason to encrypt data can appear in case somebody else also uses that computer and you don’t want them to have access to private pict…

Who Needs To Pirate Software With A Free Software List Like This!

Who Needs To Pirate Software With A Free Software List Like This!

May 03, 2013 at 05:30AM I found this interesting list at this random forum on Internet and I found it worth sharing. It is indeed a huge list of free available software that you can use instead of buying or pirating the expensive ones. The list goes as following:3D Graphics:3Delight Free –
Anim8or –
Aqsis –
Blender –
Houdini (Free Edition) –
Now3D –
OpenFX –
POV-Ray –
Terragen –
Toxic –
Wings 3D – –
AntiVir –
Avast – http://www.…