Link:
- Meaning
- The HTTP response header that carries link relations
The canonical HTTP header sends rel=canonical in a Link response header, so non-HTML files like PDFs can name a preferred URL. Syntax, limits, and a live check.
A canonical HTTP header is a Link response header with rel="canonical" that names the preferred URL for a resource. Google says to use it where an HTML link element can't go, mainly non-HTML files such as PDFs. Use absolute URLs, and pick either the header or the HTML element, not both.
Four quick questions, then a straight answer.
From your answers, this is quietly costing you traffic and nobody has the hours to chase it. Scaplet finds every affected page, drafts the fixes and tracks how AI answers mention you.
A data platform shipped 46 fixes without a ticket.
This looks handled. Re-check after a redesign, a migration or a big content push; that is when it breaks.
Your site is small and you have the time. Work through the steps on this page, starting with the pages that get the most traffic.
<head>, so it can't hold a <link rel="canonical"> element. The HTTP header does the same job from the response. Google's guidance gives an example where the same content exists as a PDF and a Word file: the Word file's response points to the PDF as the canonical version.Link:<https://...pdf>rel="canonical"HTTP/1.1 200 OK
Content-Type: application/msword
Link: <https://www.example.com/downloads/white-paper.pdf>; rel="canonical"link element<head>Link headerGoogle's consolidation guide says to choose either the HTML element or the HTTP header rather than both, because using both is more error-prone. It also says the header doesn't increase page size and can map an unlimited number of duplicates. For the full picture of how Google picks a canonical, see canonical URL.
content-type: application/pdf and a link: header with rel="canonical", so the RFC Editor's PDF names its info page as the preferred URL. Run the same command on your own files. No link line means the file sends no canonical header.curl -sI https://www.rfc-editor.org/rfc/rfc9110.pdf | grep -i -E '^(content-type|link)'1 questions people ask next, answered from the sources on this page.
Google's documentation describes the header for cases where an HTML link element can't be used, mainly non-HTML files such as PDFs, and says it is supported only for web search results. It doesn't describe other uses.
The free audit reads robots.txt, sitemaps, status codes, canonicals, redirects and structured data.