Redirect Rule Generator
Create clean, syntax-accurate 301 (permanent) and 302 (temporary) redirect rules for Apache (.htaccess), NGINX, Next.js (next.config.js), and Netlify/Cloudflare (_redirects). Preserve link equity and prevent 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 <IfModule mod_rewrite.c> RewriteEngine On Redirect 301 /old-blog/post-name /blog/post-name </IfModule>
Related Tools
[3 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
Live-generate HTML title, meta description, and canonical link tags for page heads.
SEO & MarketingAbout 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. A 301 Permanent Redirect informs search crawlers that a resource has definitively moved, transferring up to 99% of original link equity (PageRank) to the destination URL while updating index entries. A 302 Temporary Redirect instructs crawlers to maintain the original URL index while temporarily sending users to an alternate location. This tool generates production-ready redirect rules for all major hosting platforms and modern web frameworks instantly in your browser.
When should I use a 301 redirect instead of a 302 redirect?▾
Use a 301 (Permanent) redirect when a URL has permanently moved to a new destination to transfer search rankings and backlinks. Use a 302 (Temporary) redirect for temporary maintenance, A/B testing, or seasonal promotional pages.
Do 301 redirects pass SEO link juice and PageRank?▾
Yes. Google has confirmed that 301 redirects pass PageRank and link authority from the old URL to the new destination, making them essential for redesigns and domain migrations.
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.