Redirect Rule Generator
Create clean, syntax-accurate redirect rules for Apache (.htaccess), NGINX, Next.js (next.config.js), and Netlify/Cloudflare Pages (_redirects). Choose 301 or 308 for a permanent move and 302 or 307 for a temporary one, paste bulk lists of old and new URLs, and avoid 404 errors during site migrations.
Relative path on your current domain (e.g. /old-page)
Destination path (/new-page) or full URL (https://site.com/page)
# Apache .htaccess redirects (mod_alias, no mod_rewrite needed) Redirect 301 /old-blog/post-name /blog/post-name
Related Tools
[4 suggestions]UTM Link Builder
Live-generate URL tracking links with campaign source, medium, name, content, and term parameters.
SEO & MarketingRobots.txt Generator
Create valid robots.txt files with custom user-agents, allow/disallow paths, and sitemap directives.
SEO & MarketingMeta Tag Generator
Generate the HTML head tags for a page: title, meta description, canonical, robots, charset and viewport.
SEO & MarketingURL Slug Generator
Transform article titles into clean, URL-friendly and SEO-optimized slugs.
Case & FormattingGuides for the Redirect Rule Generator
- How to Set Up Bulk 301 Redirects for a Site Move
How to set up bulk 301 redirects for a site move: build the map, catch chains and loops, generate rules for Apache, NGINX or Next.js, and test every one. (November 23, 2026)
- 301 vs 302 Redirect: Differences, SEO Impact and Which to Use
301 vs 302 redirect explained: how Google treats each, what happens to POST requests, browser caching we measured, and ready-to-paste rules for four platforms. (October 24, 2026)
- Robots.txt Examples: Syntax, Rules and Mistakes to Avoid
Copy-ready robots.txt examples for allowing, blocking and wildcard rules, plus how the longest rule wins, what robots.txt cannot do and the mistakes to avoid. (October 15, 2026)
- URL Encoding Special Characters: Chart, %20 vs + and What to Encode
URL encoding special characters made clear: the full chart of reserved characters, %20 versus +, UTF-8 for accents and emoji, and how to avoid double encoding. (October 14, 2026)
About the Redirect Rule Generator
When migrating websites, updating URL permalink structures, or retiring obsolete pages, implementing proper HTTP redirect status codes is vital for search engine optimization and user experience. Google treats 301 and 308 as permanent redirects, a strong signal that the new URL should be the canonical one, and treats 302, 303 and 307 as temporary, which keeps the original URL in search results. The codes also differ for browsers: 301 and 302 may turn a POST request into a GET, while 307 and 308 keep the method and body. Apache gets a plain Redirect line, NGINX gets an exact location block with return, Next.js gets an exact statusCode (permanent: true would send 308, not 301), and the _redirects file uses plain lines that work on Netlify and Cloudflare Pages. Rules with spaces or characters that would break a config line are left out and counted. The tool also checks the whole list for the mistakes that break a site move: a page redirected to itself, a loop, a chain where one redirect leads into another, and a source listed twice, and it tells you which address to point at the final page instead. Google advises sending each old URL directly to its final destination. The Next.js output was run on a real Next.js server for all four status codes, and the map check was compared with a second implementation on 3,000 random maps. Everything runs in your browser.
When should I use a 301 redirect instead of a 302 redirect?▾
Use a 301 (Permanent) redirect when a URL has moved for good: Google then uses the redirect as a signal that the new URL should be the canonical one. Use a 302 (Temporary) redirect for maintenance, A/B tests, or seasonal pages, where the original URL should stay in search results.
What is the difference between 301 and 308, or 302 and 307?▾
Search engines treat 301 and 308 as permanent and 302 and 307 as temporary. The difference is the request method: with 301 and 302 a browser may change a POST into a GET, while 308 and 307 must keep the method and body. For links people click, the method does not change anything, because a click is a GET already.
Where do I put Apache redirect rules?▾
Paste Apache redirect rules into the .htaccess file located in the root directory of your web server (usually public_html or www), placing them above any default CMS routing blocks.
What is a redirect chain and why avoid it?▾
A chain is when one redirect leads to another, for example /a to /b and then /b to /c. Every hop is another request for a visitor and for a crawler. Google advises pointing each old URL straight at its final destination, so change /a to go to /c. The tool lists the chains, loops and repeated sources it finds in your list.