HTTPREF
← Back to headers

HTTP Header

X-Forwarded-Proto

Networking

Indicates the original protocol used by the client before the request passed through a proxy.

HTTP header reference, syntax, examples, and developer usage.

What is the X-Forwarded-Proto header?

The X-Forwarded-Proto 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 header may appear in both HTTP requests and responses.

Syntax

X-Forwarded-Proto: https

Example

X-Forwarded-Proto: https

Common use cases

  • Reverse proxy setups
  • HTTPS detection behind load balancers
  • App routing and redirects

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

Related headers