Free Redirect Generator
Create exact-path redirect rules for Apache .htaccess and Nginx. Map old pages to their new destinations, detect potential migration issues, and export server configuration or a URL mapping CSV.
Redirect configuration
Enter the old site's scheme and hostname only, with optional port. Rules are for this one origin.
For example, preserve campaign tags when a visitor arrives at an old URL. This option applies to all rules.
Paste comma- or tab-separated rows, with optional header old_url,new_url,status. Use absolute HTTP(S) URLs or paths beginning with /. Source URLs must match the old origin. Paths are case-sensitive and trailing slashes are exact.
Supported paths use letters, digits, slash, hyphen, underscore, dot and tilde. Query-specific mappings, fragments, encoded paths, wildcards and regex are not supported.
Generated redirect rules
URL mapping preview
| Old path | Destination | Status |
|---|
How to implement redirects safely
Apache (.htaccess)
- Back up your existing configuration. Ensure mod_rewrite is enabled and AllowOverride permits rewrite directives.
- Copy the generated snippet into the document-root .htaccess for the old site, before WordPress or other catch-all rewrite rules. Do not overwrite your whole file.
- Scope the configuration to the old origin. Test on staging and check the HTTP response and Location header.
Nginx
- Back up your existing server configuration.
- Merge the exact-match location blocks into the appropriate old site's server block, avoiding duplicate locations. If HTTP and HTTPS or multiple hosts share a block, isolate the old origin first.
- Run
nginx -tand reload only after a successful configuration test. Test every important old URL.
Choosing the right status
301 and 308 indicate permanent moves. 302 and 307 indicate temporary moves. 307 and 308 preserve the request method; check application behaviour before redirecting forms or API endpoints.
For SEO migrations, use permanent redirects for permanently moved pages and map each page to a relevant destination.
Migration best practices
- Prefer direct redirects to final destinations.
- Update internal links and XML sitemaps.
- Do not redirect unrelated removed pages to the homepage.
- Check existing server rules and actual destination availability separately.
- Use
curl -Iandcurl -ILto inspect responses and chains.
Related tools: XML sitemap generator · Local SEO audit calculator
Official references: Google redirect guidance · Apache rewrite flags · Nginx return directive.