In short. The HTTP Link header identifies related resources with a target URL and a rel parameter that describes the relationship.
Definition: The HTTP
Linkheader carries typed connections between web resources in a response header. A link identifies a target and uses therelparameter to describe its relationship to the resource providing the response.
Key facts
- RFC 8288, Web Linking, published in October 2017, defines the link model and its HTTP header syntax.
- The IANA Link Relations registry defines
canonicalas the preferred version of a resource andalternateas a substitute for the link context. - As of 17 October 2026, Google's canonical URL documentation supports canonical response headers for non-HTML documents, including PDFs.
- Google's localized versions documentation also supports response headers that identify language and regional alternatives.
How is a typed link written?
Under RFC 8288, the target appears inside angle brackets. Semicolons introduce parameters, and rel is required. The link context is normally the URL of the representation associated with the header. Multiple link values can share a header, separated by commas.
The following header matches the RFC's canonical-link example:
Link: <https://example.com>; rel="canonical"; type="text/html"
Here, canonical expresses the relationship. The optional type attribute hints at the target's media type, meaning the format of its representation. The target response's Content-Type header takes precedence over that hint.
The IANA registry supplies meanings for registered relation names. For example, next identifies the following resource in a series. Choosing a relation therefore requires matching its defined meaning to the intended connection.
How does a canonical header apply to a document?
A canonical URL is the preferred URL for duplicate or very similar content. Google's canonicalization guidance gives an example where a Word document's response points to a PDF as canonical:
Link: <https://www.example.com/downloads/white-paper.pdf>; rel="canonical"
Google documents this method for web search results only and recommends absolute URLs. It describes canonical annotations as a strong signal when selecting a canonical URL. For a website serving the same content in several formats, the header provides a way to express that preference on a non-HTML response.
The same guidance recommends choosing either the HTML canonical element or the HTTP header method. Maintaining both increases the risk of sending conflicting URLs. A configuration review should therefore compare the header target with any canonical element in the document.
How do headers identify language alternatives?
The hreflang parameter identifies a target's language or language and region. Google's localized versions guide uses rel="alternate" with hreflang in a page's GET response, including for PDFs. Its example contains these language variants:
Link: <https://example.com/file.pdf>; rel="alternate"; hreflang="en", <https://de-ch.example.com/file.pdf>; rel="alternate"; hreflang="de-CH", <https://de.example.com/file.pdf>; rel="alternate"; hreflang="de"
Each version returns the same set of links, including a link to itself. URLs must be fully qualified. Google's guide requires reciprocal links between variants: when a pair of pages fails to point to each other, those annotations are ignored. Checking the response for each variant therefore matters when reviewing the configuration.
Related terms
FAQ
Can a PDF response carry a canonical link?
Yes. Google's canonical header documentation explicitly includes PDFs among supported non-HTML documents. You configure the link in the server's response headers.
Can a relative target appear in a Link header?
RFC 8288 permits relative targets and requires parsers to resolve them; a base URL inside the response body does not apply. Google's canonical-header guidance calls for absolute URLs.
Must language alternatives use separate headers?
Google's header example puts comma-separated alternatives in one Link field. You include every variant, including the requested version, in the set.
Sources
- IETF, "RFC 8288: Web Linking", October 2017
- IANA, "Link Relations", updated 12 June 2026
- Google Search Central, 'How to specify a canonical URL with rel="canonical" and other methods', updated 10 July 2026
- Google Search Central, "Tell Google about localized versions of your page", updated 21 September 2026
Check how a page reads to answer engines. Open the GEO score analyzer