- Home
- SEO & Marketing
- Redirect Generator
Redirect Generator
Turn a list of old and new URLs into 301 or 302 redirect rules for Apache .htaccess or Nginx.
What it is for?What it is for?
A redirect sends visitors and crawlers from an old address to a new one. You need redirects when you rename pages, move a blog to a new path or merge two pages. Without them, old links and bookmarks end in a 404 and the ranking the old page earned is lost. This tool turns a list of old and new addresses into rules for Apache or Nginx.
Which status to use
Use 301 when a page has moved for good: search engines move the ranking to the new address. Use 302 while the move is temporary. Each rule matches the old path with or without a trailing slash, and a query string on the old side must match exactly. Apache rules need mod_rewrite. Nginx rules go inside the server block and are matched before location blocks.
308 is also permanent, but the client must repeat the request with the same method, so a form POST stays a POST. For ordinary page moves 301 is enough.
Input format
Write the old and the new address on one line. Lines that start with # are skipped. The new side can be a path on the same site or a full URL on another domain. For example, /old-page /new-page sends both /old-page and /old-page/ to /new-page.
Before you deploy
- Point each old URL straight at the final address. Chains of redirects slow pages down, and crawlers stop following after a few hops.
- Do not send many old pages to the home page. Search engines may treat that as a soft 404. Redirect to the closest matching page instead.
- Browsers cache 301 responses. If you are not sure yet, test with 302 first.
- Back up .htaccess or the Nginx config, then check a few old URLs with curl -I and look at the status and the Location header.
It stays in the browser
The rules are built in this tab. Your URL list is not sent to a server.