Canonical Issue

Started by nancyisabell, 07-23-2015, 01:08:54

Previous topic - Next topic

nancyisabellTopic starter

Hello,
I need to know about canonical I am confused where put canonical whole pages or only one page? www or without www and htttp or https where putting canonical tags?


supergolfer

#1
The canonical tag is used to indicate the preferred version of a web page when there are multiple versions available. It helps search engines understand which version to index and display in search results.

You can place the canonical tag either on individual pages or across the entire website. If you have multiple versions of the same page (e.g., with and without "www" or with "http" and "https"), you will need to use the canonical tag to specify the preferred version for search engines.

If you decide to use the canonical tag on individual pages, you should place it in the head section of each HTML page. If you want to set a canonical for the entire website, you can place it in the header section of your website's template so that it applies to all pages.

For example, if you want to specify the preferred version of a page as "https://www.example.com/page", you would place the following canonical tag in the head section of that page:

<link rel="canonical" href="https://www.example.com/page" />


It's important to ensure that the canonical tag is used correctly to avoid any potential issues with duplicate content and to help search engines understand your preferred URL structure.


What is the Canonical Issue?

A canonical issue arises when 301 redirects are not properly in place. This means that your website can be accessed by search engines from several different URLs. This means that search engines can then potentially index your site under different URLs, meaning that it will look like a site of duplicated content.

For example if you have the website http://www.example.com then the index page can be accessed from all of the following URLs:

http://www.example.com
http://www.example.com/index.html
http://example.com
http://example.com/index.html

How to Resolve the Canonical Issue?
The best and most effective way to resolve the canonical issue is with a permanent 301 redirect. This can be implemented in a number of ways, as detailed below. Depending on what server your website is hosted on will determine the method which you use to implement a redirect.

In addition to this it is worth also logging into Google Webmaster Tools and set-up two profiles for your domain; one with the www. prefix and one without. Then go to Site "Configuration> Settings> Preferred Domain" and choose which domain you would like Google to use.

How to implement a 301 redirect with a .htaccess file?
If you have your website hosted on any of the below server types then you will be able to use a .htaccess file:

Linux
Apache
Zeus
Sun Java
These are the most common hosting servers and are also the easiest to implement a permanent 301 redirect. Simply copy the code into your existing .htaccess file if you can one or open a blank notepad document and save it as .htaccess