ClicksBracket

Free 301 Redirect Rule Generator

Paste a list of old and new addresses, straight from a spreadsheet, and get redirect rules for Apache, Nginx, Next.js or Netlify, with the mistakes that break a migration caught first.

  • Apache, Nginx, Next.js and Netlify
  • Chains and loops caught
  • Free, runs in your browser

Separate them with a space, tab or comma; paste straight from a spreadsheet. Full URLs work too.

Type
Your rules
# 5 permanent redirects (Apache .htaccess)
RedirectMatch 301 ^/old-url/?$ /new-url
RedirectMatch 301 ^/services/seo-packages/?$ /seo-services/
RedirectMatch 301 ^/blog/2019/local-seo-tips/?$ /blog/local-seo/local-seo-tips/
RedirectMatch 301 ^/contact-us\.html/?$ /contact/

# Old addresses with a query string
RewriteEngine On
RewriteCond %{QUERY_STRING} ^id=7$
RewriteRule ^product\.php/?$ /products/roof-repair/ [R=301,L,QSD]

5 redirects, no duplicates, chains or loops.

Moving a whole site? Keep its rankings. See our SEO audit services

Redirect Rules Explained

A redirect sends visitors and search engines from an old address to a new one. Getting the type and the rules right keeps your rankings through a move.

301 permanent
The page has moved for good. Search engines pass its signals to the new address and swap it into their results. Google: Redirects and Google Search
302 temporary
The move is short term (a sale page, maintenance). Search engines keep the old address in their results.
Apache (.htaccess)
RedirectMatch matches each old path exactly, with or without a trailing slash, so /old does not also catch /old-news. Query strings use mod_rewrite. Apache: RedirectMatch
Nginx
A location block per path with return 301, pasted inside your server block. Old addresses with a query string are matched on the full request. Nginx: return
Next.js and Vercel
Objects for the redirects function in next.config.js, or the redirects list in vercel.json. statusCode sets 301 or 302 exactly. Next.js: redirects
Chains and loops
A chain sends A to B to C; a loop sends A to B and back. Chains waste crawl time and lose value; loops stop the page loading at all.

How to Set Up Redirects for a Site Move

Map, check, add, test.

  1. List every old address

    Export them from your sitemap, Search Console or analytics, and put the new address next to each one.

  2. Paste the list

    Two columns from a spreadsheet, or one pair a line. Add your domain so full URLs on your site become paths.

  3. Fix what it flags

    Duplicates, redirects to themselves, chains and loops are caught. Chains are flattened to go straight to the final page.

  4. Add the rules and test

    Paste the rules for your server, then check a few old addresses with our redirect checker: each should be one 301 hop.

When You Want It Done for You

A site move is where rankings are most often lost.

SEO audit services

The Revenue Leak Audit: every technical issue on your site, with the fix and what it costs you.

Open

Web design

Fast sites built on modern frameworks, live in 14 days.

Open

SEO services

The 90-Day Lead Engine: rank higher in 90 days or less, or we work free until you do.

Open

Redirect Generator Questions

301 or 302: which redirect should I use?
301 for anything that has moved for good: a new site, a renamed page, a merged article. 302 only for short-term moves you will undo.
How do I add 301 redirects in .htaccess?
Paste the Apache rules into the .htaccess file in your site's root folder, above any WordPress or framework rules, and save. They work at once.
Why RedirectMatch instead of Redirect?
Apache's Redirect matches the start of a path, so Redirect /blog also sends /blog-news and every post under /blog. RedirectMatch with ^ and $ matches only the exact address.
What is a redirect chain?
One redirect pointing to another: A to B to C. Each hop slows the page and search engines may stop following after a few. Point every old address straight at its final page.
How many redirects can I add?
As many as you need; thousands are normal after a migration. Server-level rules like these are faster than plugin redirects.
Can it redirect to another domain?
Yes. Put the full new URL in the second column. The old address must be on the site where you add the rules.

Want a Site That Is Fast, Accessible and Built to Rank?

Tools fix one thing at a time. A free website plan covers the lot: the pages you need, a copy outline, a fixed price and a launch date, live in 14 days.

  • The pages you need, and the one job each page does
  • What your current site loses, in leads and money
  • A fixed price and a 14-day launch date
  • An honest answer on whether you need a new site at all

Rather talk it through? Call +1 (217) 677-5905

Get your free website plan

We reply within one working day.

No contract, no sales pressure. The plan is yours either way.