Nginx Redirect Generator

Create Nginx 301/302 page redirects plus HTTP → HTTPS and www / non-www rules.

Runs in your browser Free
Common rules:

Page redirects

Paths must start with /. Spaces, quotes, braces and semicolons are not allowed.

Processed locally in your browser.

Protect SEO during site migrations

When you change your URL structure, merge pages or move to a new domain, 301 redirects pass visitors and search engine signals from old addresses to new ones. The Nginx Redirect Generator prepares these rules without mistakes.

Generated rules

  • Per-page 301 or 302 redirects
  • HTTP to HTTPS redirect
  • www to non-www, or the other way round

Fast, safe configuration

Each redirect becomes an exact-match location block using return, which is fast and avoids regex surprises. Paths are validated so unsafe characters can't break the generated configuration.

How to use Nginx Redirect Generator

  1. Add old and new URL pairs.
  2. Choose the redirect type (301 or 302).
  3. Enable the HTTPS and www rules as needed.
  4. Add the config to your server block and test with nginx -t.

Why use this tool?

Create redirects that prevent ranking loss during migrations, without configuration errors.

FAQ

Should I use 301 or 302?

Use 301 (or 308) for permanent moves so search engines pass rankings along. Use 302 (or 307) for temporary situations.

Where should I add the configuration?

Inside the relevant server block; then test the syntax with nginx -t and reload.

Why are redirect chains bad?

Chains like A → B → C slow pages down and can lose signals; redirect old addresses straight to the final destination.

Related tools