ComboStrap Page Metadata - Canonical URL

1 - About

A canonical URL is an identifier for a web page that is defined through the canonical meta property.

It identifies uniquely a page in a domain.

The canonical value:

  • should never change (theoretically)
  • does not need to be the pagename
  • is always lowercase

The canonical component is a part of the SEO module.

3 - How to set the canonical value ?

3.1 - Manually

To set the canonical value, uses the frontmatter component and add the canonical property in the JSON document.


3.2 - Automatically

This plugin can create a canonical value based on the last parts of a page ID. See ComboStrap Page Metadata - Automatic Canonical

4 - HTML HEAD properties

By setting a canonical value, you will get two head properties in your HTML page.

For instance:

  • if the canonical value is cat:post1
  • on a page hosted at

the canonical head properties would become

<link rel="canonical" href="" />
<meta property="og:url" content="" />

5 - Demo

This page has the canonical value set to canonical:url and therefore is also available at this Canonical URL.

In dokuwiki, a red hyperlink means that the file does not exist but with the canonical feature, the page exists.

Try it your self !

Navigate to this page via its canonical URL!


Navigate to this page via its dokuwiki URL!

6 - Usage

All external provider will use this value to refer to your page.

For instance:

7 - For the Geek

The canonical is explained in depth in the RFC6956 - the Canonical Link Relation

Powered by ComboStrap