Redirect Generator
Paste a list of old and new URLs — for a site migration or a renamed page — and get redirect rules for your server, with warnings for duplicates and redirect chains.
Result
List old and new addresses to generate redirect rules.
How to use this tool
- List one redirect per line: the old address, then the new one, such as
/old-page /new-page. Full URLs work for the old address. - Choose your server and the redirect type (301 for permanent moves).
- Copy the rules into the file shown in the notes.
How it works
Each old path is matched exactly, with or without a trailing slash. Apache rules use RedirectMatch (or RewriteCond and RewriteRule when the old address has a query string); Nginx uses location blocks with return; Netlify uses _redirects lines; Laravel uses Route::redirect. The tool warns when a target is itself redirected (a chain, which slows pages and wastes crawl budget) or when the same old address appears twice.
Example
Apache
/old-page /new-page becomes RedirectMatch 301 ^/old-page/?$ /new-page.
Privacy and limitations
- Everything runs in your browser; nothing you enter is uploaded or stored.
- Test redirects on a staging site first. Browsers cache permanent (301 and 308) redirects, so mistakes can stick.
- Laravel routes cannot match query strings; those rows are skipped with a warning.
Frequently asked questions
301 or 302?
Use 301 (or 308) when a page has moved for good — search engines transfer its ranking to the new URL. Use 302 (or 307) for temporary moves.
What is the difference between 301 and 308?
308 guarantees the request method is kept, so a form POST stays a POST. For ordinary page links they behave the same.