Redirect Generator

Free redirect generator. Convert old→new URL pairs into Nginx, Apache .htaccess, Netlify or Vercel redirect rules with 301 or 302 codes, copy or download.

Built and maintained by Shehzad Munir ·

Redirect Generator
Loading Loading Redirect Generator
Share

Migrate URLs without breaking SEO

Turn a list of old→new URL pairs into ready-to-use redirect rules for Nginx, Apache .htaccess, Netlify or Vercel, with 301 or 302 status codes.

When you rename pages or move a site, old URLs need redirects so visitors and search engines land on the right place and link equity is preserved. Paste your old→new pairs, one per line, and this tool generates correct redirect rules for your stack, Nginx rewrite directives, Apache .htaccess Redirect lines, a Netlify _redirects file, or a Vercel vercel.json block.

Features

  • Nginx, .htaccess, Netlify & Vercel output
  • 301 permanent or 302 temporary
  • Bulk paste: one redirect per line
  • Copy or download the config file
  • Live rule count
  • Runs locally in your browser

How to use Redirect Generator

  1. 1

    Paste redirects

    Enter old and new paths, one pair per line.

  2. 2

    Pick your server

    Nginx, Apache, Netlify or Vercel.

  3. 3

    Choose 301 or 302

    Permanent or temporary redirect.

  4. 4

    Copy or download

    Grab the ready-to-use config.

Common use cases

  • Redirect old URLs after a site migration
  • Set up 301s when renaming pages
  • Consolidate duplicate URLs for SEO
  • Generate a Netlify _redirects file

Detailed guide

Choose the right status code

Pick 301 for permanent moves (the default for SEO, telling search engines to transfer ranking) or 302 for temporary ones. The output updates live and shows how many rules you've created. Copy it or download the correctly-named config file. Everything runs locally, so your URL structure stays private.

Where each redirect rule goes

Apache reads redirects from a .htaccess file in your site root, using Redirect 301 for single pages or RewriteRule for patterns, and needs mod_rewrite enabled. Nginx rules go in the server block of your site configuration using return 301 or rewrite, and take effect after you reload Nginx. Netlify uses a _redirects file or netlify.toml, and Vercel uses the redirects array in vercel.json. Always test a new rule on one URL before deploying it widely: a mistaken pattern can redirect your whole site, and browsers cache 301s aggressively, so test in a private window.

Redirect best practices for SEO

Point each old URL to its closest equivalent page rather than sending everything to the homepage, which Google treats much like a missing page. Avoid chains, where A redirects to B and B to C: update old rules so every legacy URL goes straight to its final destination. Keep redirects in place for at least a year after a migration, and longer if the old URLs have backlinks. After switching, update internal links and your XML sitemap to the new URLs so search engines don't keep crawling the redirects, and use Search Console to watch for 404s you missed.

Frequently asked questions

What's the difference between a 301 and 302 redirect?

A 301 is permanent and tells search engines to pass ranking to the new URL, use it for moved pages. A 302 is temporary and keeps ranking on the original URL.

Which servers are supported?

Four formats: Nginx rewrite rules, Apache .htaccess Redirect lines, a Netlify _redirects file, and a Vercel vercel.json redirects block.

How do I enter my redirects?

Paste them one per line as 'old-path new-path', separated by spaces. The tool parses each line into a rule and shows a live count.

Is it free?

Yes, completely free with no signup, running entirely in your browser.

How do I create a 301 redirect for htaccess or Nginx?

Enter your old and new URLs and pick a status code; the tool outputs ready-to-paste rules for Apache (.htaccess), Nginx and other hosts. Paste them into your server config to redirect the URLs.

Can I generate bulk redirects from a list?

Yes. Paste many old-to-new URL pairs (or import them) and it produces all the redirect rules at once for a site migration.

What is the difference between a 301 and 302 redirect?

A 301 is permanent and passes SEO value to the new URL; a 302 is temporary. Use 301 for migrations; the generator lets you choose the status code.

From the journal

All articles →