HTML - Canonical URL

What is a Canonical URL

A canonical url is a URL that has a canonical value identifier for a web page meaning that the value should be unique on the internet scope.

This is the URL that people will see in:

The Facebook graph uses this value as identifier for a web page

Why you can get different URL for the same resource

Friendly URL

The same page may have different URL such as:

The link rel canonical defines which one is the good identifier and don't let robot such as google search defines it by chance.

Published in the category

The same page may be published in a category

Syndication

The same page may be syndicated (published on another site)

Translation

A page may be translated.

Tell Google about localized versions of your page

Mobile vs Desktop

A Mobile page and desktop page may not be served from the same domain and link canonical permits to identify them as the same resource.

Moving a page

Moving a page to another URL without losing integrated components such as embedded discussion components.

Specification

A Rel canonical is a tag in the header in a HMTL page that tells search engines:

  • which piece of content is the original and which one is a duplicate. It has been created in order to avoid duplicate content
  • which operates exclusively on a single root domain (it will carry over across subfolders and subdomains, not cross domain)

Language

A link rel canonical is a link html element with a rel attribute.

<link rel="canonical" href="https://datacadamia.com/cat/post1" />

Once created the value https://datacadamia.com/cat/post1 should never change even if the page get a new URL

Make sure that you use:

for the canonical href value.

The pages do not need to be absolutely identical. They just need to serve the same content.

og:url meta property

The og:url open graph property served the same goal. Facebook uses it

<meta property="og:url" content="https://example.com/path" />

Documentation / Reference





Discover More
Data System Architecture
Data Modeling - Canonical Form

A canonical form is a unique representation such that every object can be uniquely identified in the global scope object (entity)normal form In computer science, the equality of two objects can easily...
HTML - The link element (inter-document relationships)

The link represents metadata that expresses inter-document relationships. hyperlink The link element can be used only within the head element. where: media is a list of media query separated...
Metadata

HTML element HTML link tag for relation between document and the canonical url PageMaps: invisible blocks of XML that add metadata to pages. Microformats: tags used to mark up visible page content...
Open Graph (Tag|Protocol) - Ogp

- Open Graph is a meta protocol that a web page into a graph object. The Open Graph protocol was originally created at Facebook and is inspired by: Dublin Core link-rel canonical,...
Search Engine - Google Search Console

The Google Search Console is an application that gives you insight on how the google search engine see your web site (ie property) You can see: the number of time you have appeared on the search result...
Search Engine Results Page (SERP)

are the web pages served to users by a search engine. The Url seen in the page is the canonical url There is basically two kind of content on the search result page: paid ads: at the top or at...
Web - URL

An Uniform Resource Locator (URL) is a universal identifier for a resource. Because the resource can be created dynamically, an URL is also logically a request. It's the string that is understood by...



Share this page:
Follow us:
Task Runner