Forward vs Reverse Proxy: Key Differences, Examples and When to Use Each

Short version: a forward proxy is hired by clients, a reverse proxy is hired by servers. The first one lives beside users, carries their requests out to the web and lets remote sites see its address in place of theirs. The second one guards a website or API from the front, takes in traffic from everywhere and picks the backend machine that should reply. One middleman concept, mirrored onto opposite ends of the exchange.
Most explanations stop at that sentence. Below you will find where each type physically lives, whose identity it conceals, what software usually plays each role (Squid, Nginx, HAProxy, Cloudflare and others), how HTTPS behaves in both cases, and a side-by-side table you can use when a colleague asks which one the project really needs.
Forward proxies for your tasks
Datacenter and residential proxies with HTTP and SOCKS5 for scripts, browsers and teams
The One-Line Rule: Who Does the Proxy Serve?
The quickest way to tell the two apart is to ask a single question: whose interests does this box represent?
- Forward proxy. Its loyalty lies with whoever sends the requests. A destination site records the intermediary, never the office workstation or the data script hiding behind it.
- Reverse proxy. Its loyalty lies with the team that operates a service. Visitors meet a single public hostname and have no idea whether one machine or a fleet of containers across three regions does the actual work.
A handy mental image: a forward proxy is the outbound gate of an office building, a reverse proxy is the reception desk of a company that receives guests.

How a Forward Proxy Works
Clients reach a forward proxy in one of two ways. Explicit mode means someone typed a host and port into the browser, operating system or app, or deployed a PAC file. Transparent mode means a gateway grabs the traffic silently, with nothing set on the device. From there a request moves through four stages:

- Your app dials the intermediary rather than the website itself.
- Plain HTTP requests carry the complete URL; for HTTPS the app first sends a
CONNECTline that asks for a raw tunnel to the target host. - Policy checks run next (credentials, permitted domains, usage limits), after which the intermediary contacts the destination on its own and streams the reply back.
- In the website's logs the visitor address is the intermediary's IP.
If you want a deeper look at the configuration side, our guide to transparent and explicit proxies compares both ways of pointing clients at a forward proxy.
Typical Forward Proxy Jobs
- Corporate egress control. Filtering categories of sites, logging outbound traffic and caching large downloads. Squid is the classic open-source choice; commercial secure web gateways do the same at larger scale.
- Changing the visible IP and location. Market research, price checks in other regions, ad verification and testing localized content.
- Data collection. Scrapers spread requests across many exit IPs so that one server address does not carry the entire load.
- Privacy on untrusted networks. Sites no longer learn the device address, though a bare proxy adds no encryption of its own.
When you rent proxies from a provider, you are simply buying access to someone else's forward proxy fleet: the dashboard hands you a host, port and credentials, and traffic leaves through their addresses. For example, datacenter proxies give fast, stable exit addresses for automation, while residential pools look like ordinary household connections.
How a Reverse Proxy Works
Here nothing is configured on the client. DNS for shop.example simply points at the reverse proxy, so every visitor reaches it automatically. The flow:

- DNS hands the browser the address of the reverse proxy, and the browser opens a connection there.
- Encryption ends at this box: it decrypts the request and applies routing by path or domain, rate limits and firewall checks.
- A chosen backend from the pool receives the request, usually across an internal network segment.
- On the way back the reply may get compressed, stored in cache or stamped with security headers.
Since every backend connection now originates from the reverse proxy, the real client IP has to travel separately, in headers such as X-Forwarded-For or the standardized Forwarded header (RFC 7239), or through the binary PROXY protocol used by HAProxy and many load balancers.
Typical Reverse Proxy Jobs
- Load balancing across application servers, with health checks that pull a broken node out of rotation.
- TLS termination in one place, so certificates are not copied to every backend.
- Caching and compression of static files and cacheable API answers.
- Protection. Hiding origin IPs, absorbing floods, filtering malicious requests with a web application firewall. Our article on the proxy firewall explains the application-layer filtering part.
- One entry point for many services. Routing
/apito one cluster and/staticto another, or serving dozens of microservices behind a single domain.
Software That Plays Each Role
| Tool | Forward proxy | Reverse proxy | Notes |
|---|---|---|---|
| Squid | Main use | Possible (accelerator mode) | Caching proxy with ACLs, popular in offices and ISPs |
| Nginx | Limited (no native CONNECT) | Main use | Web server plus reverse proxy and load balancer |
| HAProxy | Not designed for it | Main use | TCP/HTTP load balancer, PROXY protocol author |
| Envoy, Traefik | Possible as egress sidecar | Main use | Common in Kubernetes and service meshes |
| Apache httpd | mod_proxy with ProxyRequests On | ProxyPass | Both modes in one module set |
| Varnish | No | Main use | HTTP cache placed in front of web servers |
| Cloudflare, Akamai, AWS CloudFront | No | Main use (as a CDN) | Managed reverse proxy distributed worldwide |
| Commercial proxy networks | Main use | No | Rented exit IPs for clients |
Nginx can forward outbound HTTP traffic, but HTTPS forwarding needs a third-party module, so teams that want a real outbound proxy usually reach for Squid or a dedicated gateway instead.
Forward vs Reverse Proxy: Side-by-Side Comparison
| Criterion | Forward proxy | Reverse proxy |
|---|---|---|
| Acts for | Clients (users, scripts, an office) | Servers (a site, an API, a cluster) |
| Placement | Near the clients, at the network exit | Near the servers, at the network entrance |
| Who is hidden | The client's IP and network | The origin servers' IPs and layout |
| Who configures it | Client side: settings, PAC file or gateway | Server side: DNS points to the proxy |
| Does the client know about it | Usually yes (explicit mode) | Usually no |
| HTTPS handling | Tunnel via CONNECT, traffic stays encrypted end to end | Terminates TLS and reads the request |
| Main goals | Access control, IP and location change, caching downloads | Load balancing, TLS offload, caching, protection |
| Typical software | Squid, secure web gateways, proxy services | Nginx, HAProxy, Envoy, Traefik, CDNs |
The HTTPS row is the one people most often get wrong. A forward proxy normally cannot read your HTTPS traffic: it only sees the destination host from the CONNECT line and passes encrypted bytes. The exception is corporate TLS inspection, where the company installs its own root certificate on employee devices. A reverse proxy, by contrast, holds the site's certificate, so decrypting traffic is its normal duty.
Can One Setup Use Both?
Routinely, and frequently within one request. Picture a data job inside a company: it exits via the corporate gateway, hops through a rented proxy network, and lands on a web shop fronted by a CDN plus an Nginx balancer. That chain holds four middlemen, a pair of each type, and none of them sees past its direct neighbours.
The same software can also wear both hats: Squid can accelerate a website in reverse mode, Envoy can act as an egress gateway, and Apache can do both depending on directives. What decides the type is the role in the topology, not the brand of the binary.
Which One Do You Need?
Choose a forward proxy if:
- outbound access of staff or servers must be filtered or logged;
- automation or browser sessions should exit from different addresses or countries;
- you collect public data and want to spread requests over several exit addresses.
Choose a reverse proxy if:
- you run a site or API and want one public entry point;
- you need load balancing, TLS termination or caching;
- origin servers must stay hidden and protected from direct traffic.
For the client-side scenario, check that a rented proxy really answers and shows the expected exit address with our proxy checker before plugging it into your tools. For the broader picture of anonymous, elite, rotating and other variants, see our overview of types of proxy servers.
Common Misconceptions
- A VPN is a forward proxy. It is related, since both change your visible address, but a VPN tunnels all traffic at the network layer and encrypts it, while a proxy works per application and does not encrypt by default.
- Reverse proxies make visitors anonymous. They do the opposite: they shield servers, and they usually record the real visitor address in logs and headers.
- A CDN is something separate. A CDN is essentially a globally distributed reverse proxy with caching.
- Forward proxies always cache. Many modern ones, especially commercial proxy networks, simply relay traffic without caching anything.
Forward vs Reverse Proxy FAQ
Is a load balancer a reverse proxy?
A layer 7 load balancer that reads HTTP requests and opens its own connections to backends is a reverse proxy by definition. Pure layer 4 balancers that only forward packets are closer to network routers, although products such as HAProxy can work in both modes.
Is Cloudflare a forward or reverse proxy?
The CDN and protection layer act as a reverse proxy, because DNS for the site resolves to Cloudflare and Cloudflare fetches content from the origin. Cloudflare also sells separate products for outbound corporate traffic, which work as forward proxies, so the answer depends on the product.
Can a forward proxy see my passwords?
With HTTPS an ordinary forward proxy learns only the hostname from the tunnel request and relays ciphertext. Unencrypted HTTP and company networks with TLS inspection are the exceptions, which is why trusted providers and HTTPS-only sites matter.
Does a reverse proxy hide my IP from websites?
No. A reverse proxy belongs to the website, not to you, and it usually passes your real address to the backend in a header. To change the IP that sites see, you need a forward proxy or a VPN on your side.
Is Nginx a forward or reverse proxy?
Nginx is built and mostly used as a reverse proxy and load balancer. It can relay plain outbound HTTP, but it lacks native support for HTTPS tunnelling, so it is a poor choice for a general forward proxy.


