Nginx Redirect Generator
Generate Nginx redirect rules, per-page or sitewide www/https/trailing-slash canonicalization.
Processed locally in your browser. Nothing you enter is uploaded.
- Two modes: page-by-page redirects, or sitewide canonicalization.
- Canonicalization mode generates the `if ($scheme...)`/`if ($host...)` conditions for forcing one canonical host and scheme, instead of hand-writing them from an Nginx cookbook.
- Outputs `location` / `return 301` lines ready for a server block.
- Per-rule permanent (301) or temporary (302) choice in page-by-page mode.
- Runs in your browser.
Why this is private
- Processed locally in your browser. Nothing you enter is uploaded.
- Open your browser's DevTools → Network tab while using this tool — you won't see a request carrying your input, because it never leaves your device.
- Nothing you enter is uploaded to a server or shared with us — the processing happens entirely on your device.
Overview
Generates permanent/temporary rewrite rules for an Nginx server block — either page-by-page (the Nginx equivalent of an Apache .htaccess redirect), or a sitewide canonicalization rule (force HTTPS, www/non-www, trailing-slash consistency).
How to use it
- 1Pick "Page-by-page redirects" to map specific old→new paths, or "Sitewide canonicalization" for a host/scheme/slash rule.
- 2For page-by-page: add a row per redirect and choose permanent (301) or redirect (302) per rule.
- 3For canonicalization: toggle force-HTTPS, pick a www/non-www rule, and optionally a trailing-slash rule.
- 4Copy the generated block into your server configuration.
Frequently asked questions
What people use it for
Migrate URLs on an Nginx-served siteMap old paths to new ones after a restructure.
Force a canonical host or schemeSwitch to canonicalization mode to redirect `www` to bare domain (or the reverse) and HTTP to HTTPS in one generated block.
Retire pages cleanlySend removed URLs to a relevant replacement instead of a 404.
Keep old inbound links alivePreserve external links after a path change.
Related tools
All seo tools.htaccess Redirect GeneratorGenerate Apache .htaccess redirect rules, per-page or sitewide www/https/trailing-slash canonicalization.XML Sitemap GeneratorGenerate a sitemap.xml file from a list of your site's URLs, with lastmod, changefreq and priority.robots.txt GeneratorGenerate a valid robots.txt file for your site, starting from a WordPress, Shopify or other platform template.Meta Tags GeneratorGenerate title, description and Open Graph meta tags.
Ready to use Nginx Redirect Generator?
Nginx Redirect Generator