Nginx & Apache Redirect Generator
Generate correct Nginx or Apache redirects for HTTPS, www canonicalization, domain migration, or a single URL — checked against real syntax rules for each server, including the differences between them.
About this tool
This generates the redirect rule only, not a full server config — pair it with your existing site config (see the config generator) rather than using it standalone. For the domain-migration case, remember the old domain still needs a valid SSL certificate for HTTPS requests to reach the redirect at all — an expired or missing certificate fails the TLS handshake before your server ever sees the request. See How to use ProxyForge for a walkthrough of every setting and where the output goes.
How it works
Pick Nginx or Apache, then choose what you're redirecting — HTTPS, www canonicalization, a domain move, or a single path.
Fill in the domain (or old path and new URL), and pick 301 or 302 — the rule updates live as you go.
Copy the result into your existing config, alongside the server block from the config generator, then test it (nginx -t on Nginx) before you reload.
Common errors: Nginx rewrite vs return 301: which to use · Apache Redirect 301 vs RewriteRule · Let's Encrypt renewal fails behind a redirect · ERR_TOO_MANY_REDIRECTS behind Cloudflare · nginx -t passes, nothing on port 443
Deploying this on a server?
A couple of things you'll likely need:
Some links above are affiliate links — signing up through them may earn this site a small commission at no extra cost to you. See the privacy policy for details.