How to fix canonical URL issues


What is canonical URL? Why do you need to fix canonical URL issues? Let take one URL now go to this URL the site will open and then remove www in this URL now go to this URL the same site will load. You may think this two URL are the same one so the same site will load but search engines like Google and Yahoo take it as two websites. These search engines think two websites have the same content and take it as copy content. So it should affect your site in search engines. This is the canonical URL issues and you need to fix it to save your site affecting from search engines.

Many of the website owners do not have awareness about this issue. My website also affected by this issue and later on I fixed it. When I apply for Google Adsense I came to know about this issue because Google will reject AdSense application of copy content websites. Due to this canonical URL issues, Google took my website as two website and marked it as copy content site. SEO people must know about this issue because this is an important issue that will affect websites in search engines.

Fix it using .htaccess

Now you know and got awareness about canonical URL issues. So you are ready to fix this issue but how to do? It’s very simple. You are going to re-direct nonwww URL into www URL by using .htaccess.

I believe you have basic knowledge in .htaccess and you know how to edit your .htaccess  file (Note: wrong .htaccess file will affect your website.)

Now open your .htaccess file in your editor and type this below .htaccess code,

This code will redirect non-www URL into www URL. Now save your file and check your website. Just type your URL without www like or simply and now see this non-www URL will redirect to www URL like

That’s it now your canonical URL issue solved. I hope this post will give you awareness about canonical URL issues and way to fix it. If you have any questions or feedback kindly leave it as the comment and don’t forget to share it with your friends.