To make a domain load your website, its DNS must point at your server’s IP address. You do this with A records (and AAAA records for IPv6) wherever your domain’s DNS is managed.
First find out where your DNS is managed. It is usually your registrar, but if you changed nameservers to a DNS service or your host, the records live there instead. Run dig NS example.com +short to see which nameservers are in charge.
Steps
- Find your server’s IP address. Your host shows it in the control panel or welcome email. On the server itself,
curl -4 ifconfig.meprints its public IPv4 address. - Open the DNS settings for the domain in your registrar or DNS provider.
- Set the A record for the bare domain. Name
@(or blank), type A, value your server’s IP. If an A record for@already exists, edit it rather than adding a second one; two A records split visitors between two servers. - Add www. Either an A record for
wwwwith the same IP, or a CNAME fromwwwto your bare domain. - Add AAAA records only if your server has a working IPv6 address.
- Save, and leave the TTL at the default unless you are planning a move.
- Tell the server about the domain. The web server or control panel must have a site configured for this domain name, or it will show a default page.
Check it
dig example.com A +short
dig www.example.com +short
Both should return your server’s IP. If they show an old address, the change is still propagating.
Then add HTTPS
Once the domain resolves to the server, issue a certificate. See free SSL with Let’s Encrypt. Certificate tools check the domain points at your server first, so this always comes after the DNS change.
Leave MX records alone unless you are changing email too. Pointing the website elsewhere does not affect email, but deleting MX records stops mail arriving.
Something out of date? Software changes. If a step no longer works, tell us and we will check it and update the page.

