When changing a site URL, first decide whether the material has a real successor. If a guide has moved, a permanent redirect gives readers a direct route to the new location. If the content no longer exists and there is no equivalent destination, an actual 404 with helpful navigation gives a more truthful result.
Test a moved path and a missing path
ByeGA4 serves the directory URL /tools/. The explicit path /tools/index.html redirects to that directory. A release smoke test can request the old form without following redirects, inspect the Location, then fetch the destination. Verify that the final URL returns 200 and points its canonical at the directory address.
Run another request for an invented path that was never published. The server should return 404 even if the body contains site navigation and looks polished. A 200 response for an error message makes automated release checks less reliable. Sending every missing URL to the homepage also makes it harder for visitors to understand what happened.
Check the audience's next action
List previously shared URLs separately from invented paths. For a merged guide, redirect only if the replacement answers the same purpose. Update the sitemap and internal links so subsequent requests can skip the old location. Keep a test for a sibling path if your rule matches a prefix.
Do not infer search results from the status code alone. Check what search services see after the new routing has been deployed. Retain the useful error page for people and monitor unexpected missing URLs before adding rules.
Read the response before following the redirect
Run these commands from a terminal. The header dump goes to standard output and the body is discarded. Keep the two requests separate so you can see both results.
curl -sS -D - -o /dev/null https://byega4.com/tools curl -sS -D - -o /dev/null https://byega4.com/tools/
In this release check, the first response was 301 with the trailing-slash URL as its Location and the second was 200. An invented path, /not-present-v31-audit/, returned 404. The first result tests URL normalization and the third tests missing-file behavior. If both requests redirect to the homepage on your own site, inspect broad redirect rules and application fallbacks before adding narrower rules. If the response is 404 only when you disable a service worker, also inspect its offline routing.
Test equivalence before preserving a redirect
Write down the old page's task and the proposed destination's task in one sentence each. If an old sitemap troubleshooting article becomes a broader troubleshooting guide with the same actionable sitemap steps, link to that replacement. If a discontinued tool has no replacement that can complete the operation, return a real 404 or 410 as appropriate and provide useful recovery links on the error page. Sending unrelated paths to the homepage makes it harder for visitors and crawlers to tell what happened.
For each changed route, record first status, Location and final status. Verify that an unrelated made-up path still returns 404, and that the replacement renders without a sign-in or challenge. Test one path with a harmless query parameter as well. If a query must survive the move, check that the final URL retains it exactly once.