Skip to content
Bold PilotBold Pilot

Redirect Rules Generator

Old URLs in, server rules out — with loops and chains caught first.

One rule per line: the old path, then the new path or full URL. A third value overrides the status for that line.

Status

1 temporary redirect (302). Temporary redirects tell Google to keep the old URL indexed. For a permanent move, use 301 or 308.

4 rules, no loops or duplicates. Every source is a path, every destination is reachable, and no URL is redirected twice.

.htaccess

# Needs mod_alias (on by default). Put these in .htaccess or the vhost config.
RedirectMatch 301 ^/old-blog/seo-tips/?$ /blog/seo-tips
RedirectMatch 301 ^/pricing-2023/?$ /pricing
RedirectMatch 301 ^/about-us\.html/?$ /about
RedirectMatch 302 ^/summer-sale/?$ https://example.com/sale

Writing the rules is half of it. Check they behave once live.

Paste a migrated URL into the Redirect Checker to follow it hop by hop.

Try Bold Pilot

Technical SEO guide

A redirect list is a migration plan. Check it before the server does

A site move, a URL cleanup or a new blog structure all end the same way: a list of old addresses and where each one should go now. Turning that list into server rules by hand is where the mistakes creep in. One rule sends a page to itself, another undoes an earlier one, and a third points at a page that is itself redirected. This tool writes the rules for four common setups and flags those mistakes first.

What it catches

  • Loops — /a to /b and /b back to /a, which the browser gives up on with "too many redirects".
  • Chains — /a to /b to /c. It works, but every extra hop slows the visitor and dilutes what the crawler passes on.
  • Duplicate sources — the same old URL listed twice with different destinations, where the server decides which wins.
  • Self redirects, sources that are not paths, and destinations that are neither a path nor a full URL.
  • Temporary codes — a 302 or 307 on a move that is meant to be permanent keeps the old URL in the index.

Which status code to use

Use 301 or 308 for a permanent move: both tell Google to replace the old URL with the new one. 302 and 307 are for something temporary, like a seasonal page. The difference between 301 and 308 is that 308 keeps the request method, which only matters for form submissions.

What each output does

  • Apache — RedirectMatch with an exact pattern, so /old does not also catch /older or /old/anything.
  • Nginx — an exact location = block per rule, for your server config.
  • Vercel — the redirects array for vercel.json, with the exact status code.
  • Netlify — one line per rule for a _redirects file.

After the rules are live

Run a few of the old URLs through the Redirect Checker to confirm each one lands on its final page in a single hop, then update internal links so nothing on your own site still points at an old address.

Frequently asked

Do I redirect every old URL?

Every one that had traffic, backlinks or rankings. Redirect each to its closest equivalent, not all of them to the home page, which Google tends to treat as a soft 404.

Why are Apache rules exact matches?

The plain Redirect directive matches by prefix, so one rule can quietly catch URLs you never listed. An exact pattern does only what the list says.

Is my list sent anywhere?

No. The rules are generated in your browser as you type.