Skip to main content
miji.be

Reverse Proxy

An intermediary server that receives requests from clients and forwards them to the servers behind it. It handles load balancing, SSL termination, and caching.

Oct 31, 2026 / About 1 min read

Redirect

A reverse proxy is an intermediary server that receives requests from clients, forwards them to one or more servers behind it, and returns the responses. Clients communicate only with the reverse proxy and are not aware of the servers behind it. Representative implementations include Nginx, HAProxy, and Envoy. RFC 9110 defines a gateway (also known as a reverse proxy) as an intermediary that acts as an origin server for the outbound connection and translates received requests and forwards them inbound to one or more servers.

The main functions of a reverse proxy are as follows. The first is SSL/TLS termination, which consolidates encryption / decryption in the proxy and reduces the load on the backend. The second is load balancing, which distributes requests across multiple backend servers and increases availability. The third is caching, which holds static content and frequently accessed responses and reduces requests to the backend. The fourth is security, which hides the IP addresses of the backend servers and implements WAF features and DDoS protection.

Reverse proxies are also used in the architecture of URL shorteners. One example is a configuration that, to handle large volumes of redirect requests, accepts requests with Nginx, keeps the redirect destinations of frequently used short URLs in a cache layer, and queries the backend database only on cache misses.

A point to watch in reverse proxy configuration is the proper handling of the X-Forwarded-For header. Because URL shorteners record the IP address a click comes from, the proxy needs to be configured to pass the client's real IP to the backend. MDN cautions that IP addresses in X-Forwarded-For other than those added by trusted proxies may be spoofed (as of July 2025). Tuning for high-traffic environments, such as support for HTTP/2 and HTTP/3, connection keep-alive settings, and adjustment of timeout values, also affects performance.

Was this article helpful?

Related Terms

Server-Side Redirect

A redirect handled by the web server before any page content is sent to the browser, using HTTP status codes like 301 or 302.

CDN

A network of geographically distributed servers that deliver web content from the location nearest to the user. Improves speed and reliability.

Edge Computing

A distributed computing model that executes processing at network endpoints geographically close to users, dramatically reducing redirect latency for short URLs.

Cache

A temporary storage mechanism that saves previously fetched data for faster subsequent access. Browser cache and DNS cache are common examples.

URL Rewrite

A server-side technique that internally maps a requested URL to a different resource without changing the URL displayed in the browser.

HTTP Status Code

A three-digit number returned by a web server indicating the result of a client's request.

Related Articles

How URL Shorteners Work - The Technical Side of Redirects

Discover the technical mechanics behind URL shortening: hash generation, database lookups, HTTP redirects, and more. Includes HTTP response examples and base-62 encoding calculations.

How Redirect Chains Impact Web Performance - Speed Optimization for Short URLs

Quantitative analysis of how short URL redirect chains affect Core Web Vitals and page load speed. Covers redirect hop optimization, edge redirects, and HTTP status code selection for maximum performance.

Self-Hosting a URL Shortener: Full Link Control

Explore the benefits and challenges of running your own URL shortening service. Covers open-source tools, serverless architecture, and cost-performance tips.

Put the terms to work

Shorten a URL for Free