Reverse proxy explained in plain terms means understanding the single door that stands in front of a website’s servers, deciding which server should answer each request, and shielding the servers themselves from the internet. The central question is how a site can serve millions of visitors from many servers, without exposing any of them directly, and the answer is to put one gateway in front of them all, and let it route, cache, and protect the traffic.
A reverse proxy is a server that sits in front of one or more web servers and forwards client requests to them, then returns their responses to the client. To the visitor, the proxy is the website: it has the public address, it holds the TLS certificate, and it is the only machine the visitor ever talks to, while the real servers stay hidden behind it, reachable only through the proxy.
The idea is simple: one public face, many private workers. The proxy inspects each request, decides which backend server should handle it, and passes it on, which lets the site spread load, cache popular pages, and change its servers without anyone outside noticing. This article explains what a reverse proxy is, how it works, and where it is used.
Key takeaways
- A reverse proxy sits in front of web servers and forwards requests to them.
- Visitors see only the proxy; the real servers stay hidden behind it.
- It spreads load, caches responses, and terminates TLS in one place.
- It protects backends from direct attack and absorbs traffic spikes.
- It suits any site with more than one server, or any site that needs control.
What a reverse proxy is
A reverse proxy is a gateway that works on behalf of servers, which is the opposite of a forward proxy, which works on behalf of clients. A forward proxy sits near the user and fetches pages for them, often to filter or anonymise their browsing, while a reverse proxy sits near the servers and receives requests for them, deciding which server answers and how the answer is delivered.
The proxy’s first job is routing. It reads the request’s path, host, or headers, and forwards it to the right backend: the main site to one group of servers, the API to another, and the images to a third, all behind a single public address. That lets one domain serve many applications, each running on its own servers, without the visitor ever knowing.
Its second job is to absorb work that the backends should not do. The proxy terminates TLS, so the backends receive plain HTTP and never handle certificates, it caches popular responses, so repeated requests never reach a backend at all, and it compresses responses, so the backends send less data. Our guide to Nginx explains the server software most often used as a reverse proxy, and our guide to CDNs explains the global network that does the same job at internet scale.
How a reverse proxy works
A request arrives at the proxy, which first checks its cache. If the response is cached and still fresh, the proxy returns it at once, and no backend is involved, which is why a popular page can serve thousands of visitors a second from a single proxy while the backends sit idle. If the response is not cached, the proxy moves on to routing.
Routing is done by rules the operator writes, matching the request’s host, path, or headers to a backend group. A request for example.com goes to the web servers, a request for api.example.com goes to the API servers, and a request for a path starting with /static/ goes to the file servers, with the proxy rewriting the path if the backend expects a different one.
The proxy then forwards the request to a backend chosen by its load balancing rule, which might be round-robin, least connections, or a hash of the client’s address, and it watches the backends’ health, removing any that stop answering and returning them when they recover. The backend’s response travels back through the proxy, which may cache it, compress it, and add security headers before sending it to the visitor.
TLS is handled at the proxy, which holds the site’s certificate and decrypts incoming traffic, then forwards it to the backends over plain HTTP inside the private network. That centralises certificate management: renewing a certificate means updating one proxy, not every server, and it lets the backends stay simple, since they never deal with encryption.
Security is enforced at the same point. The proxy can block requests that match attack patterns, limit how many requests one client may make, and hide the backends’ real addresses and software versions, which shrinks the attack surface to a single hardened machine instead of a whole fleet of servers.

Comparing reverse proxies with other gateways
A reverse proxy is one of several gateways a network can use, and each suits a different job. A forward proxy serves clients, a load balancer spreads traffic, and a CDN caches content around the world, but each has its own trade-offs.
The table below sets out the main contrasts between the leading approaches.
| Aspect | Reverse proxy | Forward proxy | Load balancer |
|---|---|---|---|
| Sits | In front of servers | In front of clients | In front of servers |
| Hides | The servers | The clients | The servers |
| Main job | Routing, caching, TLS | Filtering, anonymity | Spreading traffic |
| Sees | Incoming requests | Outgoing requests | Incoming requests |
| Best for | Websites and APIs | Controlling browsing | Scaling one service |
The practical result is that a reverse proxy is the right choice when one public face must serve many backends, a forward proxy wins when clients’ browsing must be controlled, and a load balancer is the choice when the only job is spreading traffic across identical servers.
Where reverse proxies are used
Websites are the largest use. Almost every large site runs a reverse proxy in front of its web servers, handling TLS, caching, and routing, which lets the site scale by adding backends behind the proxy without changing its public address, and lets it survive a backend failure without visitors noticing.
APIs use reverse proxies as gateways. An API gateway is a reverse proxy with extra duties: it checks authentication tokens, enforces rate limits, and routes each request to the right microservice, so that the services behind it can stay simple and trust that every request reaching them has already been checked.
Microservices use reverse proxies to hide their complexity. A system of dozens of services presents one public address, and the proxy routes each path to the right service, which lets teams deploy and scale services independently, without ever exposing their internal addresses to the internet.
Security teams use reverse proxies as a shield. A web application firewall, which is a reverse proxy with attack detection, blocks malicious requests before they reach the application, and because all traffic passes through one point, the team can see and control everything that enters the system.
Legacy systems use reverse proxies as a bridge. An old application that cannot handle TLS, or that runs on an address the public cannot reach, can be put behind a proxy that adds encryption and a modern address, which extends its life without rewriting it.
Strengths and limits
The greatest strength of a reverse proxy is control. All traffic enters through one point, so routing, caching, TLS, and security can be managed in one place, and the backends behind it can be changed, scaled, or replaced without anyone outside noticing, which makes the whole system easier to run.
It is also a strength that a reverse proxy improves performance. Caching serves popular pages without touching a backend, compression shrinks responses, and keeping connections open to the backends avoids the cost of setting them up again for every request, which together let a small fleet serve far more visitors.
The limits are real, though. The proxy is a single point of failure, so it must itself be made redundant, usually with two proxies and a shared address, and it adds a hop to every request, which costs a little latency. It also sees all traffic in plain text, which means it must be secured as carefully as the servers it protects.
Reverse proxy checklist
- Run at least two proxies, so one failure does not take the site down.
- Terminate TLS at the proxy, and renew certificates in one place.
- Cache what is safe to cache, and set cache headers deliberately.
- Health-check the backends, and remove any that stop answering.
- Hide backend details, such as software versions, from responses.
- Limit requests per client, so one abuser cannot starve the rest.
- Log at the proxy, since it sees every request that enters.
- Test the proxy’s failure, and check traffic moves to its partner.
- Keep the proxy’s software patched, since it faces the internet.
Frequently asked questions
What is a reverse proxy in simple terms?
A reverse proxy is a server that stands in front of a website’s real servers and receives all the visitors’ requests. It decides which server should answer each one, caches popular pages, handles encryption, and returns the answers, while the real servers stay hidden.
What is the difference between a forward proxy and a reverse proxy?
A forward proxy works for clients, fetching pages on their behalf and often filtering or hiding their browsing, while a reverse proxy works for servers, receiving requests on their behalf and routing them to the right backend. They sit on opposite sides of the connection.
Is a reverse proxy the same as a load balancer?
Not quite. A load balancer’s only job is to spread traffic across identical servers, while a reverse proxy also routes by path, caches responses, terminates TLS, and enforces security, so it does more, though it usually balances load as well.
Why do websites hide their servers behind a proxy?
To protect them, to manage them in one place, and to scale them. The proxy absorbs attacks, holds the certificate, and lets servers be added or removed without changing the public address, which is simpler and safer than exposing every server directly.
Does a reverse proxy slow a site down?
Slightly, because every request passes through one extra hop, but caching, compression, and connection reuse usually make the site faster overall, since popular pages are served from the proxy without ever reaching a backend.
When should I use a reverse proxy?
When a site has more than one backend server, when it needs caching or TLS in one place, or when it must hide and protect its servers. A single small site on one server can run without one, though many still use one for the security.
The bottom line
A reverse proxy explained in one line is this: one public door in front of many private servers, routing each request to the right backend, caching what it can, and keeping the servers themselves out of sight.
It is the gateway almost every large site depends on, and it shows how much simpler a system becomes when all of its traffic enters through a single, well-managed point.
This article is general information about how reverse proxies work, not advice about setting up a gateway for a particular site.







