The HTTP Link header is a response header that expresses links between resources, with the same meaning as the HTML <link> element. RFC 8288 defines it.
What is the Link header used for?
Each entry holds a target URI in angle brackets plus parameters, of which rel (the relation type) is required. MDN describes common uses such as preload and preconnect, which let the browser start fetching before it has parsed the HTML, and prev/next for paginated APIs.
For SEO, the most relevant use is rel="canonical". Google’s documentation states that a rel="canonical" HTTP header can tell Googlebot the canonical URL for non-HTML files such as PDFs, and that Google supports this method for web search only.
Example
Link: <https://www.example.com/downloads/white-paper.pdf>; rel="canonical"
Link: </style.css>; rel=preload; as=style
Common mistakes
The header is set on the wrong URL, or several Link headers contradict each other. Because the header is not visible in the page source, it is easy to overlook in audits.
Sources
- RFC 8288: Web Linkingrfc-editor.org
- Link header – MDNdeveloper.mozilla.org
- Consolidate duplicate URLs, rel=canonical HTTP header – Google Search Centraldevelopers.google.com
Last updated: