DNS translates domain names into the addresses and services behind them. As a server admin you'll work with a handful of record types regularly.

The records you'll use

  • A — points a domain to an IPv4 address. example.com → 203.0.113.10
  • AAAA — the same, but for an IPv6 address.
  • CNAME — an alias pointing one name at another. www.example.com → example.com
  • MX — where email for the domain should be delivered.
  • TXT — free-form text, used for SPF, DKIM and domain verification.

Pointing a domain at your VPS

Create an A record for example.com pointing to your VPS's IP, and usually a CNAME (or second A record) for www.

Understanding TTL and propagation

TTL (time to live) controls how long records are cached. Lower it before a planned migration so changes take effect quickly. After updating a record, propagation can take from minutes to a few hours.

Get these five records right and you can host and route almost any service on your VPS.