A canonical tag tells search engines which address is the real one when the same page can be reached in several ways: with and without www, with a tracking parameter, with a slash at the end, or on a copy of the site. It is one line in the head of the page, and it is easy to get wrong without any sign that anything is wrong. A plugin writes a second one. A script puts an image before it, which ends the head, and it stops counting. A relative address points somewhere that you did not mean. The page looks fine, and the search results show the wrong address.
This page works on the text you paste. Paste the HTML of the page, or just its head, and it finds the canonical link the way a browser's parser would, tells you which address a crawler will read, and checks it against what Google documents. It can also read the HTTP headers, the address of the page, and the other signals on the page that can contradict the canonical. Everything is done in your browser, the code behind the page makes no network requests, and a page that is not published yet can be checked as well as one that is.
How to use the Canonical Tag Checker: Find and Fix rel=canonical Errors
- Paste the page or its headPaste the HTML of the page, or only what is between the head tags. The page reads the link, meta, and base tags, and it ignores scripts, styles, and comments, so a canonical that is only written in a script or a comment is not counted.
- Give the address of the pageThis is optional, and it makes the check much better. With the address, a relative canonical can be read, and the page can say whether the canonical is the page itself or another page, and what differs. Without it the page still checks everything that does not need it.
- Add the headers, if you have themOpen the headers of the response in your browser's network panel, copy them, and paste them in the box that opens. The page reads a Link header with a canonical, and an X-Robots-Tag with noindex, and compares them with the page.
- Fix the errors, then the warningsThe address that a crawler reads is shown at the top, and the canonical links that were found are listed with their line and place. Press the line button of a message to jump to the tag in your text.
What a canonical tag does
Many sites can show one page at more than one address. A product can be reached with a color in the query string, a blog post with and without a slash, a page with a tracking parameter that a newsletter added, and the whole site with and without www. To a search engine these are different addresses with the same content. It picks one to show and to count links for, and the canonical tag is how you tell it your choice: <link rel="canonical" href="https://example.com/shoes">. The relation is defined in RFC 6596.
Google treats the canonical as a strong hint and not as a command. If other signals point somewhere else, such as redirects, internal links, or the sitemap, it can choose another address. This is why the tag has to agree with the other signals, and the page checks the ones that are in the text you paste. A canonical on a page that names itself, called self-referencing, is the usual advice, because it protects the page from copies that its own address picks up.
Where the tag has to be
Google's documentation says that the canonical link is only accepted if it is in the head section of the HTML. That sounds easy, but the head ends sooner than most people think. The HTML standard says that the first element that does not belong in a head ends it, and that what follows is the body. A div, an image, an iframe, a paragraph, or any text between the tags will do. A tracking pixel written as an image at the top of the head, an iframe added by a script that writes into the head, or a stray character from a template are all enough, and the canonical link after them is in the body, where it is ignored.
The page follows the same rules as a browser. It reports the canonical as late, names the element that ended the head, and does not count it as the canonical of the page. Some things do not end the head: the other head elements, whitespace, comments, and a link after the end tag of the head but before the body tag, which browsers still put in the head. A noscript element is accepted inside the head and, with scripts on, is read as text, which is how a crawler that runs scripts sees it. After the end tag of the head a noscript does end it.
One canonical, and an absolute address
A page should have one canonical. Google's page does not say what it does with two, and nothing else decides, so two that differ leave the choice to chance, and two that are the same are a sign that a theme and a plugin are both writing it. The page lists them with their lines, and tells the two cases apart.
Google recommends absolute addresses, with the protocol and the host, and says that relative addresses are supported but can cause problems in the long run. A relative address is read against the address of the page, or against a base tag if there is one, and the base tag changes where it points. The page reads it the way a browser does, shows where it points, and warns that it is relative. It also warns about a fragment, which Google says it generally does not support, about a space, about tracking and session parameters that make a different canonical for each visitor, and about http where the page is on https, because Google prefers https as the canonical unless there are issues or conflicting signals.
The headers, noindex, hreflang, and og:url
A canonical can also be sent in a Link header of the response, as <https://example.com/doc>; rel="canonical". It is the only way for a file that has no head, such as a PDF. Google's page says to choose one method and go with it, because using both is more error prone, and not to name different canonicals with different methods. The page reads the header and says if it differs from the link in the page.
Noindex and a canonical to another address ask for opposite things: one takes the page out of the index and the other asks for it to be merged into another page. Google says that it does not recommend noindex to prevent the choice of a canonical. For pages with hreflang links, Google recommends a canonical in the same language, so a language version that names another language as its canonical is reported. And og:url, the address that shares are counted for, should be the same as the canonical, so the page reports when they differ.
Things that look like a canonical and are not
Two mistakes are common. A meta tag, <meta name="canonical" content="…">, is not read by any search engine, because the canonical is a link and not a meta tag. And a misspelled relation, such as cannonical, is not a canonical for anyone. The page reports both, with the line. A canonical inside a script that writes the head later is also not in the text, so it cannot be seen here, which is covered in the limits.
How it was tested
The decision whether a tag is in the head or in the body was compared with html5lib, a parser that follows the HTML standard. Pages were generated at random with the things that really cause this: images, divs, iframes, text, end tags, and noscript elements in the head, tags after the end of the head, and tags in the body. In four runs, one of 500 pages and three of 600 pages, the page agreed with html5lib about all of the roughly 9,100 link and meta tags, and a large share of them were in the body.
The Link header reader was compared with the one in the requests library for Python on 400 generated headers with more than 1,000 links, with quoted parameters, several links on a line, and spacing in the places where headers differ. The two gave the same result for all of them. The meta, link, and title tags that the head reader finds were compared with lxml on 349 generated heads, and were the same in all of them. The rules of the checks were written from Google's page and tested on written examples. The address handling is the URL implementation of the browser, and it was not compared with another one.
Limits and accuracy
- The page reads the text that you paste. It does not fetch a URL, so it cannot see a canonical that a script writes after the page loads, and it cannot see what a server sends unless you paste the headers.
- It cannot know whether the canonical address works, is redirected, is blocked by robots.txt, is noindex, or is itself a copy of another page. Those need a crawl, and a canonical that points to such a page is a common mistake.
- Google decides itself which address is the canonical, and uses the tag as a hint. A page without errors here can still get another canonical chosen if redirects, links, or the sitemap point elsewhere.
- The rules come from Google's documentation, which was read on 4 October 2026. Other search engines have their own, and Bing, for example, may treat a case that Google allows in another way.
- Only Link headers and X-Robots-Tag headers are read from the headers. Other headers, and a Link header that is not about the canonical, are ignored. A noindex for one named crawler other than Google is not counted.
- The head is read the way the HTML standard says, with scripts treated as on. A parser that treats noscript as markup, because scripts are off, can put a canonical elsewhere.
- The text you paste is not saved, so copy the report before you close the page.
Frequently asked questions
How do I check the canonical tag of a page?
Paste the HTML of the page, or just its head, on this page, and add the address of the page if you want the comparison. It shows the canonical that a crawler will read, and lists what is wrong with it, with the line.
Why is my canonical tag ignored?
The common reasons are that it is not in the head, because an element before it ended the head, that there are two that differ, that it points to a page that redirects or is noindex, or that other signals point to another address. This page checks the first two, and the ones that show in the text.
Should every page have a canonical that names itself?
Usually yes. A self-referencing canonical makes the address you chose the one that counts, even when the page is reached with a tracking parameter or another variation. Pages that are copies of another page should name that page.
Can I have two canonical tags?
You should not. Google's page does not say which it would take, and two that differ leave the choice to chance. Two that are the same only add noise. Check which plugin or theme writes the second.
Does a canonical have to be an absolute address?
Google says that relative addresses are supported but recommends absolute ones, with the protocol and the host, because relative ones can cause problems in the long run, such as with a base tag. This page warns about a relative address and shows where it points.
Can I use a canonical and noindex together?
It is a mixed signal. Noindex takes the page out of the index, and a canonical to another address asks for it to be merged into that address. Google does not recommend using noindex to prevent the choice of a canonical. Choose the one that you mean.
Is a canonical in the Link header as good as one in the page?
Google supports both, and a header is the only choice for a file that has no head, such as a PDF. Choose one method for a page. If both are there and name different addresses, this page reports an error.
Is my page uploaded to a server?
No. The text and the headers are read in your browser, and the code behind the page makes no network requests. Nothing is saved.
Research and references
This page was written and checked against the sources below.

