Create a Canonical URL

Here's all you need to know about canonical URLs and how to create one.

What’s a canonical URL?

A “canonical URL“, also known as the “canonical link element” or “canonical tag“, is an HTML attribute used to indicate the preferred version of a webpage when multiple versions of the same content exist. It is primarily used to address issues related to duplicate content on the Internet.

Duplicate content occurs when identical or substantially similar content appears on different URLs. This can happen for various reasons, such as:

  • when different versions of a webpage are created for mobile and desktop devices,
  • or when multiple URLs point to the same content due to URL parameters, session IDs, or tracking codes. For example:
    • example.com?dress=1234 and
    • example.com/dresses/1234

Note that the pages do not need to be absolutely identical; minor changes in sorting or filtering of list pages do not make the page unique (for example, sorting by price or filtering by item color). The canonical can be in a different domain than a duplicate.

The purpose of the canonical URL is to inform search engines which version of the content should be treated as the authoritative or primary version. By specifying the canonical URL, website owners can help search engines understand their preferred version and consolidate the ranking signals and link equity for that particular URL.

The canonical URL is specified within the HTML of a webpage by adding the following tag in the head section:

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

In this example, “https://www.example.com/original-page” represents the preferred or canonical URL of the webpage. By including this tag, website owners indicate to search engines that this is the URL they want to be indexed and displayed in search results.

When search engines encounter a canonical URL, they generally consolidate the ranking signals and attribute them to the specified canonical URL rather than considering the duplicate versions separately. This helps prevent duplicate content issues from negatively affecting search engine optimisation (SEO) efforts by avoiding potential penalties for duplicate content.

It’s important to note that the canonical URL is a recommendation to search engines, and they ultimately decide whether to honour it or not. However, in most cases, search engines respect the canonical tag and treat the specified URL as the preferred version.

By implementing canonical URLs correctly, website owners can manage duplicate content effectively, consolidate their SEO efforts, and ensure that the desired version of their webpages receives appropriate visibility in search engine results.

How to create a custom canonical URL?

SEOPress automatically handles canonical tags, you don’t have to worry about that.

However, it might be necessary to customise it for the reasons listed previously in this guide.

1. To do that, edit the post, page or post type of your choice with Classic Editor or the Block Editor (Gutenberg).

2. Scroll down to the SEO metabox.

223d164c-2438-448c-b8a7-d0ae1633d6a7

3. Click on the “Advanced” tab.

829a4fa6-05b3-48a7-9206-0591c9ff03d7

4. Scroll down to “Canonical URL” field and entired the desired value.

e220f6b7-2237-40d9-ae01-67fc7e86314a

5. Click 'Update' to save.

53e5e955-3e27-4d0c-9693-0ec254ae2e81