INTERNET FUNDAMENTALSAI-REVIEWED

What is the difference between forward and reverse proxies?

Useful first: HTTP · optional, not a requirement

Choose your depth

Stay with the essentials, or look closer.

Simple explanation
2 min read · estimate

YOUR GOALRecognize client-side and website-side proxy roles in an everyday request.

Whose side does the intermediary serve?

A helper for the visitor

Imagine a school computer fetching a museum guide. Its browser is configured to send web requests through the school’s forward proxy. That intermediary handles requests for the school’s clients, including requests to different websites.

Think of a librarian who fetches books for a class. The librarian represents the readers. This analogy explains the role, not a guarantee about privacy or how every network is configured.

[1] [2]

A front desk for the website

The museum can put a reverse proxy in front of its own web servers. Visitors address the museum service, and the intermediary passes requests to the appropriate server behind it. A reception desk directing visitors to departments is a useful analogy.

A reverse proxy may also provide load balancing or caching. Those are optional capabilities, not requirements for being a reverse proxy. Both kinds of proxy can carry requests toward a service and responses back to a visitor.

[2] [4]
THE IDEA TO KEEP

Ask whether the proxy represents the requesting clients or the service they are visiting.

ONE THING TO WATCH OUT FOR

A reverse proxy only carries responses, while a forward proxy only carries requests.

Both handle traffic in both directions. The distinction is the client or service they act for.

A QUICK CHECK, NOT A TEST
A museum places one public entry point in front of its guide and ticket servers. Which role does that entry point perform?
Show the explanation

A reverse proxy for the museum’s service. The entry point fronts the museum’s servers. Its role is reverse proxying, even though both requests and responses pass through it.

Progress is saved only in this browser.

KEEP EXPLORINGHTTP
Was this explanation clear?
Report a mistake by email
Basic explanation
2 min read · estimate

YOUR GOALRead HTTP/1.1 request targets and trace a reverse proxy’s configured backend route.

Follow an HTTP request through the proxy

A forward proxy needs the destination

For an ordinary, unencrypted HTTP GET sent to a forward proxy using HTTP/1.1, the request target contains the full destination URI:

GET http://museum.example/guide HTTP/1.1
Host: museum.example

When requesting that resource directly from its server, the usual form is:

GET /guide HTTP/1.1
Host: museum.example

These fragments omit the remaining headers and terminating blank line. CONNECT and server-wide OPTIONS use other target forms. Do not treat a full URI as conclusive proof of a proxy: HTTP/1.1 origin servers must accept that form too.

[3]

A reverse proxy follows service configuration

Suppose the museum’s public service sends /guide requests to a guide application and /tickets requests to a ticket application. Visitors keep using the museum’s public address; the reverse proxy chooses the backend according to its configuration.

For a forwarded request, it obtains the backend response and relays it to the client. For example, NGINX can use a location rule and proxy_pass to select a backend. Configuration can also change the backend path or headers, so debugging should compare what the proxy received with what the application received.

[4]
THE IDEA TO KEEP

Identify the public destination, the next connection and the request that the next server actually receives.

ONE THING TO WATCH OUT FOR

A reverse proxy must use the same path and Host header on every connection.

The public request and the backend request can differ according to the proxy’s routing and header configuration.

A QUICK CHECK, NOT A TEST
Which request line fits an ordinary HTTP/1.1 GET for an unencrypted URL sent to a forward proxy?
Show the explanation

GET http://museum.example/guide HTTP/1.1 This GET uses the absolute URI form. A CONNECT target instead uses a host and port, without a path.

Progress is saved only in this browser.

KEEP EXPLORINGHTTP
Was this explanation clear?
Report a mistake by email
Advanced explanation
3 min read · estimate

YOUR GOALDistinguish a CONNECT tunnel from TLS termination and avoid trusting client-supplied forwarding claims.

Separate tunneling, TLS and trusted metadata

CONNECT changes how bytes are relayed

An HTTP/1.1 client can request a tunnel with this fragment:

CONNECT museum.example:443 HTTP/1.1
Host: museum.example:443

After a successful 2xx response, the connection switches to tunnel mode. The intermediary relays bytes in both directions instead of processing each tunneled exchange as an HTTP message. A failed response does not establish the tunnel.

CONNECT itself supplies no encryption; a client can establish TLS through the tunnel. The destination host and port are present in the CONNECT request. Operators should restrict allowed tunnel destinations or ports rather than provide an unrestricted relay.

[5] [8]

TLS termination creates a different boundary

When a reverse proxy terminates the browser’s TLS connection, it decrypts that connection’s traffic so it can process the HTTP request. It may then use a separate HTTPS connection to its backend. Encrypting the backend hop and verifying the backend certificate require their own configuration.

For example, a museum may protect both browser-to-proxy and proxy-to-application connections with TLS. The proxy still sees the HTTP content between those connections. That differs from a plain CONNECT tunnel carrying TLS between the client and destination. See HTTPS for what an encrypted connection protects.

[9] [6] [5]

Forwarded information needs a trust boundary

A backend’s immediate network peer may be the reverse proxy. The standardized Forwarded header can convey information about earlier hops, but a client or intermediary can supply or change that field.

Suppose an application uses a claimed client address from Forwarded to grant access. The header’s presence alone does not make that decision safe. A deployment needs a defined set of trusted intermediaries and protected communication to them; values describing earlier, untrusted hops do not become reliable merely because they passed through a trusted proxy.

[7]
THE IDEA TO KEEP

Locate the TLS endpoints and the trusted metadata boundary before drawing conclusions about a proxied request.

ONE THING TO WATCH OUT FOR

Any Forwarded header reaching an application proves the original client’s identity.

Forwarded is metadata that can be forged or modified. Trust depends on the verified proxy chain and deployment policy.

A QUICK CHECK, NOT A TEST
A reverse proxy terminates browser TLS and uses separately verified HTTPS to its backend. Which statement is correct?
Show the explanation

There are two TLS connections, and the proxy can process the HTTP content between them. TLS terminates at the proxy on the first hop. A separate encrypted backend connection protects the second hop; it does not hide content from the proxy itself.

Progress is saved only in this browser.

KEEP EXPLORINGHTTP
Was this explanation clear?
Report a mistake by email
GO STRAIGHT TO THE SOURCE

Keep asking. Check the details.

Source-checked using AI (OpenAI Codex) on . The checks covered sources, examples, and quizzes for this article version.

No human review is claimed. AI review can miss errors; check the original sources below.

  1. RFC 9110 — HTTP intermediaries
  2. MDN — Proxy servers and tunneling
  3. RFC 9112 — HTTP/1.1 request-target forms
  4. NGINX — Reverse proxy request handling
  5. RFC 9110 — CONNECT
  6. NGINX — Securing HTTP traffic to upstream servers
  7. RFC 7239 — Forwarded header validity and integrity
  8. MDN — CONNECT request method
  9. NGINX — TLS termination at the HTTPS server
How explanations are prepared