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.
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
- The server's public IP address. Log into the VPS and run
curl ifconfig.me, or grab it from the hosting panel. It looks like203.0.113.10. This is the destination. - 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.
- 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.com | Cloudflare dashboard |
ns-xxx.awsdns-xx.com | AWS Route 53 |
ns1.digitalocean.com | DigitalOcean → Networking → Domains |
ns01.domaincontrol.com | GoDaddy DNS |
| the registrar's own nameservers | Wherever they bought the domain |
"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:
| Type | Name / Host | Value | TTL |
|---|---|---|---|
A | @ (means the bare domain) | 203.0.113.10 (your server IP) | 300 while testing |
CNAME | www | thedomain.com | 300 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.
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.
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
| # | Step | Command / check |
|---|---|---|
| 1 | Get the server IP | curl ifconfig.me on the VPS |
| 2 | Confirm the site loads on the raw IP | open http://SERVER_IP |
| 3 | Find where DNS is managed | dig NS thedomain.com +short |
| 4 | Add A record @ → IP (TTL 300) | in the DNS panel |
| 5 | Add CNAME www → @ | in the DNS panel |
| 6 | Verify DNS points to the server | dig +short thedomain.com |
| 7 | Issue SSL cert | certbot --nginx -d ... |
| 8 | Raise 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 +shortand 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
digfirst, then retry.