Referer

The HTTP Referer request header indicates the URL of the client that is making the HTTP request.

Table of Contents

Usage

The HTTP Referer request header contains an absolute or relative URL to inform the server of where the client is visiting from. This HTTP header can be used for analytics purposes, as well as for optimizing caching.

Note

The HTTP Referer header is a misspelling of the word referrer.

When a client follows a link, the HTTP Referer request header contains the URL of the page that hosts the link. If a resource HTTP request is made to an external domain then the HTTP header will contain the URL of the page that uses the resource.

The only directive is the URL, which can include the origin, path, and query string, depending on the HTTP Referrer-Policy header. Importantly, confidential information such as site credentials are not to be included in the HTTP Referer header.

Referer: http://example.re/

Note

Because the HTTP Referer header reveals details about the client that are not otherwise available without specific consent, this HTTP header can erode online privacy.

Takeaway

The HTTP Referer header is used to inform the server of the URL for the client making the HTTP request. This is helpful for reporting site analytics.

See also

Last updated: August 2, 2023