- Test redirects on the staging environment first. This lowers the risk of going live with the wrong rules, but it does not replace a second test after go-live.
- The test compares plan with actual. Every old URL must point directly to its planned target with a 301, and the target must respond with 200.
- After go-live, you crawl the old URLs again and keep monitoring them. Only remove rules once logs and backlinks allow it.
In a migration, the redirects often decide whether rankings and visitors stay. If important URLs change and the old ones then lead nowhere or to the wrong target, the new website loses rankings and visitors. This guide shows how to check redirects before and after go-live.
Why should you test before go-live?
Before launch, the new website usually sits on a staging environment. That is where you set up the 301 rules and check them before real users and Googlebot see them. Errors you find here cost no traffic. You still need the test after go-live, because the server, CDN and configuration of the live environment can behave differently.
Preparing the redirect mapping
The mapping contains every old URL that will no longer exist after the migration, each with its new target. On very large websites you rarely manage this for every URL. In that case, the URLs that carry value come first.
| Source | Which URLs |
|---|---|
| Search Console | URLs with clicks and impressions |
| Web analytics, such as GA4 | Landing pages with visits from organic search |
| Rank Tracking | URLs ranking for your keywords |
| Backlink data | URLs with links from other websites, from Search Console, link databases and referral reports |
This list is worth it for small websites too. It shows which URLs must on no account return a 404 or redirect to the wrong place after go-live.
Which old URLs need a target?
Swap the live domain for the staging domain in all the URLs you collected and crawl the list. Every URL that does not respond with 200 on staging belongs in the mapping. Check the staging environment's 404 page first. If it is set up incorrectly, missing pages respond with 200 and you overlook them.
Ideally, the target of each redirect has the same content as the old URL. If there is no such page, use the page that serves the same search intent.
Avoiding redirect chains
A chain forms when one URL redirects to a second and that one to a third. Chains cost crawl resources and increase load time. According to Google, Googlebot follows up to 10 hops and then stops. For site moves, Google recommends keeping chains to three redirects where possible and in any case fewer than five. A direct jump is best.
- Always enter the full URL with protocol, domain and path as the target. Check that exactly this variant responds with 200.
- Have every variant of the old URL point directly to the target, meaning with and without www, http and https, with and without a trailing slash.
- Global rules such as http to https or non-www to www only apply after the 1:1 rules, so only for URLs without a rule of their own.
- Export all existing redirects. If one of them points to a URL that is now moving itself, enter the new target. In Excel or Google Sheets you can do this with VLOOKUP. Old rules that lead to error pages get a working target.
- Resolve existing chains. Every link in the chain redirects directly to the final target.
More on the status codes and their effect is in the guide 301 and 302 redirects.
Testing redirects on staging
The staging environment usually has its own domain or subdomain. For the test, you replace the domain in all source and target URLs of the mapping with the staging domain. Every old path there must point to the planned target with a 301, and the target responds with 200.
- Crawl the list of old URLs with the staging domain in your crawler's list mode.
- Match the status code and target of every URL against the mapping with VLOOKUP.
- Have deviations fixed and crawl the list again until every row is correct.
For spot checks, the terminal is enough. The command shows the status and target of a URL without following the redirect.
For a whole list, write each URL on its own line in a text file and output the result as a table.
| Old URL | Planned target | Status | Actual target | Result |
|---|---|---|---|---|
| /alte-kategorie/tisch/ | /moebel/tische/esstisch/ | 301 | /moebel/tische/esstisch/ | correct |
| /sale/stuhl-12/ | /moebel/stuehle/ | 302 | /moebel/stuehle/ | wrong code |
| /lampen/ | /leuchten/ | 301 | /leuchten | target without slash, creates a chain |
| /blog/alt/ | /ratgeber/ | 200 | – | rule missing |
Once all rules are correct, they usually go live with the website. You only replace the staging domain in the target URLs with the live domain.
Special case: domain change
For a domain change, you test the same way. However, the rules only sit on the new website during the test phase. At go-live they move to the old domain, because that is where the requests arrive. Every old URL then redirects directly to its counterpart on the new domain.
If redirects are implemented differently on the old and new platforms, you can also test on a staging environment of the old website. Then all you have to do at launch is switch the rules live.
A rule that only swaps the domain is quick to set up. As a first step before the 1:1 rules, it creates chains. Even as the last rule after all 1:1 rules, it does harm. Over the years, the old domain has collected many URLs that no longer exist or respond with 4xx and 5xx. The swap rule recreates all these URLs on the new domain. Better are as many 1:1 rules as possible, plus pattern rules for whole URL types. Whatever is left may go to the new homepage. Keep this remainder small, because lots of redirects to the homepage are also unfavorable.
After go-live: test, monitor, reduce
Right after launch, you crawl all old URLs from the mapping on the live domain. Each must point to its target with a 301, and the target must respond with 200. After that, you keep monitoring the old URLs regularly, because releases and new rules can break redirects again later.
Development teams often ask whether lots of redirects slow the website down. In a migration, the rule at first is the more old URLs redirect correctly, the better. Later, log files show which old URLs bots and users still request. Rules for URLs with no requests and no backlinks from other websites can then be dropped.
How long should redirects stay in place?
For site moves, Google recommends keeping redirects for as long as possible, generally at least one year. So decide after one year at the earliest, and only then based on logs and backlinks.
Common mistakes
- The staging environment's 404 page responds with 200. Missing pages go unnoticed in the test.
- Target URLs without protocol or with the wrong slash. Every rule creates an extra hop.
- Old redirects from earlier relaunches stay unchanged and point to URLs that now redirect themselves.
- With a domain change, the rules stay on the new domain and are missing on the old one.
- After go-live only the homepage is checked, and the list of old URLs goes untested.
FAQ
How do I test redirects before a relaunch?
Set up the rules on the staging environment, crawl all old URLs with the staging domain and match status code and target against your mapping.
Which URLs belong in the redirect mapping?
Every old URL that will no longer exist after the migration. On large websites, start with those that have clicks, organic visits, rankings and backlinks.
How do I find redirect chains?
A crawl of the old URLs shows every hop. In the terminal, curl -sIL shows every step of a URL. Every URL should reach a target with status 200 in a single jump.
How long do redirects have to stay in place after a move?
Google recommends keeping them for as long as possible, generally at least one year. After that, log files and backlink data help you decide.
Can I redirect all remaining old URLs to the homepage?
For a small remainder, that is acceptable. Before that, set up as many 1:1 rules and pattern rules as possible.
Sources
Retrieved on October 15, 2026. If something is out of date or missing, let us know.
- Google, HTTP status codes, network and DNS errors: https://developers.google.com/crawling/docs/troubleshooting/http-status-codes · As of 4 Feb 2026
- Google, Redirects and Google Search: https://developers.google.com/search/docs/crawling-indexing/301-redirects · As of 14 Apr 2026
- Google, Site moves with URL changes: https://developers.google.com/search/docs/crawling-indexing/site-move-with-url-changes · As of 20 Aug 2026
- RFC 9110, HTTP Semantics, Redirection 3xx: https://www.rfc-editor.org/rfc/rfc9110.html#name-redirection-3xx · June 2022
- curl, man page, --write-out option: https://curl.se/docs/manpage.html · Retrieved 15 Oct 2026