Refiner Client sign inSign in Book a call
Website strategyAI search

How to plan and test redirects in a website migration

Redirects are where website migrations lose the most value. Here is how we built a map of every old address, chose the right response for each, and tested all 111 rules.

Cover for Refiner's guide to planning and testing redirects in a website migration: every old address mapped to its closest new page in a single hop

Redirects are where website migrations lose the most value. Every old address that people have bookmarked, shared or linked to needs to send them, and search engines, to the closest new page in a single step. Miss one and its visitors hit a dead end. Send it somewhere vague and its rankings may not follow.

When we moved our website from Lovable to Claude Code, we launched with 71 permanent redirects. In the days after, real traffic showed us gaps we hadn't planned for, and the site now has 111 redirect rules, every one of them tested. This guide is the process we would follow again. The rest of the move is in our Lovable to Claude Code migration guide.

In this article · 09 sections
  1. 01Build the list of old addresses
  2. 02Map each address to its closest page
  3. 03Choose the right response
  4. 04Catch the near misses
  5. 05Test every line
  6. 06Launch, then watch
  7. 07How long should I keep redirects after a migration?
  8. 08Should I use a 301 or a 308 redirect?
  9. 09Do redirects lose rankings?
01

Build the list of old addresses

You can't redirect what you haven't listed. Google's site move guide suggests gathering old URLs from your sitemaps, server logs, analytics, your CMS and the links report in Search Console. We added two more sources:

  • 01Search Console's page indexing report, which lists addresses Google knows about, including ones you have forgotten.
  • 02Your previous platforms. Our site had been on Wix before Lovable. Wix's old sitemap files, blog feed, member profiles and blog pages were still being requested years later.

If you are working in Claude Code, ask it to collect these into one list and remove duplicates. That list is your migration contract: every address on it must end up somewhere sensible.

02

Map each address to its closest page

For each old address, pick the new page that best answers the same need. An old service page goes to the new service page, and an old article to its new address. Google advises against sending lots of old addresses to one unrelated page, such as the home page, so don't make the home page a catch-all.

Some of these are judgement calls. Two of the redirects Lovable already had now go to our Insights section, because it didn't exist before and was the closest match. Claude Code can draft the map quickly, but check it yourself. You know which pages are close enough and which aren't.

03

Choose the right response

Each line needs a response code, and the choice matters:

ResponseWhen to use itWhat Google does
301 or 308, permanentThe page has moved for goodTreats it as a strong signal to use the new address
302 or 307, temporaryThe page will come backTreats it as a weak signal, and may keep the old address
410, goneYou removed the content on purposeTreats it like a 404: the page is dropped from the index
404, not foundThe address never existedDrops it from the index, and crawls it less over time
Which response to use for each old address, based on Google's documentation.

Google's documentation on HTTP status codes says it treats all 4xx errors except 429 the same way, so 410 isn't faster than 404 in Google. We use 410 for content we chose not to move, such as Wix's old tag pages, because it tells anyone reading the response that the removal was deliberate.

Send each address to its final page in one hop. Google's crawlers follow up to 10 redirects in a row, but every extra hop adds a delay, and chains are easy to break later.

Every old address should reach its closest new page in one permanent redirect. Never make the home page a catch-all.
Share this
04

Catch the near misses

A redirect list matches exact addresses. Real traffic doesn't. These three caught us out after launch:

  • 01Capital letters. Lovable treated /Services/Growth-Strategy and /services/growth-strategy as the same page. Cloudflare, our new host, doesn't. Our "Page not found" page now retries any address in lowercase.
  • 02Trailing slashes. Some of our own links ended in a slash, which cost every click an extra redirect. Fix your internal links rather than relying on redirects.
  • 03Files from the old platform. Images uploaded to Lovable had addresses of their own. We answer those with "gone", because the new site doesn't use them.

Check your host's analytics for "not found" responses in the first days after launch. We saw more than 500 in Cloudflare, and they pointed us to most of these gaps. The full list of what we fixed is in our post-migration checklist.

05

Test every line

Don't test a sample. Ask Claude Code to request every old address on a local copy of the site and report three things for each: the response code, where it ends up, and how many hops it took. Then ask it to fail loudly on anything unexpected.

We tested all 111 rules on a local copy of Cloudflare Pages before they went live. A second check caught three rules that broke on a trailing slash. Testing is the cheapest step in the whole migration, and it is where the expensive mistakes are found.

06

Launch, then watch

After launch:

  • 01Keep the redirects. Google recommends keeping them for at least a year, and keeping them indefinitely is better. They cost almost nothing.
  • 02Update your own links. Point internal links, and the most important links from other sites you control, straight at the new addresses.
  • 03Submit the new sitemap. Google suggests keeping a sitemap of the old addresses too, which helps you track the move in Search Console.
  • 04Expect movement. For a medium-sized site, Google says new addresses can take a few weeks or more to appear in results, and rankings may move around meanwhile.

Fix new 404s as they appear for the first eight weeks. A sitemap that tells search engines exactly what changed helps too. Our guide to llms.txt and sitemaps covers how we generate ours. If your old site was built in the browser, check what crawlers see on the new one, as our Lovable SEO guide explains.

A migration is a good time to fix your organic SEO foundations as well as move them. If you'd like help planning yours, book a call below.

07

How long should I keep redirects after a migration?

Google recommends at least a year, and says keeping them indefinitely is a good idea. Redirects are cheap to keep, and links to old addresses can carry on bringing visitors for years.

08

Should I use a 301 or a 308 redirect?

Either, for a permanent move. Google treats 308 the same as 301, so use whichever your host supports. Use a temporary 302 or 307 only if the old page is coming back.

09

Do redirects lose rankings?

Google states that 301 and other permanent redirects don't cause a loss in PageRank. Rankings can still move for a few weeks after a migration while Google processes the new addresses, which is why testing every redirect before launch matters.

Share the takeaway

“Redirects are where website migrations lose the most value. Map every old address, send each one to its closest new page in one hop, and test every line.”

Copy post gives you the takeaway and the link, ready to paste into LinkedIn.
Written byAlex Lawford, founderEvery article is written from the work itself: the briefs, the reporting runs, the conversations with sales teams.Meet the founder →
Cite this article

Lawford, A. (24 November 2026). How to plan and test redirects in a website migration. Refiner Agency. https://refineragency.com/insights/website-migration-redirects

Refinement consultation

Planning a website move?

Tell us what you're moving and where. On a 30-minute call, we'll look at your old addresses and the risks to your search traffic, and what to do first.

  1. 01Which old addresses carry the most value
  2. 02The redirect mistakes that cost rankings
  3. 03What to watch in the weeks after launch

Not ready for a call? Answer three questions and Alex will email you a view.