Redirect Generator
Enter old and new URLs and copy the finished rules for Apache or Nginx. Ideal for a relaunch or migration. Everything runs in your browser.
Free
No sign-up
No tracking.
.htaccess
Then test with the Redirect Checker
What can the redirect generator do?
- Single redirects: one line per rule, with or without a trailing slash.
- Directories: with * at the end everything below is redirected.
- HTTPS and www: one rule for the preferred variant of your domain.
- Status codes: 301, 308, 302 and 307.
Frequently asked questions
301 or 302?
301 (or 308) for permanent moves so rankings and links carry over. 302 only for temporary redirects.
Where does the .htaccess go?
Into the web root. If one exists, put the rules at the top, before other RewriteRules (e.g. from WordPress).
Related tools
Redirect Checker
Follows redirect chains hop by hop and tests all http/https/www variants.
Open toolSSL Checker
Certificate, expiry, chain, TLS versions, HTTPS redirect and HSTS in one test.
Open toolXML Sitemap Generator
Crawls your website and builds a ready-to-use sitemap.xml with all indexable pages.
Open tool