Start SEO check
  1. oen.de
  2. All tools
  3. Redirect Generator

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.
Server
One redirect per line, separated by a space. Old URL as a path (/page), new URL as a path or full address. With * at the end a whole directory is redirected.
Only needed for the www rule and Nginx, for example example.com.

.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