Skip to main content

Redirect Rules for Site Migrations

Learn how redirect rules protect traffic, preserve rankings, and keep old links working during a site migration.

SEO·7 min read·
Redirect Rules for Site Migrations

Redirect rules for site migrations are one of the easiest ways to protect a website when URLs change. If a page moves, gets renamed, or is replaced during a redesign, a redirect tells browsers and search engines where the new version lives. Without that step, old links can break, traffic can drop, and search engines may treat the new page like a fresh page with no history.

That is why redirects are not just a technical detail. They are part of the migration plan. A good redirect map helps visitors keep reaching the right content, helps search engines transfer signals, and helps your team avoid a long cleanup after launch. If you need to format the rules as you go, our Redirect Rule Generator can turn source and destination pairs into platform-specific output.

Redirect Rules for Site Migrations Start with a Simple Goal

The goal of a redirect is simple: send the old URL to the best new URL. The old page should not disappear into a dead end if there is a clear replacement. In most migrations, the best choice is a permanent redirect, usually a 301 status code. That tells browsers and search engines that the move is intentional and long term.

The key idea is relevance. Do not send every old page to the home page just because it is convenient. That creates a poor user experience and makes it harder for search engines to understand what happened. A product page should redirect to the closest matching product page. A blog article should redirect to the closest matching article. A category page should usually redirect to the most relevant new category page.

If there is no exact replacement, choose the nearest useful destination. The nearest match still preserves the user's intent better than a generic landing page. That matters because people often arrive through bookmarks, search results, social shares, or links from other sites.

What usually changes in a migration

Site migrations often involve one or more of these changes:

  • Domain changes, such as moving from one brand domain to another
  • Path changes, such as reorganizing /blog/ into a new content structure
  • Slug changes, such as renaming article URLs for clarity
  • Platform changes, such as moving from one CMS to another
  • Protocol changes, such as forcing all traffic to HTTPS

Each of those changes needs a redirect plan. The rules may look simple on paper, but the real work is matching old URLs to the right new ones before launch.

How Redirect Rules for Site Migrations Protect SEO

Search engines use links and historical data to understand which pages matter. When a page moves and the old URL keeps returning 404, that history becomes harder to preserve. A redirect gives search engines a path from the old location to the new one.

That does not mean every signal transfers instantly or perfectly. But a clean redirect is much better than leaving a dead page behind. It helps with:

  • Preserving link equity from external backlinks
  • Reducing crawl waste on broken URLs
  • Keeping indexed pages discoverable after launch
  • Preventing users from landing on error pages

This is also why redirect chains are a problem. A chain happens when old URL A redirects to URL B, then URL B redirects to URL C. Each extra hop adds delay and increases the chance of confusion. During migrations, your best practice is to point old URLs directly to the final destination whenever possible.

Common redirect mistakes

The most common mistakes are easy to describe and expensive to fix:

  1. Sending everything to the home page
  2. Using temporary redirects when the move is permanent
  3. Creating long redirect chains
  4. Forgetting old media files, PDFs, and attachment URLs
  5. Missing trailing slash or lowercase versus uppercase variants

Those mistakes are usually not the result of bad intent. They happen because migration work is often rushed. That is why a simple rule set and a clear mapping sheet are worth the time.

Build the Redirect Map Before Launch

The cleanest way to handle a migration is to build the redirect map before the new site goes live. Start by listing every important old URL and the best new destination for each one. Then group the list by page type so the work becomes easier to review.

For example, you might separate the list into:

  • Core pages
  • Blog posts
  • Category pages
  • Product pages
  • PDFs and downloadable files

That structure makes it easier to spot missing redirects. It also helps you decide whether a rule should be one-to-one or pattern-based. If your old blog URLs all used the same structure, a pattern rule may work. If your content was messy or inconsistent, individual mappings may be safer.

Pattern-based rules are useful when the URL change follows a clear logic. For example, if every old article moves from /posts/{slug} to /blog/{slug}, a single rule may cover many pages. But if a few URLs move to special destinations, those exceptions should be handled separately.

Test before and after launch

Testing is where many migration problems are caught. Before launch, check a sample of important URLs and make sure they land on the right destination. After launch, check again from the live environment. A rule that looked correct in staging can still fail because of server configuration, cache behavior, or an overlooked edge case.

It helps to test:

  • High-traffic pages
  • Pages with backlinks
  • Pages with non-ASCII characters
  • URLs with and without trailing slashes
  • Old URLs with query strings

If the migration is large, export the redirect list and review it line by line. It is slower than guessing, but it prevents the worst mistakes from slipping through.

Practical Patterns That Usually Work

Not every migration needs a custom rule for every single URL. A few patterns solve many common cases.

One page to one page

This is the safest pattern when the old page has a clear replacement. It is also the easiest to explain to non-technical stakeholders. The mapping is explicit, so there is little ambiguity.

Old directory to new directory

If an entire section moved, a directory-level rule may be appropriate. For example, an old documentation section might move from /docs/ to /help/. That can reduce the amount of manual work, but only if every page in the old directory should really go to the corresponding new path.

Old slug to new slug

When only the slug changes, the redirect can be narrow and precise. This is common after content cleanup, brand updates, or title improvements. The closer the match, the better the user experience.

Legacy campaign URLs

Sometimes old campaign pages, tracking URLs, or seasonal landing pages still get traffic. Those should usually redirect to the best evergreen page, not disappear. If they matter, they should be included in the migration list like any other page.

Use a Tool to Keep the Rules Clean

Large migrations are easier to manage when you stop writing syntax by hand. A small mistake in a redirect file can send users to the wrong place or break an entire batch of pages. That is why a generator can save time even for experienced teams. Our Redirect Rule Generator helps you turn mapping rows into cleaner output for Apache, Nginx, Netlify, and Vercel.

The tool is especially useful when you are translating the same mapping into different server formats. You may already know the destination logic, but each platform wants the rules written slightly differently. A generator keeps the structure consistent and reduces copy-paste errors.

It is also useful for handoff. When one person prepares the mapping and another person implements it, a clean export makes the process easier to review. That matters in migrations, because the launch window is usually tight and mistakes are expensive.

What Good Redirect Planning Looks Like

Good redirect planning is not flashy. It is organized, boring, and effective. The best plans usually include a complete mapping sheet, a tested rule set, and a clear understanding of which pages are most important.

If you only remember one thing, remember this: redirects protect the value of what you already built. They preserve user paths, reduce broken links, and help search engines understand that your new site is still the same site in a better location. When you approach the migration as a mapping problem instead of a syntax problem, the work becomes much easier.

Before you launch, review the old URLs one more time, test the destinations, and make sure the rules are direct. If you need a faster way to format the output, the Redirect Rule Generator is a simple place to start.