Pointing your domain to your VPS: DNS step by step

Print
  • 0

The principle

A domain name does not "contain" your site: it indicates which server to contact. It is the A DNS record that links your-domain.com to the IP address of your VPS.

Step 1 — Get your VPS IP address

It appears in your client area, on your service details page, as well as in the deployment email.

Step 2 — Create the records

TypeNameValue
A@your VPS IP address
Awwwyour VPS IP address

The @ symbol refers to the domain itself. These two records cover your-domain.com and www.your-domain.com.

Step 3 — Mind the TTL

The TTL tells resolvers how long to keep the information. A low value (300 seconds) speeds up propagation when something changes; a high value (3600 and above) reduces DNS load but slows down any change. Before a migration, lower the TTL the day before.

Step 4 — Verify

dig +short your-domain.com
dig +short www.your-domain.com

Both commands must return your IP address. If the old value persists, wait until the TTL expires — propagation is not instant and can take from a few minutes to a few hours depending on the resolvers.

Common mistakes

  • A forgotten AAAA record: if your domain name has an old AAAA (IPv6) record pointing elsewhere, some visitors will end up in the wrong place. Delete it or update it.
  • Two competing A records: one for @ and an old one left at another hosting provider. The result is random from one resolver to another.
  • Editing the wrong DNS server: if your name servers point to your former hosting provider, editing the zone at the registrar will have no effect.

After DNS: the certificate

Once the domain is pointed, install a TLS certificate. On Linux, certbot issues and automatically renews a free Let's Encrypt certificate. Without HTTPS, browsers display a warning and search rankings suffer directly.


Was this answer helpful?

« Back