When a site moves host, platform or URL structure, each old URL needs a 301 straight to its new address. The usual failures are quiet: a 302 left in from testing, a chain of three hops through an old HTTP rule, a redirect that lands on the home page, or a new page that returns 404. Search engines and visitors both pay for those.
check_redirects.py reads a two-column CSV (old_url,new_url), requests every old URL without following redirects, then follows the chain itself and labels each row OK, CHAIN, TEMP, WRONG, NO-REDIR or BROKEN. It exits 1 if anything is not OK, so it can run in CI after a deploy. Standard library only, Python 3.8+.
python3 check_redirects.py redirects.example.csv