What is a canonical URL

A canonical URL is a way of letting services know the one true source of a particular page.

HTML FAQs → What is a canonical URL

A canonical URL is a way of letting services know the one true source of a particular page. You will often see them on services that allow people to repost or share content.

The idea is if there are two identical pages on the internet, we probably only want one to be the “main” one. So if you copy and paste your article onto another website, you could add a canonical URL to that website to say “my website is the main one”.

You might use it if for usability reasons you want two pages on your website to have the same content but be available at different URLs, but when it comes to what you want search engines to show, by setting a canonical you can say “this page is just a copy of that page”.

A canonical URL looks like this;

<link rel="canonical" href="https://your-link">

You put this in the <head> of your page.

You can view the source of this page to what what we’re using for ours.

We have written a longer article about canonical and base URLs.

Recent posts View all

Rails

Dealing with multiple languages with inflections

How to have your site deal with multiple languages in inflections

Threat Intelligence JavaScript

Threat Intelligence Issue 5

Issue 5 of our Threat Intelligence information