Point a Domain to a VPS

The bread-and-butter support task: a customer bought a domain, we've got a server running their site, and now the two need to be connected. Here's the whole thing, click by click, with nothing assumed.

The whole idea in one line

A domain is just a name. A VPS is just a computer with an IP address. "Pointing" the domain means adding a DNS record that says "this name → that IP". That's it. Everything below is the careful version of that one sentence.

Before you touch anything — gather these 3 things

  1. The server's public IP address. Log into the VPS and run curl ifconfig.me, or grab it from the hosting panel. It looks like 203.0.113.10. This is the destination.
  2. Access to the domain's DNS. This is the part people get wrong — see the next section. You need to log in wherever the DNS is actually managed.
  3. Confirmation the site is actually running on the server. Visit http://203.0.113.10 (the raw IP) in a browser. If the site loads, great. If not, fix that first — DNS won't help a server that isn't serving.

Step 1 — Find out WHERE the DNS is managed

A customer might buy a domain at GoDaddy but manage its DNS at Cloudflare. If you edit records at GoDaddy while the domain uses Cloudflare's nameservers, nothing will happen — you edited the wrong place. Always check first:

dig NS thedomain.com +short

Whatever nameservers this prints is where you log in. Examples:

If you see…Manage DNS at…
ns1.cloudflare.comCloudflare dashboard
ns-xxx.awsdns-xx.comAWS Route 53
ns1.digitalocean.comDigitalOcean → Networking → Domains
ns01.domaincontrol.comGoDaddy DNS
the registrar's own nameserversWherever they bought the domain
This one check saves hours

"I added the record but it's not working" is, more often than not, records added in the wrong place. Run the dig NS check every single time — it takes five seconds and removes all the guessing.

Step 2 — Add the records

You need two records. In the DNS panel, create:

TypeName / HostValueTTL
A@  (means the bare domain)203.0.113.10 (your server IP)300 while testing
CNAMEwwwthedomain.com300 while testing

The A record makes thedomain.com land on the server. The CNAME makes www.thedomain.com follow the bare domain, so both spellings work.

What you just wired up
thedomain.com what customers type A record name → IP mapping (DNS) 203.0.113.10 the VPS
"@" and "www" explained

In a DNS panel, @ is shorthand for the bare domain itself (thedomain.com). www is the subdomain www.thedomain.com. If a panel asks for the "full name" instead, type the whole thing out — same result.

Using Cloudflare? Watch the orange cloud

Cloudflare shows an orange cloud (proxied) or grey cloud (DNS only) next to each record. Proxied routes traffic through Cloudflare — great for caching and hiding the server IP, but the site's visitors will see Cloudflare's IP, not yours, and you'll get SSL from Cloudflare. DNS only points straight at your server. For a first setup where you'll install your own SSL on the VPS, start with grey cloud (DNS only) to keep things simple, then turn on the proxy later if you want it.

Step 3 — Wait, then verify

Because you set the TTL low (300s), the change should be visible within a few minutes. Check it from your own machine:

# Should print your server's IP
dig +short thedomain.com

# And www should resolve too
dig +short www.thedomain.com

# Actually fetch the site over the domain
curl -I http://thedomain.com

When dig +short thedomain.com returns 203.0.113.10, the domain is pointed. If it still shows an old IP or nothing, give it a few more minutes, or check a public view at a site like dnschecker.org to see propagation around the world.

Step 4 — Add SSL (make it https)

The domain now works on http://. To get the padlock and https://, issue a certificate — but only after DNS is pointing correctly, because the certificate process verifies the domain by checking DNS or hitting the server over the domain. Full steps on the Add an SSL Certificate page. The short version on a typical Linux VPS with nginx:

sudo certbot --nginx -d thedomain.com -d www.thedomain.com

Step 5 — Tidy up

Once everything works, raise the TTL back to something normal (3600 or higher) so lookups stay fast and you're not hammering the DNS provider.

The whole checklist

#StepCommand / check
1Get the server IPcurl ifconfig.me on the VPS
2Confirm the site loads on the raw IPopen http://SERVER_IP
3Find where DNS is manageddig NS thedomain.com +short
4Add A record @ → IP (TTL 300)in the DNS panel
5Add CNAME www → @in the DNS panel
6Verify DNS points to the serverdig +short thedomain.com
7Issue SSL certcertbot --nginx -d ...
8Raise TTL back to 3600+in the DNS panel

When it doesn't work — quick triage

  • Domain shows nothing / old site. DNS not propagated yet, wrong nameserver edited, or browser cache. Re-check with dig +short and the DNS page.
  • Domain resolves to the right IP but the site won't load. That's a server problem, not DNS — check the web server and firewall on the "Site Not Loading" page.
  • SSL failing. Almost always DNS wasn't fully pointing when you ran certbot. Confirm dig first, then retry.