Free Redirect Rule Generator for nginx & Apache
Turn a list of old and new URLs into nginx, Apache .htaccess or Cloudflare Bulk Redirect rules, with chains and loops flagged before you deploy.
One rule per line: the old path, then a space, tab or comma, then the new path. Lines starting with # are ignored.
Cloudflare Bulk Redirects needs absolute URLs, so the origin is prefixed to any path you entered.
Biến đầu ra thành quy trình làm việc được giám sát
Không gian làm việc Novaverb thu thập dữ liệu website đang chạy của bạn, xác minh rằng các thẻ và tệp này thực sự được máy chủ trả về, theo dõi thay đổi theo thời gian và biến các phát hiện thành công việc được giao.
Redirect Rule Generator
Write the map once, get the rules for your server
Paste your old and new paths, pick the server you actually run, and the syntax is generated for you. nginx is offered first because its config is where most redirect mistakes are made - an .htaccess file has no effect at all on an nginx server, which is the single most common reason a redirect map appears to do nothing.
Which status code to use
Use 301 when the move is permanent and you want the old URL's ranking signals to transfer. Use 302 only when the old URL will genuinely come back. 307 and 308 are the strict versions: they keep the request method, so a POST stays a POST instead of becoming a GET. For ordinary page moves, 301 is the right answer.
Chains and loops are checked before the rules are written
If one rule's target is another rule's source, the visitor is sent through two hops and part of the link value is spent on the way. If two rules point at each other, nobody arrives at all. Both are reported above the output, with the exact URLs involved, so they can be flattened before the file reaches the server.
What this tool cannot tell you
- Whether the target URLs exist. Nothing here is fetched - a rule pointing at a 404 is generated exactly as written.
- Whether an old URL had traffic or links worth preserving. That comes from your own analytics and Search Console.
- Whether the rules are being served once deployed. Run the free HTTP Status & Redirect Checker against the old URLs afterwards - a generated rule is an intention, and only a live response is evidence.
Redirect Rule Generator Câu hỏi thường gặp
Why is nginx listed before Apache?
Because most modern hosting runs nginx, and because .htaccess rules are silently ignored on an nginx server - the file sits there looking correct while every old URL keeps returning 404. If you are not certain which server you run, check a response header or ask your host before choosing.
Should I use 301 or 302?
301 for a permanent move, which is nearly always what a site migration or a URL change is. 302 tells search engines to keep the old URL indexed because it is coming back, so using it for a permanent move leaves the old URL in the index and the new one without the signals it should have inherited.
What is a redirect chain and why does it matter?
A chain is when A redirects to B and B redirects to C. The visitor still arrives, but every hop costs time, some crawlers stop following after a few, and a little link value is lost at each step. Point A straight at C. This tool reports a chain as soon as one appears in your map.
Can I redirect a whole folder at once?
This tool generates one rule per URL, which is the safe default: a pattern that moves a folder can catch URLs you did not intend. If you do need a pattern, write it by hand in the generated file and test it against the URLs that must not match.
Does the query string survive the redirect?
Only if you leave the option on. With it on, the generated rules pass the original query string through to the target, which matters for tracking parameters and paginated URLs. With it off, the visitor lands on the clean target URL.
Is my redirect map uploaded?
No. The parsing, the chain check and the file generation all happen in your browser. A redirect map often describes an unreleased site structure, so nothing is sent anywhere.
Dữ liệu của tôi có được tải lên đâu không?
Không. Trình tạo này chạy hoàn toàn ở phía client, ngay trong trình duyệt của bạn. Không có nội dung nào bạn nhập được gửi tới máy chủ, vì vậy có thể dùng an toàn cho nội dung riêng tư.
Nó có thực sự miễn phí không?
Có, không cần tài khoản. Bạn chỉ cần một không gian làm việc Novaverb khi muốn xác minh, giám sát và theo dõi các tệp này trên website đang chạy của bạn theo thời gian.