Redirect Generator

Create SEO-friendly redirects for your website with proper server configuration

Choose 301 for permanent redirects (better for SEO) or 302 for temporary redirects

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

  1. Staging: sample old URLs return the expected status and final Location.
  2. No redirect loops; hop count is one to the final URL whenever possible.
  3. Assets, APIs, and admin paths still resolve without accidental catches.
  4. Internal links and sitemaps prefer the destination URL.
  5. Canonicals on destinations are self-referencing HTTPS preferred URLs.
  6. 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

Frequently Asked Questions

How long should I keep redirects in place?
For 301 redirects, keep them in place for at least 1 year, preferably longer. This ensures search engines and users who have bookmarked old URLs can find the new content. Monitor your logs to see when traffic to old URLs diminishes significantly.
Do redirects affect page speed?
Yes, redirects can add a small delay to page load times. This is why it's important to avoid redirect chains and update internal links to point directly to new URLs. However, the SEO benefits of proper redirects usually outweigh the minimal performance impact.
When should I use wildcards in redirects?
Use wildcards when you need to redirect multiple similar URLs or preserve query parameters. For example, when moving an entire section of your website or handling dynamic URLs. Be careful with wildcards as they can sometimes cause unexpected redirects.