Skip to main content

301 Redirect Rule Generator

Generate Apache or Nginx redirect rules for URL migrations, slug changes, deleted pages, and consolidation work.

redirects.txt

What is 301 Redirect Rule Generator?

A 301 redirect tells browsers and search engines that a URL has moved permanently. Good redirect mapping preserves user paths and search equity; bad mapping creates loops, soft 404s, or irrelevant destinations.

Map old URLs to the closest relevant replacement, avoid chains, and crawl the old URL list after deployment.

The generator runs in your browser, but the final output should still be checked against the target host, theme, plugins, cache layer, and deployment workflow before release.

How to Build Redirects That Preserve Traffic

  1. Export the old URL list from Search Console, analytics, crawl data, sitemap history, or the old CMS before changing the site.
  2. Map each old URL to the closest relevant new URL, not automatically to the homepage or a broad category.
  3. Normalize URL formats before generating rules: protocol, host, trailing slash, uppercase paths, query strings, and percent-encoded characters.
  4. Group exact one-to-one redirects before pattern redirects so broad rules do not catch important exceptions.
  5. Deploy the rules, clear caches, and crawl the old URL list to confirm every important URL returns one 301 hop to a useful destination.

Where This Helps Most

  • Moving a WordPress site from an old permalink structure to clean slugs without losing indexed URLs.
  • Consolidating thin posts, duplicate categories, tag archives, or old landing pages into stronger replacements.
  • Migrating between domains, subfolders, or www and non-www while keeping path-level mapping readable.
  • Preparing Apache or Nginx rules for a developer instead of handing over a spreadsheet with ambiguous URL pairs.

Mistakes That Create SEO Loss

  • Do not redirect every removed page to the homepage; irrelevant targets can behave like soft 404s for users and search engines.
  • Do not create chains such as old URL to temporary URL to final URL. Update rules so the first hop reaches the final destination.
  • Do not ignore query strings if filters, campaign pages, or product variants depend on them.
  • Do not mix Apache syntax into Nginx config or Nginx rules into .htaccess; the server type matters.

Validation Checklist

  • Test sample URLs from every pattern, including posts, pages, categories, uploads, uppercase paths, and URLs with query strings.
  • Confirm each old URL returns 301 once, then 200 on the final destination, without a loop or extra hop.
  • Check that destination pages are indexable and not blocked by noindex, robots.txt, canonical mistakes, or authentication.
  • Keep the redirect map after launch so future content cleanups do not accidentally remove migration rules.

Maintained and Reviewed

This page is maintained by Sheikh and the FyrePress Team. The guidance is written for developers who need to understand and verify generated output before using it on a real WordPress project.

To report an outdated assumption or unsafe edge case, use the Contact page and include the page URL, target environment, and expected behavior.

301 Redirect Rule Generator FAQs

Should old pages redirect to the homepage?

Only when the homepage is genuinely the closest replacement. Most old URLs should redirect to a matching post, page, category, product, or helpful parent resource.

How do I avoid redirect chains?

Update every old URL rule to point directly to the final live URL. After deployment, crawl the old list and fix any URL that needs more than one hop.

When should I use 410 instead of 301?

Use 410 when content is intentionally gone and there is no useful replacement. Use 301 when a relevant replacement exists and visitors should be sent there.