How to Use Canonical Tags Correctly in Amp and Non-amp Versions of Your Pages

Canonical tags are essential for ensuring that search engines understand the primary version of your web pages. When you have both AMP (Accelerated Mobile Pages) and non-AMP versions, correctly implementing canonical tags helps prevent duplicate content issues and consolidates SEO rankings.

Understanding Canonical Tags

A canonical tag is an HTML element that specifies the preferred version of a webpage. It is added to the <head> section of your HTML and looks like this:

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

Using Canonical Tags in Non-AMP Pages

For your standard, non-AMP pages, ensure that each page includes a canonical tag pointing to itself or to the main version of the page. This helps search engines recognize which URL to index and rank.

Example:

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

Using Canonical Tags in AMP Pages

In AMP pages, the canonical tag is added within the <head> section using the <link> element. It should point to the preferred version of the page, typically the non-AMP version.

Example:

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

Best Practices for Implementing Canonical Tags

  • Always set the canonical URL to the main version of the page.
  • Ensure AMP pages’ canonical tags point to the non-AMP version.
  • Use absolute URLs in canonical tags for clarity.
  • Check your pages regularly to verify correct implementation.

Proper use of canonical tags helps improve your website’s SEO and ensures that search engines correctly index your content. Consistent implementation across AMP and non-AMP pages is key to avoiding duplicate content issues.