Nginx Redirect Generator
Build nginx rewrite and return rules from a redirect map.
Turn a list of old and new URLs into Apache redirect rules.
The .htaccess Redirect Generator turns a two-column redirect map into Apache rules, as plain Redirect directives or as RewriteRule lines with the regex characters escaped. It flattens redirect chains, finds loops before you paste them, and catches the unescaped dots and question marks that quietly match more URLs than intended.
Paste a two-column list of old and new URLs and the generator writes the Apache rules, either as simple Redirect directives or as RewriteRule lines with the regex characters escaped. Full URLs, paths and mixed input all work.
The checks matter more than the syntax. A redirect chain — A to B, and B to C — costs a hop and loses a little of the signal at every step, so the tool flattens them and tells you it did. A redirect loop takes a page down entirely, and those are found before you paste rather than after. Unescaped dots and question marks in a RewriteRule pattern quietly match more URLs than intended, and a rule redirecting a path to itself is an infinite loop Apache will happily serve until the browser gives up. Every one of those is checked here.
A to B and B to C becomes A to C, because every extra hop loses a little and Google stops following after about five.
A redirect that points back at itself takes a page down completely. Those are found before the file ships.
An unescaped dot in a RewriteRule matches any character, which is how one rule ends up redirecting ten pages.
Both are generated from the same map, so you can compare them and take whichever fits.
It says where in the file the rules go, since anything after a framework block is never reached.
One per line as "old URL, new URL" — commas, tabs or pipes all work.
Redirect for simple path swaps, RewriteRule when you need patterns or query strings.
Chains, loops, duplicates and unescaped regex characters are all flagged.
Put the rules near the top of the file, above any framework rewrite block.
Redirect is simpler and enough for a plain path-to-path move. RewriteRule is needed when you want to match a pattern, handle query strings, or apply a condition. This tool writes either, and defaults to Redirect because most redirect maps do not need more.
Google has said 301s pass full PageRank since 2016. What still costs you is chains — every extra hop is another redirect to follow, and Google stops following after about five. Point every old URL directly at the final destination.
301 for a permanent move, which is nearly always what you want in a migration: it consolidates signals onto the new URL and browsers cache it. 302 is temporary and keeps the old URL indexed, which is right for an A/B test or a seasonal page and wrong for everything else.
Near the top, above any framework rewrite block such as WordPress's or Laravel's. Those blocks end by routing everything to a front controller, and rules placed after them are never reached.
What people who use the .htaccess Redirect Generator think of it. Reviews come from visitors and are posted as written.
No ratings yet
Yours would be the first.
0 reviews
Newest first
No reviews yet
Be the first to rate the .htaccess Redirect Generator. It takes half a minute and no account.
Write the first reviewBuild nginx rewrite and return rules from a redirect map.
See how your title and description will look in Google results.
See your listing the way most people actually see it.
Decode tagged links and check the campaign naming holds together.
Cluster a keyword list into groups by the words they share.
Build a valid robots.txt with per-crawler rules in a minute.
Build the hreflang set for a page, with return links checked.
Split a page's links into internal, external, nofollow and broken shapes.