Home >BlogTest Redirects on a Staging Site Before You Move DNS OverPublished 2026/10/20Updated 2026/10/20How do I test redirects on a staging site before I move DNS over, so nothing breaks for real visitors? You test on a staging copy, keep the rules identical to production, and check every old URL against the staging hostname. Do that before the switch and the scary part — old links dying on launch day — mostly goes away.Can I test redirects on a staging site before going live?Yes, and it's the right place for it. Point staging at a copy of the database, keep the rules the same as what you plan to ship, then run the URLs against the staging host. Redirect rules evaluate the request path and host the same way on both, so what you learn there carries straight over.How do I build a redirect test plan for staging?Start from your live site, not from memory. Export the current URL list — pages, blog posts, product URLs, trailing-slash variants, HTTP-to-HTTPS entries, retired pages — and write the intended destination next to each one. That mapping is your checklist. Skip it and you'll find out about the dead links from users, not from the test.How do I run the redirects on the staging site?Request each old URL against the staging hostname and check three things: the HTTP status (301 or 308 for permanent moves), the Location header, and the final page that actually loads. A loop with curl -I handles this fine: curl -I -s -o /dev/null -w "%{http_code} %{redirect_url}\n" \ https://staging.example.com/old-page A correct rule returns 301 (or 308) with a Location pointing at the exact final URL. A 200 on a URL you meant to move, or a 404 where a redirect should exist, is a gap to fix before DNS moves.What status code should staging redirects return?301 for permanent moves, 308 when you need to keep the request method — mostly POST forms. For a normal content migration, 301 is the default. If staging returns 302 for a rule you intend as permanent, fix that difference rather than waving it off: search engines treat 301 and 302 differently, and the staging result is what production will do.How do I test HTTP-to-HTTPS and www rules on staging?Test them in pairs. First request the HTTP URL and confirm it lands on HTTPS, then request the www variant and confirm it hits the canonical host. Then do a chain pass: every old URL should reach its destination in one hop, not through three intermediate redirects. A chain technically works, but it slows the site and bleeds link equity.How is the staging test different from the live test?Two things differ. The hostname is different, so write the rules against the staging host while keeping paths identical. And staging often sits behind a firewall or basic auth — make sure your test tool sends whatever auth staging expects, or every request fails with 401 and tells you nothing.What should I do the moment DNS moves?Re-run the same checklist against the live hostname, in the same order, with the same URL export, and compare. If staging passed and live fails, the difference is usually a rule-ordering issue or a host-level rule that exists on only one server. Fix that specific rule, not the whole plan.Does testing redirects on staging protect my rankings?It protects what rankings depend on: the destination URLs staying reachable and the old URLs signaling the move with a 301. Staging catches broken targets before real users and crawlers hit them. It won't stop a traffic dip by itself — nothing will — but it removes the "we moved the site and half the links 404" failure mode entirely.What if my staging server doesn't have the redirect rules yet?Then you're testing a stub, not your real configuration. Apply the exact rules you plan to ship — same file, same order, same destination table — then run the checklist. The point of staging is running production rules in a safe place; a partial ruleset gives you a false green light.FAQCan I test redirects on a staging site before going live?Yes. Point staging at a copy of the database, keep the rules identical to what you plan to ship, and run the same URLs against the staging host. Redirect rules evaluate the request path and host the same way on both.How do I build a redirect test plan for staging?Export the current URL list from your live site — pages, blog posts, product URLs, trailing-slash variants, HTTP-to-HTTPS entries, retired pages — and write the intended destination next to each one. That mapping is the checklist you run against staging.What status code should staging redirects return?301 for permanent moves, 308 when you need to preserve the request method (mostly POST forms). If staging returns 302 for a rule you intend as permanent, correct it — search engines treat the two differently.How do I test HTTP-to-HTTPS and www rules on staging?Test them in pairs: HTTP to HTTPS first, then www to the canonical host. Then do a chain pass — every old URL should reach its destination in one hop, not through three intermediate redirects.What should I do the moment DNS moves?Re-run the same checklist against the live hostname with the same URL export and compare. If staging passed and live fails, the difference is usually rule ordering or a host-level rule that exists on only one server.