Free tools

301 redirect generator

Old URLs to new ones, as Apache, Nginx or Next.js rules. Free and no account. Nothing leaves your browser.

One pair per line. Separate with a comma or a tab, so two columns pasted straight out of a spreadsheet work. Full URLs are reduced to paths.

Server

.htaccess
# 301 redirects. Place in .htaccess at the document root.
<IfModule mod_rewrite.c>
  RewriteEngine On
  RewriteRule ^old-page/?$ /new-page [R=301,L]
  RewriteRule ^blog/2019/thing/?$ /blog/thing [R=301,L]
  RewriteRule ^legacy/?$ / [R=301,L]
</IfModule>

301 is permanent and is what passes ranking signals. Browsers cache it hard, so test on a staging host or in a private window. Getting a 301 wrong and then fixing it does not clear it from anyone who already followed it.

What it tells you

  • Three server formats

    Apache .htaccess, Nginx, or a Next.js redirects() block.

  • Finds redirect chains

    A to B where B also redirects. Chains dilute signals and Google stops following after a handful.

  • Finds loops and self-redirects

    Both make the page permanently unreachable, and both come from spreadsheet copy-paste.

  • Takes spreadsheet output

    Comma, tab or multi-space separated, with full URLs reduced to paths automatically.

How to use it

  1. 1

    Paste old and new URLs

    Two columns, straight out of the migration spreadsheet.
  2. 2

    Read the warnings

    Chains and loops are listed before you generate anything. Fix them in the source list, not in the rules.
  3. 3

    Pick your server and deploy

    Test on staging first — browsers cache a 301 aggressively, and a wrong one is hard to take back.

Questions people ask

301 or 302?

301 for a permanent move, which is what a migration is, and what passes ranking signals to the new URL. 302 says the original will return, so signals stay with the old URL. Using 302 for a permanent move is a common and expensive mistake.

Why do redirect chains matter?

Each hop loses a little and adds latency, and Google gives up following after roughly five. More practically, chains accumulate: a site on its third redesign often has URLs going through four hops to reach a live page. Always point the oldest URL directly at the final destination.

Should I redirect everything to the homepage?

No. A bulk redirect to the homepage is treated as a soft 404 and passes nothing. Map each URL to its closest equivalent; if there genuinely is not one, let it 410 or 404 honestly.

How long do I keep redirects?

At least a year, and indefinitely if the old URLs still have links pointing at them. Removing a redirect breaks every external link that ever pointed there, which is the value you were trying to preserve in the first place.

Other free tools

Want a tool like this on your own domain?

This page is the argument for the offer. A small useful utility gets embedded and linked, and every embed is a link back. kiterank builds one for your audience and hosts it on your domain, so the links accrue to you rather than to us.