Build a two-name plan
This guide uses example.com for the root name and www.example.com for the www name. Replace both with your domain. It also uses 203.0.113.10 as a documentation IPv4 address; never paste that address into a real DNS zone.
A simple first website can use two records: an A record for the root pointing to the server's public IPv4 address, and a CNAME record for www pointing to the root domain. Choose one version as the canonical public address later, and redirect the other to it in the web server.
What each record means
Do not create an AAAA record simply because the form offers one. Use it only when the server has working public IPv6, the firewall allows it and the web service listens on it. A broken AAAA record can send some visitors down a route where the website does not respond.
Add the records
In the DNS provider's record table, create the following. Providers may display the root host as @ or leave it blank.
Type Host Value TTL
A @ 203.0.113.10 300 or Auto
CNAME www example.com 300 or Auto
Replace the IP and domain. A TTL of 300 seconds is convenient while setting up, but caches and providers can still make observed updates slower. After the site is stable, an automatic or longer TTL reduces repeated lookups.
Before saving, remove stale A, AAAA or CNAME records for the same host that point elsewhere. Do not delete MX or TXT records just because they look unfamiliar; they may support email or site verification. Export or screenshot the existing zone first.
Verify from outside the dashboard
The provider dashboard only proves that a form was saved. Query public DNS from your computer and, if possible, a second network.
dig +short A example.com
dig +short CNAME www.example.com
dig +short AAAA example.com
nslookup example.com
The A query should return your real public IPv4. The www query should show the chosen alias or ultimately resolve to the same address. The AAAA query should be empty if you intentionally do not use IPv6.
Common problems
If the old address remains, check which nameservers are authoritative with dig NS example.com. You may be editing a registrar panel while the domain actually uses another DNS provider. If only one network sees the old result, wait for cache expiration. If both old and new A records appear, remove the obsolete record instead of hoping clients choose the correct one.
DNS only maps names. A correct A record does not prove that Caddy is running, ports are open or HTTPS is ready. Test each layer separately.
Use your DNS provider's current instructions when labels differ. The Cloudflare DNS record reference is also a clear technical reference for A, AAAA and CNAME behavior.
What I learned
My first DNS mistake was editing the right-looking panel at the wrong company. The domain used external nameservers, so every change I made had no public effect. Since then I begin with dig NS, save the old zone, change one record at a time and verify from the command line rather than refreshing the browser for an hour.
Finish line
Both example.com and www.example.com should resolve through the intended nameservers to your server, with no accidental AAAA record. DNS is now ready; build a small HTML and CSS site locally before touching the production web directory.