Testing a Site Before Changing DNS
Retrospective web development exercise for the 2013 archive.
A hosting move is a good time to test a page that isn’t the homepage. Pick an old post, an image, and a route with a nested path. Make a list of the responses you expect on the new server before changing public DNS.
If you know the new server’s IP, use curl --resolve with your site’s hostname and HTTPS port to make a request directly to it. Check that TLS works and that the response is the expected page. Repeat the checks after the DNS change using the normal hostname, so you also test what visitors will get.