Nginx Redirect Rule Tester
Simulate common server- and location-scoped Nginx redirect directives against one URL before testing the real configuration.
Paste a server block, location block, return rule, or rewrite rule to test common redirect behavior.
Test URL and Options
Use the URL you want to test against the Nginx redirect rules.
Test Output
Nginx redirect test output will appear here.
Testing Nginx Redirect Rules Before Deploying Them
Nginx redirects can be tricky because a small change in a return, rewrite, server_name, or location block can send users to the wrong page. A redirect that looks simple can also create a chain or loop when another rule runs after it.
The browser simulation focuses on redirect-producing return and rewrite directives. It keeps server_name, listen, and location scope in view, recognizes common 301, 302, 307, and 308 return redirects plus simple rewrite targets, but it still does not execute the full Nginx configuration engine.
A Browser-Side Tester, Not a Full Nginx Runtime
The simulation does not run Nginx. Includes, maps, runtime variables, named locations, every server-selection rule, and the complete rewrite phase cannot be reproduced faithfully in a browser parser.
Treat the result as a preflight check, then run nginx -t and exercise the deployed configuration before relying on the redirect in production.
Nginx documents the execution order and redirect behavior in the ngx_http_rewrite_module reference. That reference is the authority when this browser simulation and a real server disagree.
Example Nginx Redirect Rule
server {
listen 80;
server_name example.com www.example.com;
return 301 https://example.com$request_uri;
}