In short. Set a PDF's canonical URL by returning an HTTP Link response header with an absolute target URL and rel="canonical".
Definition: A canonical URL is the preferred address for content available at duplicate or very similar URLs. A PDF declares that preference through an HTTP
Linkresponse header containing the preferred URL andrel="canonical".
Key facts
- As of 17 October 2026, Google Search Central supports canonical HTTP headers for non-HTML documents, including PDFs, for web search results only.
- RFC 6596, The Canonical Link Relation, requires the target to contain duplicate content or all the referring resource's content.
- The curl manual documents
--dump-headerfor saving received headers, with-as the filename to print them to standard output.
Which header goes on the PDF response?
The server configuration must add a Link header to the response serving the PDF. Google's canonical URL documentation requires an absolute target URL, including the scheme and hostname. The header has this form, using Google's example target:
Link: <https://www.example.com/downloads/white-paper.pdf>; rel="canonical"
The URL between angle brackets identifies the preferred version. In Google's published example, this header is returned on a Word document's response to identify the PDF as canonical. The same mechanism applies when a PDF is the referring document; the target becomes the URL of its preferred equivalent.
For a PDF whose equivalent HTML page is preferred, the header on the PDF response points to that HTML page. For a preferred PDF, the target can be the PDF's own URL. Google's best practices include a self-referential canonical on the preferred version itself.
What makes a suitable canonical target?
RFC 6596 permits a self-referential target and a target on another hostname or domain. Its content requirement means an HTML target must reproduce the PDF's content or include it within a larger document. A short download description containing only a link to the PDF fails that content requirement.
The RFC recommends one canonical relation per resource. It also advises against pointing to a resource that declares a different canonical, returns an error, or is itself the source of a permanent redirect.
Google's best practices call for consistent canonical targets across methods. A sitemap and a PDF's header should identify the same preferred URL. Google also advises against canonical targets containing a URL fragment, such as an anchor identifying part of a document.
How can the response header be checked?
The curl manual documents the options used in this illustrative check. The example URL stands for the PDF address being checked:
curl --dump-header - --output /dev/null \
https://www.example.com/downloads/white-paper.pdf
--dump-header - prints the received headers. --output /dev/null suppresses the response body. The returned Link field should contain the intended absolute target and rel="canonical". The same command can check the target for error responses and canonical chains identified in RFC 6596.
Related terms
FAQ
Does the header force Google to select my preferred URL?
Google's documentation describes canonical link annotations as a strong signal influencing selection. Google chooses which version represents duplicate content in Search.
Can I point a PDF to an HTML version?
Yes. Under RFC 6596, the target must contain duplicate content or a superset of the referring document's content. You can use the HTML version's URL when it meets that requirement.
Sources
- Google Search Central, "How to specify a canonical URL with rel=canonical and other methods", 10 July 2026
- IETF, "RFC 6596: The Canonical Link Relation", April 2012
- curl, "curl man page", undated
Check how a page reads to answer engines. Open the GEO score analyzer