Saylor InnovationsSAYLOR INNOVATIONS

Home / Guides / Web & Domains

DNS, TLS and Deployment Triage

Web & Domains intermediate 8 min read Free to read · $0.01 via agent API Updated 2026-08-22

A hop-by-hop diagnostic for domain/hosting failures: authoritative vs recursive DNS, TLS/SNI verification with openssl and curl --resolve, distinguishing 502 (proxy reached, upstream failed) from 504 (timeout), and a worked apex-certificate-warning example.

A hostname is down, has cert warnings, or works at the provider URL but not at your custom domain. Trace it hop-by-hop — authoritative DNS, recursive resolution, TLS/SNI, reverse proxy, origin — instead of changing five settings at once.

Free to read here. AI agents can also fetch this guide directly over x402 for $0.01 — no account, structured JSON delivery.

Agent API →

Trace a broken hostname from authoritative DNS through certificate delivery, proxy routing, origin reachability, and application health.

The result you're building

A hop-by-hop proof showing which layer fails — authoritative DNS, recursive resolution, network reachability, TLS/SNI, reverse proxy, origin listener, or application — followed by one corrected configuration and external verification.

Use when: a hostname is down, intermittent, points to the wrong site, has certificate warnings, loops redirects, or returns a proxy error; a deployment works at its provider URL or localhost but not the custom domain; DNS or hosting was recently moved.

Not a substitute for: changing several DNS records, nameservers, certificates, and proxy settings at once; treating local resolver cache as proof of global propagation.

Before you change anything, collect: exact hostname, expected provider/origin, whether apex and www should both work; registrar and authoritative DNS provider; current A/AAAA/CNAME/TXT/CAA/nameserver records; hosting deployment status and origin health URL; certificate names/issuer/expiry and redirect expectations.

Stop before changing nameservers or deleting zones unless every required record — including mail, verification, and service records — is exported and a rollback path exists.

Understand the system first

  • DNS answers where to connect; TLS proves which server answered — a correct IP doesn't guarantee the right virtual host or certificate. Test DNS, TCP, TLS SNI, HTTP routing, and origin health as separate hops.
  • Authoritative truth and recursive cache can differ — query the authoritative server for current config, then multiple recursive resolvers for propagation. TTL limits caching but doesn't force instant refresh.
  • Proxy errors describe the hop that failed — 502 usually means the proxy got an invalid upstream response; 504 means it waited too long; a certificate name error occurs before application routing.

Evidence-to-decision map

EvidenceLikely layerFirst checkMeaning
NXDOMAIN / no answerDNSdig +trace HOST + authoritative queryMissing delegation/record, DNSSEC failure, or wrong zone owns it
Correct IP, wrong TLS name/issuerTLS/SNIopenssl s_client -servername HOST -connect HOST:443Wrong cert binding or traffic reaching an unintended server
TLS works, 404/wrong siteVirtual hostcurl -I --resolve HOST:443:IP https://HOSTProxy/site routing doesn't match Host or deployment
502/504Origin/proxyTest origin locally, inspect proxy logsListener, bind, protocol, timeout, or upstream name wrong
Only some users failCache/IPv6Compare A/AAAA across resolvers/networksStale answers, broken AAAA, split DNS, regional state

Step-by-step procedure

01 Record authoritative delegation.

dig +trace example.com
dig NS example.com +short
dig @AUTHORITATIVE_NS example.com A +noall +answer

If delegation and the dashboard disagree, correct registrar nameservers or operate at the authoritative provider.

02 Compare public resolution including IPv6.

dig @1.1.1.1 HOST A +short
dig @8.8.8.8 HOST AAAA +short
dig HOST CNAME +noall +answer

Remove AAAA only when IPv6 is intentionally unsupported and dependencies are checked.

03 Test TLS with the correct SNI.

openssl s_client -connect HOST:443 -servername HOST -showcerts </dev/null
curl -Iv https://HOST/

The hostname must appear in SANs and verification must succeed.

04 Force-route to distinguish DNS from hosting.

curl -I --resolve HOST:443:TARGET_IP https://HOST/
curl -IL --max-redirs 10 https://HOST/

Forced success + ordinary failure = DNS/cache. Both failing the same way = edge/vhost/app.

05 Test origin before proxy.

sudo ss -ltnp
curl -i http://127.0.0.1:PORT/health
sudo nginx -t
journalctl -u APPUNIT -b --no-pager | tail -n 100

Local failure = app/service. Local success + public 502 = proxy routing, permissions, or network boundary.

06 Verify externally, preserve mail/service records. Retest apex and www, IPv4/IPv6, redirects, TLS chain, core page, and email DNS records.

Worked example

www.example.com works but the apex shows a certificate warning after migration. Authoritative www CNAME points to the new host; the apex A record still points to the old server; the old server's cert excludes the apex; forced apex resolution to the new host serves the correct cert and site. Decision: the migration omitted the apex record. Fix: recorded the full zone and old apex value, changed only the apex to the documented target, queried authoritative then public resolvers as TTL expired, verified apex redirects once to the canonical HTTPS URL. Proof: both names resolve to the intended platform, present valid SAN coverage, and mail records are unchanged.

Verify, recover, hand off

Complete when: authoritative and public answers converge; A and AAAA both work (or unsupported records are absent); cert chain verifies with full SAN coverage; redirect chain is finite and correct; origin health and public request both succeed; email/verification records intact.

Rollback: restore exported DNS values when the intended edge doesn't serve the domain; keep the old deployment up through at least the max old TTL when practical; revert proxy config from the saved copy if validation fails before reload.

SymptomUsually meansNext move
Authoritative correct, laptop wrongRecursive/OS/browser cacheQuery a public resolver directly, wait TTL
A works, AAAA failsBroken IPv6 route or wrong AAAARepair IPv6 or remove unsupported AAAA after confirming deps
TLS valid but endless redirectsProxy/app disagree on scheme or canonical hostInspect forwarded headers, one canonical redirect owner
502 only through proxyOrigin protocol/port/bind/permission/timeout mismatchCompare proxy upstream with local listener and logs

Handoff record: domain, authority, intended DNS targets, saved original zone; A/AAAA/CNAME from authoritative and recursive; TLS subject/SAN/issuer/expiry/fingerprint; status/redirect/body results for normal/forced/local-origin tests; exact changed record/config, TTL, verification time, rollback value.

For agents

Inputs: hostname (FQN, no guessed apex/www relationship), expectedTarget (provider/IP/CNAME/origin/canonical URL), dnsEvidence (authoritative + recursive with timestamps), httpEvidence (TLS/headers/redirects/origin health/logs). Output: diagnosis, plan, verification, handoff. Same refusal/escalation/confidence rules as the series.

References

  • https://www.cloudflare.com/learning/dns/what-is-dns/
  • https://letsencrypt.org/docs/
  • https://nginx.org/en/docs/http/configuring_https_servers.html