301 Redirect Generator

Turn a list of old and new URLs into redirect rules.

SEO Tools Free, no sign-up Runs in your browser

301 Redirect Generator tool

Separate the two with a comma, tab, pipe or spaces.

—

About the 301 Redirect Generator

Site migrations live or die on the redirect map. This tool takes a two-column list of old and new URLs and writes the rules in the syntax your server actually wants: Apache rewrite or redirect directives, nginx location or map blocks, Netlify _redirects, Vercel JSON, or Cloudflare bulk redirect format.

Before generating, it checks the map for the problems that cause outages. A redirect loop, where A points to B and B points back to A, makes a page unreachable. A chain, where A goes to B and B goes to C, works but loses a little signal and adds a round trip, so the tool offers to flatten chains so every old URL points straight at its final destination. Duplicate sources, where the same old URL appears twice with different targets, are ambiguous and get flagged.

You can choose between a 301 permanent redirect and a 302 temporary one. For a migration you almost always want 301, because it tells search engines the move is permanent and passes the ranking signal to the new address.

How to use the 301 Redirect Generator

  1. Paste your redirect mapOld URL and new URL per line, separated by a comma, tab or space.
  2. Choose your serverApache, nginx, Netlify, Vercel or Cloudflare.
  3. Review the warningsLoops, chains and duplicate sources are listed before you generate.
  4. Copy the rulesPaste them into your server configuration and test before going live.

Features

  • Apache, nginx, Netlify, Vercel and Cloudflare output
  • 301 permanent and 302 temporary
  • Detects redirect loops
  • Detects and can flatten redirect chains
  • Flags duplicate source URLs
  • Handles full URLs and relative paths
  • Copy or download the rules

Who uses this tool

The 301 redirect generator is used by writers, developers, students, marketers and anyone else who needs the job done once without installing software. Common cases include:

  • Migrating a site to a new URL structure
  • Redirecting retired pages to their replacements
  • Consolidating duplicate pages onto one address
  • Moving from one domain to another
  • Converting a redirect map between server formats

Frequently asked questions

When should I use 301 rather than 302?

Use 301 when the move is permanent, which is nearly always the case in a migration. It tells search engines to transfer the old address's signals to the new one. Use 302 only when the original will genuinely return, such as during a short campaign.

What is a redirect chain and why avoid it?

A chain is A pointing to B pointing to C. It works, but each hop adds latency and browsers give up after several. Flattening the map so every old URL points straight at its final destination is faster and more reliable.

What happens with a redirect loop?

The page becomes unreachable and the browser shows an error after a few hops. The tool detects loops in your map before you deploy them, which is considerably better than finding out in production.

Do redirects pass full ranking value?

A permanent redirect to a closely related page passes essentially all of it. Redirecting everything to the home page does not, because the destination has little to do with the original and search engines often treat such redirects as soft 404s.

How long should redirects stay in place?

At least a year, and longer if the old URLs still receive traffic or links. Removing them too early breaks every existing link to the old address.

Does this tool test the redirects?

No. It writes the rules. Test them on a staging environment before deploying, because a mistake in a rewrite rule can take a site offline.

If the 301 redirect generator is not quite what you need, these other free tools solve closely related problems.

.htaccess Generator

Generate .htaccess rules for redirects, caching, compression and security headers.

SEO Tools Use tool

Canonical Tag Generator

Generate canonical link tags, with hreflang alternates and common-mistake checks.

SEO Tools Use tool

URL Cleaner

Remove utm and click-tracking parameters, fragments and stray characters from URLs.

SEO Tools Use tool

Robots.txt Generator

Generate robots.txt with per-crawler rules, sitemap lines and common presets.

SEO Tools Use tool