Nginx Redirect Generator
List old and new URLs to generate redirect rules for your Nginx configuration.
How it works
Add the location blocks inside the server block for your site, then test with nginx -t before reloading.
Why use it
Everything runs in your browser: nothing you type is sent to a server, so it is safe for client and unpublished work.
Frequently asked questions
Where do the rules go?
In the server block of your site’s configuration file, usually under /etc/nginx/sites-available.
Why use return, not rewrite?
return is simpler and faster for plain redirects.
Last reviewed 2026-11-25 · How we build and check our tools