---
title: "Point a domain to your server with A and AAAA records · CloudSat"
description: "Point a domain at a VPS: A and AAAA records, www and the apex, nameserver changes, TTL planning, checks with dig, CAA, and reverse DNS for the server's IP."
url: https://cloudsat.io/learn/point-a-domain-to-your-server
updated: 2026-11-18T12:00:00Z
source: CloudSat (https://cloudsat.io/). Prices in USD.
---

[Networking](https://cloudsat.io/learn/topic/networking-and-dns)

# Point a domain to your server with A and AAAA records

Point a domain at a VPS: A and AAAA records, www and the apex, nameserver changes, TTL planning, checks with dig, CAA, and reverse DNS for the server's IP.

CloudSat team November 18, 2026 6 min read

Pointing a domain at a server means publishing a few DNS records that turn a name into the server's IP addresses. The records take a minute to create. Most of the trouble comes from editing them in the wrong place, from caches that remember the old answer, and from forgetting the second name (`www` or the bare domain). This guide does it in the order that avoids all three.

## What you need first

- The server's public IPv4 address, and its IPv6 address if it has one. On CloudSat both are on the server's **Overview** tab, as described in [Your server IPv4 and IPv6 addresses](https://cloudsat.io/docs/ip-addresses).
- Access to the dashboard where the domain's DNS is hosted. That is not always the registrar.
- A web server, or whatever service the name is for, already answering on the IP address.

## Find out who answers for the domain

The registrar is where you bought the domain. The DNS host is whoever runs the nameservers listed for it, which can be the registrar, a CDN, or a DNS provider. Records only take effect where the nameservers point. Ask the public DNS which ones that is:

```bash
dig +short NS example.com
whois example.com | grep -i 'name server'
```

On Windows, `Resolve-DnsName example.com -Type NS` gives the same answer. If the names belong to your registrar, edit records there. If they belong to another company, edit records in that company's dashboard; changes at the registrar will have no effect.

## Two ways to point a domain

| Method | What you change | Speed | Use it when |
| --- | --- | --- | --- |
| Edit records at the current DNS host | `A` and `AAAA` records | Minutes, limited by the old TTL | Almost always |
| Change the nameservers | `NS` delegation at the registrar | Up to a day or two | You are moving DNS hosting itself |

Changing nameservers moves the whole zone, so every record (mail, verification, subdomains) must exist at the new host before you switch. The delegation lives in the top-level domain's servers, whose cached answers commonly last a day or two, so plan for that window.

## Create the records

A website usually needs four records: the bare domain (the apex) and `www`, each for IPv4 and IPv6.

| Name | Type | Value | TTL |
| --- | --- | --- | --- |
| `@` (example.com) | A | `203.0.113.10` | 3600 |
| `@` (example.com) | AAAA | `2001:db8:10:20::2` | 3600 |
| `www` | A | `203.0.113.10` | 3600 |
| `www` | AAAA | `2001:db8:10:20::2` | 3600 |

Most dashboards write the apex as `@` or leave the name empty. Instead of separate `www` addresses, you can make `www` a `CNAME` pointing at `example.com`, so a later IP change touches only the apex records. The apex itself cannot be a `CNAME`, because the DNS rules forbid one next to the zone's other records; some providers offer `ALIAS`, `ANAME` or "flattened" records as a workaround when the target must be a hostname.

Only publish an `AAAA` record when the service really answers on IPv6. A wrong IPv6 address is worse than none: visitors with IPv6 try it first and wait before falling back.

## Plan the TTL

The TTL (time to live) tells resolvers how many seconds they may cache an answer. It is why "DNS propagation" takes time: nothing is pushed around the internet, resolvers simply keep the old answer until it expires.

For a planned move, lower the TTL on the existing records to 300 seconds at least one full old-TTL period before the change. After the switch, resolvers pick up the new address within about five minutes. Raise the TTL again, to an hour or more, once everything works.

Resolvers also cache the fact that a name does not exist. If someone looked up `www` before you created it, they may keep getting a "no such domain" answer for a while; [the NXDOMAIN guide](https://cloudsat.io/learn/nxdomain-error-causes-and-fixes) explains how long and why.

## Check the result from the source

Ask the authoritative nameserver directly, which shows what you published without any cache in between, then compare with a public resolver:

```bash
dig +short example.com A @ns1.dnshost.example
dig +short www.example.com AAAA @ns1.dnshost.example
dig +short example.com A @1.1.1.1
dig +trace www.example.com
```

Replace `ns1.dnshost.example` with one of the names from the `NS` query. If the authoritative answer is right and a public resolver still shows the old address, it is caching and will catch up within the old TTL. `+trace` follows the delegation from the root servers down and shows exactly where a chain breaks. More query techniques are in [nslookup, dig and Resolve-DnsName](https://cloudsat.io/learn/nslookup-dig-and-resolve-dnsname).

## Make the server answer for the name

DNS only brings visitors to the IP address. The web server must also accept the name, or visitors see a default page or the wrong site. In nginx that is the `server_name` line:

```nginx
server {
    listen 80;
    listen [::]:80;
    server_name example.com www.example.com;
    root /var/www/example.com;
}
```

Run `sudo nginx -t && sudo systemctl reload nginx`, test with `curl -I http://example.com`, and then add HTTPS, which needs the DNS records to be correct before a certificate can be issued. The steps are in [fix the Not secure warning](https://cloudsat.io/learn/fix-not-secure-warning-on-your-site).

## Two records worth adding

**CAA** lists which certificate authorities may issue certificates for your domain. One record for the authority you actually use blocks issuance by any other:

```text
example.com.  3600  IN  CAA  0 issue "letsencrypt.org"
```

**Reverse DNS** (a `PTR` record) maps the IP address back to a name. Web visitors never see it, but mail servers check it, and logs and tracing tools become easier to read. It is set by whoever owns the IP address, not in your domain's zone. On CloudSat that is the **Networking** tab of the server, covered in [Set reverse DNS for your IPv4](https://cloudsat.io/docs/reverse-dns).

## When it does not work

- **The old site still appears.** The authoritative server is right, but your machine or resolver caches the old answer. Wait out the TTL or [flush the DNS cache](https://cloudsat.io/learn/flush-dns-cache-windows-macos-linux).
- **The authoritative server shows nothing.** The record was created at a host that is not authoritative for the domain. Compare the `NS` records with the dashboard you used.
- **A typo in the record name.** Some dashboards append the domain automatically, so entering `www.example.com` creates `www.example.com.example.com`.
- **The name resolves, but the connection times out.** DNS is fine; a firewall in front of the server blocks the port.

## FAQ

### How long does a DNS change take?

A changed record is visible everywhere once the previous TTL has passed, usually minutes to an hour. A nameserver change can take a day or two because of the top-level domain's caching.

### Should I use the registrar's DNS or a separate DNS host?

Either works. A separate DNS host can make sense if you want features such as an API for automation, but keeping DNS with the registrar is simpler for a single site.

### What happens to my email when I change the A record?

Nothing, as long as the `MX` records stay as they are. Mail follows `MX` records, not the web address, unless the `MX` points at the same name whose address you changed.

**Run it on CloudSat.** Cloud VPS on AMD EPYC and NVMe from $1.98/mo in 13 regions, delivered in under 5 minutes and paid in crypto. [See plans](https://cloudsat.io/plans) or [deploy a server](https://dash.cloudsat.io/console/deploy).

## Keep reading

[All guides in Networking](https://cloudsat.io/learn/topic/networking-and-dns)

- [NXDOMAIN: why a domain does not resolve and how to fix it](https://cloudsat.io/learn/nxdomain-error-causes-and-fixes): Networking NXDOMAIN: why a domain does not resolve and how to fix it 6 min read
- [nslookup and dig: DNS lookup commands for Windows and Linux](https://cloudsat.io/learn/nslookup-dig-and-resolve-dnsname): Networking nslookup and dig: DNS lookup commands for Windows and Linux 6 min read
- [Flush the DNS cache on Windows, macOS, Linux and browsers](https://cloudsat.io/learn/flush-dns-cache-windows-macos-linux): Networking Flush the DNS cache on Windows, macOS, Linux and browsers 6 min read
- [VPS vs VPN: a server, a tunnel, and when you want both](https://cloudsat.io/learn/vps-or-vpn-and-when-to-combine-them): Networking VPS vs VPN: a server, a tunnel, and when you want both 7 min read
