← Back to headers
HTTP Header
Link
ResponseAssociates the current resource with related resources or metadata.
HTTP header reference, syntax, examples, and developer usage.
What is the Link header?
The Link HTTP header is used to transmit metadata between a client and server as part of HTTP requests or responses.
HTTP headers define how content should be interpreted, cached, authenticated, secured, or processed by browsers and APIs.
Direction
This is a response header sent by the server to the client.
Syntax
Link: <uri>; rel="<relation-type>"[; as="<type>"][; crossorigin]
Example
Link: </styles.css>; rel="preload"; as="style"
Common use cases
- Preloading critical assets before the HTML parser discovers them
- Prefetching future resources or providing DNS prefetch hints
- Declaring canonical URLs and alternate resource relationships for SEO
- Pagination links in REST APIs using rel=next and rel=prev
Common mistakes
- Using the header in the wrong request or response context
- Sending invalid header values
- Incorrect header syntax
- Assuming the header automatically changes server behaviour
Practical developer insight
The HTTP Link header is functionally equivalent to the HTML <link> tag but can be sent before the HTML is parsed — making it especially effective as an Early Hints (103) response for fonts and render-blocking CSS. In REST APIs, it is widely used for pagination following RFC 8288.