Redirect Generator
Create SEO-friendly redirects for your website with proper server configuration
Generated Redirect Code
Implementation Instructions
About URL Redirects
URL redirects automatically forward visitors and search engines from one URL to another. They're essential for maintaining SEO value when moving content, managing multiple domains, or handling outdated URLs.
Practical guide: rules you can ship to the server
What this is
This tool produces redirect rules (for example Apache or Nginx snippets) from the URL pairs you enter. Redirects tell clients and bots that a resource has moved temporarily or permanently. They consolidate users onto the canonical experience and pass most ranking signals when the move is truly permanent and the destination is equivalent or better. Generated snippets are starting points—review them like code before production.
When to generate redirects
- Site migrations, HTTPS cutovers, or folder reorganizations with known old→new maps.
- Retiring a product or article URL in favor of a successor page with similar intent.
- Fixing legacy PHP or parameter URLs toward clean paths after an IA cleanup.
- Collapsing accidental duplicates discovered in crawls or Search Console.
- Alongside canonical and sitemap updates—see robots / noindex / canonical and sitemap include/exclude.
When not to redirect
- Do not 301 everything to the homepage—relevance dies and users bounce.
- Avoid permanent redirects for truly temporary campaigns; use 302/307 and switch to 301 when the move sticks.
- Do not redirect away from URLs that should stay live with unique content; fix content or noindex instead.
- Skip wildcards you have not tested against admin, API, and asset paths.
- Never ship redirect rules without a rollback plan and staging verification.
How to use this generator
List old URLs on the left and final targets on the right, one relationship per row. Prefer direct 301 hops to the final URL—avoid A→B→C chains. After deployment, hit old URLs with a browser or curl and confirm status codes, Location headers, and that HTML still loads on the destination. Update internal links and XML sitemaps to point to the new URLs so crawlers stop depending on redirects for routine navigation.
Worked example
Blog migrates from /blog/2022/03/widget-guide to /guides/widget-setup. Map: one 301 from the dated path to the new guide. Also map the HTTP host and trailing-slash variants if they still answer. After deploy, curl shows HTTP/1.1 301 with Location: https://www.example.com/guides/widget-setup in a single hop. Internal “related posts” widgets are updated so they no longer emit the old path. Sitemap drops the dated URL and lists the guide (include/exclude guidance). A week later Search Console shows the old URL as redirected—expected. Soft 404s on forgotten tag pages get their own maps or intentional 410s, not a blanket homepage redirect. Hygiene context: technical SEO hygiene.
How to read the results
Match server context: Apache .htaccess differs from Nginx location blocks, and CDN edge rules differ again. Wildcards are powerful but easy to over-broaden—test edge cases like pagination and API paths. If you generate 302s for “temporary” campaigns, remember they do not consolidate the same way as 301s; switch to 301 when the move is permanent.
Common mistakes
- Redirecting everything to the homepage and destroying relevance.
- Loops and self-redirects that break crawls.
- Regex that catches admin or static asset paths and causes outages.
- Mixing HTTP and HTTPS without clarifying HSTS, yielding extra hops.
- Keeping redirects for years without cleaning internal links—wasted crawl budget.
- Leaving chains (A→B→C) because “it eventually works.”
QA checklist before and after deploy
- Staging: sample old URLs return the expected status and final Location.
- No redirect loops; hop count is one to the final URL whenever possible.
- Assets, APIs, and admin paths still resolve without accidental catches.
- Internal links and sitemaps prefer the destination URL.
- Canonicals on destinations are self-referencing HTTPS preferred URLs.
- Monitor 404/redirect spikes in logs and Search Console for 48–72 hours.
Related reading
SEO guide · Robots / noindex / canonical · XML sitemaps · Technical hygiene · Search Console checklist. Related tools: canonical URL, URL structure analyzer, broken link checker.
Before / after: homepage dump redirects
Before: During a rushed migration, unknown legacy paths were 301’d to the homepage. Users from old bookmarks bounced; Search Console showed soft consolidations onto Home for unrelated queries.
After: The team rebuilt a spreadsheet of top legacy URLs from analytics and logs, mapped each to the closest equivalent guide or category, and regenerated rules with this tool. Residual unknowns returned a custom 404 with search—not Home. Relevance and satisfaction metrics recovered within weeks.
301 vs 302 vs canonical
Use 301 when users and bots should permanently adopt the new URL. Use temporary redirects for short tests or maintenance windows, then convert or remove them. Prefer canonicals when both URLs must remain usable (for example, printable views) but one is preferred for indexing. Redirects move people; canonicals hint consolidation among live duplicates—pick the lever that matches the user journey. Document the choice per URL type so future migrations do not mix 302s and homepage dumps by habit; the SEO guide decision framing helps non-SEO stakeholders approve the map before launch day.
Types of Redirects
| Type | Use Case | SEO Impact |
|---|---|---|
| 301 (Permanent) | Content permanently moved, domain changes | Passes most SEO value |
| 302 (Temporary) | Temporary moves, A/B testing | Maintains original URL's SEO value |
Best Practices
- Use 301 redirects for permanent changes
- Redirect to relevant content to maintain user experience
- Avoid redirect chains to prevent performance issues
- Update internal links to point to new URLs
- Monitor redirects in Google Search Console