- Free tools
- Redirect Rule Generator
FREE REDIRECT RULE GENERATOR
Redirect Rule Generator: clean 301 redirects
A free redirect rule generator. Add your old and new URLs, pick a redirect type, and get paste-ready rules for Apache .htaccess, Nginx, Netlify and Vercel - with loop and duplicate checks built in. No signup, nothing leaves your browser.
- 301, 302, 307 & 308
- Apache, Nginx, Netlify, Vercel
- No signup required
FORMATS
Your redirects
Generated in your browser. Nothing is uploaded.
Redirect rules
HOW IT WORKS
From a list of moved URLs to server-ready rules
When you move, merge or delete pages, old URLs need to point to the right new ones so visitors and link equity are not lost. This redirect rule generator writes the correct syntax for your stack, so you do not hand-edit config files. Find the URLs that need redirecting with the free site audit.
Add old and new URLs
Enter each old URL or path and where it should go. Add as many rows as you need - paste full URLs or just the path.
Pick the redirect type
Choose 301 for permanent moves, 302 or 307 for temporary ones. The status code is written into every rule.
Copy rules for your server
Switch to Apache, Nginx, Netlify or Vercel and paste the generated rules into your config, then deploy and test.
WHAT THIS TOOL GENERATES
The right redirect syntax for your stack
Every server reads redirects differently. One list of URLs becomes the correct rules for four of the most common setups, with the checks that stop broken deployments.
.htaccess directives
Clean Redirect directives with the status code, ready to paste into the .htaccess file at your site root.
location blocks
Exact-match location blocks using return, so any status code - 301, 302, 307 or 308 - works correctly.
_redirects file
The simple from to status lines for a Netlify _redirects file, also supported by Cloudflare Pages.
vercel.json array
A valid redirects array with source, destination and statusCode that drops into your vercel.json.
301, 302, 307 & 308
Choose permanent or temporary redirects, including the method-preserving 307 and 308 codes used for APIs and forms.
Loop & duplicate detection
The tool flags rules where the source equals the destination and duplicate source URLs, the two mistakes that break a redirect map.
GENERATOR VS HAND-CODING
Stop debugging redirect syntax at deploy time
A misplaced slash or the wrong directive can take a page offline. Generating the rules keeps the syntax correct and catches loops before they ship.
| What you get | This Generator | Hand-coding | Redirect plugin |
|---|---|---|---|
| Apache, Nginx, Netlify & Vercel | ✓ All four | One at a time | Platform only |
| Correct syntax per server | ✓ | Easy to break | ✓ |
| Loop & duplicate checks | ✓ | Manual | Varies |
| Runs in your browser, no signup | ✓ | ✓ | Account / install |
| Adds server load | No | No | Database lookups |
| Find URLs that need redirecting | ✓ With SiteAuditLint | Manual | No |
After deploying, always test a few redirects and watch for chains, where one redirect points to another instead of the final URL.
FAQ
Redirect rule generator questions
What is a redirect rule generator?
A redirect rule generator turns a list of old and new URLs into the redirect rules your server needs, formatted for Apache .htaccess, Nginx, Netlify or Vercel. You copy the generated rules straight into your config instead of writing the syntax by hand.
Is this redirect generator free?
Yes. It is free with no signup, and it runs entirely in your browser, so nothing you type is uploaded. To find the broken and moved URLs that need redirecting across a whole site, download the free SiteAuditLint desktop app.
What is the difference between a 301 and a 302 redirect?
A 301 is a permanent redirect and passes ranking signals to the new URL, so use it for pages that have moved for good. A 302 is temporary and tells search engines the original URL will return, which suits short-term changes like A/B tests or maintenance.
When should I use a 307 or 308 redirect?
307 and 308 preserve the HTTP method and body, so a POST stays a POST. Use 308 as a permanent redirect for APIs and forms, and 307 as its temporary equivalent. For ordinary page moves, 301 is still the standard.
Where do I put the generated rules?
Apache rules go in the .htaccess file at your site root. Nginx blocks go inside the relevant server block. Netlify rules go in a _redirects file at your publish root, and Vercel rules go in vercel.json. Reload or redeploy after adding them.
How do I avoid redirect chains and loops?
Always point an old URL straight to its final destination in one hop, not to another redirect. A loop happens when the source and destination are the same or point back to each other - this tool flags that case, but always test after you deploy.
Generate rules here. Find every URL that needs a redirect with SiteAuditLint.
Broken internal links, 404s and old URLs hide across a whole site. A crawl lists them all, so you can build a complete redirect map instead of missing pages.
Download SiteAuditLint