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.
# 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.
List every old address
Export them from your sitemap, Search Console or analytics, and put the new address next to each one.
Paste the list
Two columns from a spreadsheet, or one pair a line. Add your domain so full URLs on your site become paths.
Fix what it flags
Duplicates, redirects to themselves, chains and loops are caught. Chains are flattened to go straight to the final page.
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.
OpenSEO services
The 90-Day Lead Engine: rank higher in 90 days or less, or we work free until you do.
OpenRedirect Generator Questions
301 or 302: which redirect should I use?
How do I add 301 redirects in .htaccess?
Why RedirectMatch instead of Redirect?
What is a redirect chain?
How many redirects can I add?
Can it redirect to another domain?
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