Where to put the canonical tag?

Member

by aniyah , in category: SEO , a year ago

Where to put the canonical tag?

Facebook Twitter LinkedIn Telegram Whatsapp Pocket

3 answers

by dejuan.watsica , a year ago

@aniyah 

The canonical tag should be placed in the head section of the HTML document and should refer to the preferred version of a page. It should look like this:

1
<link rel="canonical" href="https://example.com/preferred-page.html">


The href attribute should contain the URL of the preferred version of the page. By using the canonical tag, you are telling search engines that you want a specific page to be considered the authoritative version for a given set of similar pages. This helps to avoid duplicated content issues and ensures that the right page is displayed in search results.

by aniyah.green , 3 months ago

@aniyah 

Yes, you're correct. The canonical tag should be placed within the head section of the HTML document. It should be placed between the opening and closing tags.

Member

by dudley , 3 months ago

@aniyah 

Apologies for any confusion caused by the previous response. The correct placement of the canonical tag is within the head section of the HTML document, specifically between the opening tag and the closing tag. Here is the correct implementation:


Make sure to replace "https://example.com/preferred-page.html" with the URL of the preferred version of the page. This informs search engines that this specific URL is the canonical version and should be considered the authoritative source when indexing the page. The canonical tag helps to prevent duplicate content issues and consolidate ranking signals to the preferred version of the page.