01 / HTTP
Read the response before changing the server
Start with one URL and one reproducible request. Record the status, response headers and request time. A browser may reuse cached content, so a command-line request is a useful second view.
curl --silent --show-error --max-time 10 \
--dump-header - --output /dev/null https://example.com/
This makes a GET request and discards the body. A HEAD request is shorter, but some applications handle HEAD differently. Keep the request method the same when comparing results.
| Response | Useful next check |
|---|
| 200 | Confirm the body and Content-Type match the intended page. |
| 301 / 302 / 307 / 308 | Inspect Location before following the redirect. |
| 404 | Check the URL, document root and deployed filenames. |
| 502 / 504 | Inspect the upstream connection and application logs. |
A successful status alone does not prove that the expected content was served. Check a recognizable sentence or asset as well.
02 / DNS & TLS
Separate name resolution from certificate checks
DNS tells a client where to connect. TLS checks whether that connection presents a trusted certificate for the requested hostname. Test these separately so one failure does not hide another.
dig example.com A +noall +answer
dig example.com AAAA +noall +answer
openssl s_client -connect example.com:443 \
-servername example.com -verify_hostname example.com \
-verify_return_error </dev/null
Compare A and AAAA answers, and inspect the TTL when an address has recently changed. Cached answers can remain visible until their original TTL runs out.
For TLS, check the hostname, trust chain and validity dates. The -servername value supplies SNI when a server hosts several names. Do not disable certificate verification as a permanent fix for a trust or hostname error.
03 / CACHING
Give HTML and versioned assets different lifetimes
HTML points to the current release. Revalidating it helps visitors discover changed asset URLs. Content-hashed CSS, JavaScript and images can be cached longer because a content change produces a new filename.
HTML
Cache-Control: no-cache
Content-hashed asset
Cache-Control: public, max-age=31536000, immutable
no-cache permits storage but requires validation before reuse. no-store asks caches not to store the response. They solve different problems.
Use long-lived immutable caching only when the URL changes with the content. Upload the new assets before publishing the HTML that references them, and keep older assets available during the transition.
04 / RELEASES
A small static-site release checklist
- Build the complete site into a new release directory.
- Open the main page and follow its navigation. Check images, styles and browser tools.
- Verify the web server configuration before reloading it.
- Switch the active release only after the files are complete.
- Request the page, a CSS file and a deliberately missing URL. Expect the last request to return 404.
- Keep the preceding release until the new one has been checked.
sudo nginx -t
# After a successful configuration check:
sudo systemctl reload nginx
Write down the release identifier and the checks you performed. A rollback is much easier when the previous files and configuration are identifiable.