One header, many relationships
The HTTP Link header (RFC 8288) is the response-header twin of HTML’s <link>
element. It lets a server declare typed relationships — preload this, the
canonical URL is that, the next page lives here — without any markup. This
reference lists the common rel values, the target attributes they accept, and
when to reach for each.
How it works
Each link is a URI reference in angle brackets followed by semicolon-separated
parameters. The rel parameter names the relationship; other parameters refine
it. Multiple links are comma-separated:
Link: </styles.css>; rel=preload; as=style,
</app.js>; rel=modulepreload,
<https://cdn.example>; rel=preconnect
Performance relations (preload, preconnect, dns-prefetch, modulepreload)
are most powerful inside a 103 Early Hints response, where the browser can act
on them before the page body even exists. Navigation and SEO relations
(canonical, alternate, next, prev) describe document structure.
Tips and notes
asis mandatory forrel=preload; without it the browser cannot prioritise.- Add
crossoriginwhen preloading fonts or any CORS resource, or it re-fetches. rel=canonicalin a header is honoured for non-HTML resources like PDFs.- Use
hreflangandtypeonalternateto point at localised or feed variants.