Glossary

DNS Settings

DNS settings come in two kinds: the records in a domain zone that tell the world where your services live, and the resolver options that tell your own machine whom to ask when it looks a name up.

Which two sets of DNS settings matter on a server?

People use the phrase for two unrelated things, and mixing them up causes most of the confusion. The first set lives at your DNS provider: the zone for shop.example holds records saying that the bare name and www lead to your machine, that mail goes to a certain host, and so on. Those records are public and every visitor on the internet reads them. The second set lives on the box itself: a short list of recursive resolvers that the operating system queries whenever a program asks for an address. Changing one never touches the other. Moving a site to a new machine means editing the zone; fixing a server that cannot reach package mirrors usually means editing the resolver list.

What records point a domain at a dedicated machine?

For a website on one box with one IPv4 address, the minimum is small:

RecordExample valueJob
Ashop.example. 3600 IN A 203.0.113.44Maps the apex name to the server address
CNAMEwww 3600 IN CNAME shop.example.Makes www follow the apex automatically
MXshop.example. 3600 IN MX 10 mx1.mailhost.example.Names the host that accepts mail for the domain
TXT"v=spf1 mx -all"Publishes sender policy and verification strings
CAA0 issue "letsencrypt.org; validationmethods=dns-01"Names the only CAs allowed to sign certificates for this host, and how they must validate
NSns1.provider.example.Delegates the zone to its authoritative servers

Our machines come with one public IPv4 address on a /31 link, so the A record is the one that matters for hosting. A CNAME cannot sit at the zone apex next to other records, which is why the bare name gets an A record and www gets the alias. DNS provider explains who answers those queries.

What does TTL change in practice?

The time to live is how many seconds a resolver may keep an answer before asking again. A long value such as 86400 cuts query load and makes lookups slightly faster for repeat visitors. A short value such as 300 lets a change spread within minutes. The practical habit before a migration is to lower the TTL on the records you plan to edit a day in advance, wait for the old value to expire, switch the address, then raise the TTL again once the new box is settled. DNS propagation covers why some visitors still land on the old address for a while.

How does a Linux box decide which resolvers to ask?

On Ubuntu and recent Debian with systemd-resolved, the file /etc/resolv.conf usually points at a local stub at 127.0.0.53, and the real upstream servers are set per interface by netplan or in /etc/systemd/resolved.conf. On AlmaLinux and Rocky Linux, NetworkManager writes the file from the connection profile. Editing resolv.conf by hand works until the next reboot or network restart quietly overwrites it, so change the source instead:

# Ubuntu or Debian with systemd-resolved
sudoedit /etc/systemd/resolved.conf      # set DNS=9.9.9.9 149.112.112.112 under [Resolve]
systemctl restart systemd-resolved
resolvectl dns; resolvectl domain

# AlmaLinux or Rocky Linux with NetworkManager
nmcli -g name connection show --active
nmcli connection modify "System eno1" ipv4.dns "9.9.9.9 149.112.112.112" ipv4.ignore-auto-dns yes
nmcli connection up "System eno1"

Use the connection name your system prints; it often follows the interface name. If you prefer to run your own caching resolver, DNS resolver walks through the choice.

How do I check DNS settings from the shell?

Query the authoritative servers directly to see what the zone really says, then ask a public resolver to see what visitors receive:

dig +short NS shop.example
dig @ns1.provider.example shop.example A +norecurse
dig shop.example A @1.1.1.1 +ttlid
getent ahostsv4 shop.example

The first two lines read the source of truth, the third shows a cached copy with its remaining TTL, and getent follows the exact path your own programs use, including /etc/hosts. When the answers differ, the cached copy is old or the delegation points at the wrong provider. Our The dig command guide has more query patterns.

What else belongs in a tidy DNS setup?

  • Hostname consistency: give the box a name such as web1.shop.example with hostnamectl set-hostname, and publish a matching A record so logs and mail headers make sense.
  • SOA values: the serial and timers in the start of authority record control how secondary servers sync; DNS SOA record breaks them down.
  • A record for every service name: separate names for api, mail and admin let you move one service to a second machine later without touching the others.
  • Registrar lock and contact details: the zone is only as safe as the account that controls the delegation.

Once these records point at a new machine such as the S2 (Intel Xeon E-2356G, 64 GB DDR4, $58.39 a month), the site is reachable from all six cities' worth of visitors through the same address you published.

Single CPU Machines for Websites and Name Servers

ServerProcessorCores / threadsMemoryStorageNetworkPer monthSmallest order
S1Intel Xeon E-2276G6 / 1264 GB DDR41x 1 TB NVMe2x 10 Gbps$53.32$53.32 (1 month)
S2Intel Xeon E-2356G6 / 1264 GB DDR41x 1 TB NVMe2x 10 Gbps$58.39$58.39 (1 month)
S3Intel Xeon E-2356G6 / 1264 GB DDR42x 1 TB NVMe2x 10 Gbps$80.38$80.38 (1 month)
S6Intel Xeon E-2288G8 / 1664 GB DDR42x 1 TB NVMe2x 10 Gbps$89.92$89.92 (1 month)

Keep Reading

DNS provider

The service that hosts your domain's DNS records, how it differs from the registrar, and how to choose and set one up for a server.

Open

DNS resolver

The server that turns names into addresses for your machine, how recursive lookups work, and how to run a fast, private resolver on Linux.

Open

DNS propagation

Why a DNS change takes time to reach everyone, how TTLs and caches decide the delay, and how to plan a server move with almost no wait.

Open

The dig command

Query DNS precisely with dig: record types, short answers, specific resolvers, full delegation traces, reverse lookups and DNSSEC checks.

Open

FAQ

Quick Answers

Zone records live with whichever DNS provider your domain delegates to. You create an A record there pointing at the IPv4 address shown in your panel.

On most current systems that file is generated by systemd-resolved or NetworkManager. Edit resolved.conf or the connection profile instead, and the setting survives reboots.

Five minutes (300 seconds) is a common choice. Lower it a day early so caches holding the old long value have expired before you switch.

Not in standard DNS, because the apex already holds SOA and NS records. Use an A record there and a CNAME for www.

Query a public resolver, for example dig shop.example A @1.1.1.1. Querying the authoritative server with +norecurse shows what the zone itself contains.