Create ready-to-use redirect code for any URL.
100% free · No sign-up · No daily limits · No watermarks · Processed in your browser — files never leave your device
Redirect Generator: enter the source and destination paths, choose the supported format and review the generated rule. Build one rule or a whole set for a site move, in Apache .htaccess, Nginx and meta-refresh formats, with Exact, Prefix and Regex matching.
Prepare a permanent redirect from an old public path to its replacement: /old-page/ to /new-page/ as an Exact match produces a 301 rule in the format you picked, ready to paste into your configuration.
The generator writes rules in the syntax each server expects: Apache mod_alias/mod_rewrite lines for .htaccess, Nginx rewrite or return directives, and HTML meta-refresh or header snippets where server rules are not possible. Match types decide how much of the incoming path the rule compares — Exact compares the whole path, Prefix everything beginning with the source, and Regex a pattern you supply.
Exact changes one address only. Prefix moves a whole folder and keeps the rest of the path, so /blog/ to /articles/ carries the page name across with it. Regex matches on a pattern instead of a fixed path, and $1, $2 in the new URL are filled in from the parts the pattern captures. Start with Exact or Prefix unless you genuinely need a pattern.
Do not paste them straight into production. Server syntax differs, so generate the format for your server, test on staging first, and use the Checks section and the Test a URL box on this page — enter an address and see which rule matches and where it ends up. Watch especially for loops and for broad Prefix or Regex rules that catch pages you meant to leave alone, and point each exact rule straight at its final destination rather than chaining redirects.
Yes. Paste many rules at once, one per line in the form old, new, optional code, separated by a comma, tab or space. The site-wide options cover the common whole-site jobs for Apache and Nginx — force HTTPS, remove .html, the WWW choice, trailing slash, and moving to a new domain — and there is a 'Keep query string' option where the format supports it.
The tool is labelled 'Runs in your browser' and needs no sign-up, so you build the rules on the page rather than submitting your site structure to a service. The generated code still has to be added to your own server or site configuration by you — this page creates the code, it does not install or activate any redirect.
What is missing, broken, or could be better on this tool? Tell us — we read every suggestion.
✅ Thanks — your suggestion has been received. Suggestions like yours shape what we build next.