Beginner4 min read
Connect a domain to a server
Create the two DNS records a website needs, and understand why the change is not instant.
Last updated 1 August 2026
A website needs two things to resolve: a record for the bare domain and a record for the www subdomain. Everything else is optional.
Find the address
Open the service in your dashboard. The Overview tab shows the primary IPv4 address. Copy it exactly.
Create the records
| Type | Name | Value | TTL |
|---|---|---|---|
| A | @ | 203.0.113.24 | 3600 |
| CNAME | www | example.com. | 3600 |
Lower the TTL first if you are moving a live site
Reduce the existing TTL to 300 a day before the move. Resolvers then pick up the new record within five minutes rather than an hour.Check it worked
bash
dig +short example.com A
dig +short www.example.com CNAMEWas this page useful?
Feedback about article connect-domain-to-server