What Is a Reverse Proxy?

A reverse proxy sits in front of one or more backend servers, forwarding client requests to them and returning the response, while appearing to clients as if...

Published October 9, 2026

A reverse proxy sits in front of your servers, receives client requests and forwards them to the right backend, then returns the response. Nginx and HAProxy are common ones; they add TLS, caching, compression and load balancing.

The concept

Clients talk only to the proxy and never see the backend servers. This hides internal topology and centralises HTTPS and security rules.

A forward proxy acts for clients; a reverse proxy acts for servers.

Request path

HTTPSHTTPClientbrowserReverse proxyNginxApp serverNode :3000
The client only knows the proxy.

Practical examples

Nginx config

server {
  listen 443 ssl;
  server_name example.com;
  location / {
    proxy_pass http://127.0.0.1:3000;
    proxy_set_header Host $host;
    proxy_set_header X-Forwarded-For $remote_addr;
  }
}

Cache static files

location /assets/ { expires 1y; add_header Cache-Control public; }

Test

curl -I https://example.com

Common mistakes

  • Forgetting X-Forwarded headers so the app sees the proxy IP.
  • Not forwarding WebSocket upgrade headers.
  • Leaving the backend port publicly open.

Key takeaways

  • Proxy fronts your servers.
  • Handles TLS, caching, balancing.
  • Forward correct headers.

FAQ

Reverse proxy vs load balancer?

A load balancer is a reverse proxy that distributes traffic across several backends.

Reverse vs forward proxy?

Forward represents clients, reverse represents servers.

More General articles