HandyBench

Redirect Generator

Build .htaccess and Nginx redirect rules.

How to use the Redirect Generator

  1. 1 List your redirects, one per line, as "source target".
  2. 2 Choose Apache or Nginx and the redirect type (301 or 302).
  3. 3 Optionally force HTTPS or www, then copy the generated config.

Examples

  • Mapping old blog URLs to new ones after a redesign.
  • Forcing HTTPS and www across a whole domain.

Frequently asked questions

When should I use 301 vs 302?

Use 301 for permanent moves so search engines transfer ranking signals to the new URL. Use 302 only for temporary redirects you intend to reverse.

Where do I put the generated rules?

Apache rules go in a .htaccess file in your site root (or a vhost). Nginx rules go inside the relevant server block; reload Nginx after saving.

Related guides