Skip to content

Test your real workload on 1 TB of free traffic, until December 11.Claim 1 TB free

What Is a Reverse Proxy?

A reverse proxy sits in front of web servers, forwards each client request to the right backend and returns the response. It handles load balancing, TLS termination, caching and security.

Shafayat HossainPublished 4 min read

Rayobyte is the proxy and scraping network priced for the AI era. We own our residential network and run heavy compute on bare metal, so Residential Proxies cost from $0.0095/GB.Start free trial

AI made it possible to use far more of the web than anyone collected before.Read the full thesis

On this page 6 sections
  1. How does a reverse proxy work?
  2. What is a reverse proxy used for?
  3. What is the difference between a reverse proxy and a forward proxy?
  4. Which software can act as a reverse proxy?
  5. How do you set up a reverse proxy with NGINX?
  6. Why do reverse proxies matter for web scraping?

Residential Proxies from $0.0095/GB.

We own our residential network and run heavy compute on bare metal, so collecting more costs less.

Start free trial

Free trial on self-serve products · No credit card

A reverse proxy is a server that sits in front of one or more web servers, receives every request from clients, forwards it to the right backend server and returns that server's response as if it came from the proxy itself. The HTTP standard calls it a gateway. Reverse proxies handle load balancing, TLS termination, caching and security.

Reverse proxy at a glance
Sits in front of Web and application servers
Works for The website or API owner
What visitors see The proxy's address, not the backend server's
Common jobs Load balancing, TLS termination, caching, compression, attack filtering
Common software NGINX, Apache HTTP Server, HAProxy, Caddy, CDNs

How does a reverse proxy work?

A reverse proxy works by taking the public address of a website, so every request reaches the proxy first and never touches the backend directly.

  1. A visitor's browser looks up the site's domain and connects to the reverse proxy's IP address.
  2. The reverse proxy reads the request and picks a backend server using its rules, such as the path, the hostname or the current load.
  3. The reverse proxy opens its own connection to that server and forwards the request, often adding a header such as X-Forwarded-For with the visitor's IP address.
  4. The backend server sends its response to the reverse proxy.
  5. The reverse proxy returns the response to the visitor, sometimes compressing or caching it first.

The HTTP standard, RFC 9110 (June 2022), names this role a "gateway" (also known as a reverse proxy): an intermediary that acts as the origin server for the outbound connection. Proxies on both sides can add a Via header to record the hops a message passed through.

What is a reverse proxy used for?

A reverse proxy is used to make a website faster, safer and easier to scale without changing the application behind it. The NGINX documentation lists these jobs:

  • Load balancing: the reverse proxy spreads requests across several backend servers and stops sending traffic to one that fails, as our guide to reverse proxy vs load balancer explains.
  • TLS termination: the reverse proxy decrypts HTTPS, so backend servers skip that work.
  • Caching: the reverse proxy stores responses and answers repeat requests without asking the backend, the same job a caching proxy does.
  • Compression: the reverse proxy shrinks responses, for example with gzip, to save bandwidth.
  • Security: the reverse proxy hides backend addresses and can limit connections or deny IP addresses during an attack.

What is the difference between a reverse proxy and a forward proxy?

A reverse proxy works for the website and sits in front of servers, while a forward proxy works for the user and sits in front of clients. RFC 9110 describes a forward proxy as an agent chosen by the client, usually through local settings. A reverse proxy is chosen by the website owner, and visitors rarely know it's there.

Reverse proxy Forward proxy
Deployed by Website or API owner User, company or scraping team
Sits in front of Servers Clients
Hides Backend server addresses The client's IP address
Typical uses Load balancing, TLS, caching, attack filtering Privacy, location testing, web scraping, content filtering
Examples NGINX, HAProxy, CDNs Residential proxies, datacenter proxies, corporate web proxies

Both are types of proxy server. Our guide to forward proxies vs reverse proxies compares them in more depth, and client-side types such as the transparent proxy and the HTTP proxy have their own guides.

Which software can act as a reverse proxy?

Most web servers and load balancers can act as a reverse proxy, and teams usually pick the one they already run.

  • NGINX: a web server that becomes a reverse proxy with the proxy_pass directive.
  • Apache HTTP Server: a web server that proxies requests through its mod_proxy module.
  • HAProxy: a dedicated TCP and HTTP load balancer and reverse proxy.
  • Caddy: a web server with a built-in reverse_proxy directive.
  • CDNs: networks that run reverse proxies in many locations close to visitors.

How do you set up a reverse proxy with NGINX?

You set up a reverse proxy with NGINX by adding a server block whose location passes requests to the backend with proxy_pass. This minimal config sends traffic for example.com to an app on port 3000 and passes the visitor's IP address along:

server {
    listen 80;
    server_name example.com;

    location / {
        proxy_pass http://127.0.0.1:3000;
        proxy_set_header Host $host;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    }
}

This config was tested with NGINX 1.24.0 in November 2026: the app behind it received the original Host header and the client's IP address in X-Forwarded-For. Run nginx -t to check the syntax, then sudo nginx -s reload to apply it.

Why do reverse proxies matter for web scraping?

Reverse proxies matter for web scraping because the server a scraper talks to is often a reverse proxy, not the website's application. Many large sites sit behind a CDN or a bot-protection reverse proxy that checks request rates, IP reputation and browser fingerprints before a request reaches the backend. When a scraper gets blocked, the reverse proxy usually made that decision.

That's why scraping teams run forward proxies on their own side. Spreading requests across many IP addresses keeps each address under the reverse proxy's rate limits. Rotating proxies change the IP address on every request, and residential proxies use IP addresses from home connections that look like ordinary visitors.

Share this post

// written by

Shafayat Hossain

Product Marketing Manager

Shafayat Hossain is the Product Marketing Manager at Rayobyte.

// faq

Frequently asked questions

Is a CDN a reverse proxy?

Yes, a CDN is a network of reverse proxies placed in many locations. Each CDN server receives visitors' requests for a website, serves cached copies of files when it has them, and forwards the rest to the site's origin server. Visitors connect to a nearby CDN location, which cuts load time and keeps the origin server's address hidden.

Does a reverse proxy hide my IP address?

No, a reverse proxy hides the website's servers, not the visitor. A reverse proxy works for the site owner, so it sees your real IP address and usually passes it to the backend in a header such as X-Forwarded-For. To hide your own IP address from websites, you need a forward proxy or a VPN on your side of the connection.

Is NGINX a reverse proxy?

NGINX is a web server that works as a reverse proxy when you configure it with the proxy_pass directive. In that role NGINX receives client requests, forwards them to one or more backend servers, and returns the responses. The same NGINX instance can also serve static files, terminate TLS and load balance across a group of servers.

Does a reverse proxy slow down a website?

No, a reverse proxy usually makes a website faster overall, even though it adds one extra hop. Caching lets a reverse proxy answer repeat requests without contacting the backend, compression shrinks responses, and TLS termination takes encryption work off application servers. A badly sized or distant reverse proxy can add delay, so teams place it close to their servers or users.

Collect more. Spend less.

The proxy and scraping network priced for the AI era.

// self-serve

Start in minutes

Every self-serve product has a free trial, and no credit card is needed.

Start free trial
// for teams

Talk to sales

Sales offers volume pricing below our published rates, custom plans and a direct line to the people who run the network.

Contact sales

AI made it possible to use far more of the web than anyone collected before. Read the full thesis