What is Reverse Proxy?
A reverse proxy sits in front of one or more web servers and accepts client requests on their behalf, then routes each request to an appropriate backend. Clients see a single public endpoint and do not connect to the origin servers directly. Reverse proxies provide load balancing, TLS termination, caching, and a natural place to run security filtering.
How a reverse proxy works
A reverse proxy is deployed on the server side. The site's public DNS records point at the reverse proxy, so every client connection lands there first. The proxy terminates the TCP connection and usually the TLS session, examines the request, and routes it to one of the backend servers over an internal network. The response returns along the same path, and the client is not told the backend's real address.
This position makes the reverse proxy the natural place for cross-cutting features: load balancing across multiple application servers, caching of static assets, compression, TLS certificate management, and request filtering. Content delivery networks are reverse proxies distributed across many locations, answering each user from a nearby point of presence and fetching from the origin only when the cache misses.
Why reverse proxies matter for scraping
Nearly every high-value scraping target sits behind a reverse proxy or CDN, which means the first system your requests meet is not the website's application at all. Bot detection, rate limiting, IP-reputation checks, and JavaScript challenges typically run at this edge layer, and a block or challenge page can be served without a single request reaching the origin server.
Understanding this layer helps you interpret errors. A 403 returned instantly usually means the edge filtered you based on IP or fingerprint. A 502 Bad Gateway or 504 Gateway Timeout means the reverse proxy accepted your request but could not get a timely answer from the backend — a server-side problem rather than a block. Knowing which layer responded tells you whether to change proxies or simply retry.
Practical notes and common misconceptions
Forward and reverse proxies are mirror images: a forward proxy represents the client and hides it from servers, while a reverse proxy represents the server and hides it from clients. You configure a forward proxy in your own tooling; you encounter reverse proxies as part of the websites you visit, without any configuration on your side.
The IP address a domain resolves to is often the reverse proxy's, not the origin's. Latency measurements, geolocation lookups, and blocking decisions based on that IP describe the edge network — commonly a CDN's — rather than the servers actually generating the content.
Reverse Proxy, answered
Why do I get 502 Bad Gateway errors when scraping?
Is a CDN the same as a reverse proxy?
Related terms
Theory covered. Now route something. Start free.
Residential, ISP, mobile and IPv6 networks under one account — test the concepts on real infrastructure.