Skip to content
CalDevSTUDIO
Paste a URL

301 redirects when you move or rebuild a site

By Dave Newman ·

When you rebuild or move a website, every old URL that's changing needs a permanent redirect to its closest new page. Google's guidance is to use server-side 301 or 308 redirects, map old URLs to new ones one by one, and keep the redirects in place for at least a year. Skip this and the rankings and links your old pages earned can disappear with them.

Here's how to plan the redirects, what to avoid, and how to check the work after launch.

What a 301 redirect does

A redirect tells browsers and search engines that a page has moved. A 301 says the move is permanent.

Google's page on redirects and Google Search explains the difference. Permanent redirects (301 and 308) "Show the new redirect target in search results." Temporary redirects (302, 303 and 307) are followed too, but Google doesn't treat the new page as the main one, so the old URL can stay in the results.

For a rebuild or a move, you almost always want permanent. Google says to use "a permanent server-side redirect whenever possible."

Two other kinds come up:

  • Meta refresh. An instant one is treated as permanent. A delayed one is treated as temporary.
  • JavaScript redirects. Google says to "Only use JavaScript redirects if you can't do server-side or meta refresh redirects," because Google may not see them if rendering fails.

When you need redirects

Any time a URL changes. Common cases:

  • A redesign that changes page addresses, like /our-services/plumbing becoming /services/plumbing
  • A platform move, like Wix or Squarespace to WordPress or Webflow
  • Combining pages, like five thin service pages merged into one strong one
  • A domain change
  • Moving from http to https, or from www to no www

We covered the bigger redesign picture in how to redesign your website without losing your Google rankings. This post is the redirect part in detail. If you'd rather hand it off, redirects are the core of our website migration service.

Step 1: list every old URL

You can't redirect what you don't know exists. Pull URLs from several places, because each one misses some:

  • Your current sitemap. Usually at /sitemap.xml.
  • Google Search Console. The Performance report shows pages that get impressions and clicks. The Pages report shows what's indexed.
  • Google Analytics. Pages that get visits, including ones not in the sitemap.
  • A crawl of the current site. A crawler tool finds pages linked from the site itself.
  • Backlink reports. Pages other sites link to. These are the ones you most need to keep.

Put them all in one spreadsheet and remove duplicates.

Step 2: map each old URL to a new one

Google's guide to site moves with URL changes says "It's important to map your old site's URLs to the URLs for the new site." Add a second column with the new URL for each old one.

Rules of thumb:

  • One to one where you can. The old plumbing page goes to the new plumbing page.
  • Closest match when pages merge. Five old service pages can all point to the new combined page.
  • Not everything to the homepage. Redirecting dozens of old pages to the homepage throws away their relevance. Visitors who clicked a link to a specific page land somewhere that doesn't answer their question.
  • Let truly dead pages go. A page for a discontinued product with no links and no traffic can return a 404 or 410. That's fine.

Step 3: avoid chains and loops

A chain is when page A redirects to B, which redirects to C. It happens when a site has been rebuilt more than once and nobody updated the old redirects. Each hop slows the visitor down. Point A straight to C.

A loop is when A redirects to B and B redirects back to A. The page never loads. Test for these before launch.

Step 4: put the redirects in the right place

Where redirects live depends on the platform:

Platform Where redirects go
WordPress A redirect plugin, or the server config for large sites
Webflow Site settings, under 301 redirects
Shopify The URL redirects screen in the admin
Squarespace Settings, URL mappings
Custom or Next.js The host or framework config

On a domain change, the redirects live on the old domain, so keep that domain registered and pointed at a server that can send them.

Step 5: update everything else that points to old URLs

Redirects catch people who arrive from outside. Inside your own site, you should fix the links directly. Google's site-move guide says to "Change the internal links on the new site from the old URLs to the new URLs."

Also update:

  • Your XML sitemap, so it lists only new URLs. Google says to "Submit the new sitemap in Search Console."
  • Canonical tags on each page
  • Your Google Business Profile website link
  • Links in email signatures, social profiles and directory listings
  • Ads, which may otherwise send paid clicks through a redirect or to a broken page

Step 6: test after launch

The day the new site goes live, check:

  1. A sample of old URLs, especially your top pages by traffic and links. Each should land on the right new page in one hop.
  2. That the response is 301 or 308, not 302. Free online header checkers or browser developer tools will show you.
  3. That nothing loops.
  4. Search Console's Pages report over the next few weeks, for new "not found" errors.

Expect some movement. Google says to "Expect temporary fluctuation in site ranking during the move," and that a medium-sized site can take "a few weeks or more" for the new URLs to settle in.

How long to keep redirects

Google's site-move guide recommends keeping them "generally at least 1 year," and notes that for visitors, keeping them indefinitely is better. Old links in emails, bookmarks and other sites don't go away. For a small business site, there's rarely a good reason to remove them at all.

If you change domains, the same applies to the old domain. Keep renewing it.

Mistakes we see

  • Launching before the map is done. Redirects get added in a rush afterward, after rankings have already dropped.
  • Temporary redirects by accident. Some tools default to 302.
  • Forgetting the PDFs and images. If other sites link to a menu PDF or a price sheet, those URLs need redirects too.
  • Dropping URL variations. Old URLs with and without a trailing slash, or with uppercase letters, may all need handling.
  • Letting the old domain lapse. Every redirect on it stops working the day it expires.

Get it done right

Our website migration service, from $1,500, moves your site to a new platform or domain with every old URL redirected so rankings carry over. If you're building a new site at the same time, redirects and search setup are part of our new website builds from $5,000. Not sure what shape your current site is in? An SEO audit from $750 will find existing chains, broken pages and indexing problems first. If you're still deciding on timing, how long it takes to build a website helps you plan around the launch.

Questions people ask

Do 301 redirects lose SEO value?

Google treats a permanent redirect as a strong signal that the new page replaces the old one. Mapping each old page to its closest new match is what keeps rankings carrying over.

Should I redirect old pages to my homepage?

Only if nothing closer exists. Sending many old pages to the homepage loses their relevance and confuses visitors. Map each one to the most similar new page.

How long should I keep 301 redirects?

Google recommends at least a year and says keeping them indefinitely is better for visitors. For most small business sites, there's no reason to remove them.

Send a URL. We'll show you what it could be.

Get the free PDF mock