DNS translates a name such as mysite.com into an IP address. It is the first step in almost every VPS project: website, HTTPS certificate, game server reachable by name, email. This guide explains the useful records, how to change them without downtime, and how to check the result.
1. How DNS works
Each domain is managed by authoritative DNS servers, usually those of the registrar where you bought it, or Cloudflare's if you moved the domain there. You change records in that provider's interface. To find out which one manages your domain:
dig +short NS mysite.com
Resolvers, such as your ISP's or public services like 1.1.1.1, keep answers in cache for a duration set by each record: the TTL. This cache is what explains the famous propagation delays.
2. The useful records
| Type | Role | Example |
|---|---|---|
| A | Name to IPv4 address | mysite.com → 203.0.113.10 |
| AAAA | Name to IPv6 address | mysite.com → 2001:db8::10 |
| CNAME | Alias to another name | www.mysite.com → mysite.com |
| MX | Servers that receive the domain's mail | 10 mx1.mail-provider.com |
| TXT | Free text: SPF, DMARC, ownership checks | "v=spf1 include:... ~all" |
| SRV | Service with a port, for some games and protocols | _minecraft._tcp.play |
| CAA | Authorities allowed to issue certificates | 0 issue "letsencrypt.org" |
A CNAME cannot coexist with other records on the same name: you therefore cannot put one on the bare domain mysite.com, which already carries its MX and TXT records. Use an A record for the bare domain and a CNAME for www.
3. Point a domain to the VPS
In your provider's DNS interface, create or edit:
mysite.com. A 203.0.113.10
mysite.com. AAAA 2001:db8::10 (if your VPS has IPv6)
www.mysite.com. CNAME mysite.com.
Replace the addresses with your VPS's, shown in the client area. Depending on the interface, the bare domain is written @ or left empty. Only publish an AAAA record if the server really answers over IPv6: otherwise visitors on IPv6 will hit an error.
For a dedicated subdomain, such as api.mysite.com or play.mysite.com, simply add an A record on that name. Once the domain resolves, get the HTTPS certificate: see Nginx and Let's Encrypt.
4. Do not break your email
This is the most costly mistake when changing hosting: while editing the DNS zone, the MX and TXT records get deleted or replaced, and email stops arriving. Before any change, write down or export the full zone. Changing the site's address only requires touching the site's A, AAAA and CNAME records. For email authentication, see SPF, DKIM and DMARC.
5. SRV records for game servers
Minecraft Java reads SRV records: your players can type play.mysite.com even if the server listens on a non-standard port.
play.mysite.com. A 203.0.113.10
_minecraft._tcp.play.mysite.com. SRV 0 5 25570 play.mysite.com.
The four SRV values are the priority, the weight, the port and the target. The target must be a name with an A record, never an IP address. On the default port 25565, the SRV record is unnecessary. FiveM and Rust do not read SRV records: players connect with the name and port, for example connect play.mysite.com:30120. See also installing a Minecraft server.
6. TTL and propagation
"DNS propagation" is nothing more than caches expiring. If your record has a TTL of 86,400 seconds, i.e. one day, some visitors will see the old address for up to a day after the change.
The technique for a change without surprises: the day before, lower the TTL of the records involved to 300 seconds. On the day, caches expire within five minutes of the change. Once everything is stable, raise the TTL back to an hour or more. This is the method described in migrating a website to a VPS.
7. Check with dig
dig +short A mysite.com # what your resolver sees
dig +short A mysite.com @1.1.1.1 # what Cloudflare sees
dig +short A mysite.com @8.8.8.8 # what Google sees
dig A mysite.com @$(dig +short NS mysite.com | head -1) # the source, no cache
The last command queries the authoritative server directly: if it returns the new address, your change is saved and you only need to wait for caches. On Windows, nslookup mysite.com 1.1.1.1 gives the same result.
8. Reverse DNS
Reverse DNS does the opposite: it maps an IP address to a name. It is not set at your registrar but by the owner of the address, i.e. your hosting provider. It mainly matters for servers that send email directly. If you need it, ask support, or use the client area if the option is available there.
Frequently asked questions
How long does DNS propagation take?
It depends on the old record's TTL: from a few minutes with a 300-second TTL to 24 or 48 hours with a long TTL. Lower the TTL the day before a change so the switch is almost immediate.
Should both www and the bare domain point to the server?
Yes, both must resolve, then the web server redirects one to the other so there is a single official address. Create an A record on the bare domain and a CNAME from www to the bare domain, then get a certificate covering both names.
Why can't I put a CNAME on the main domain?
Because a CNAME cannot coexist with other records on the same name, and the main domain must carry NS and SOA records, often MX and TXT too. Some providers offer an equivalent called ALIAS or CNAME flattening.
Can I use a domain name for a FiveM server?
Yes: create an A record pointing to the VPS address, and players connect with connect followed by the name and port 30120. FiveM does not read SRV records, so the port must be given if it is not the default one.



