Chapters (12)

Pointing your domain at a website host

The short version

  • There are two ways to connect a domain to a host.
  • Way 1: switch your nameservers to the host. The host then runs all your DNS.
  • Way 2: keep your DNS where it is, and add the records the host gives you.
  • Way 2 usually means an A record for the bare domain and a CNAME for www.
  • Afterwards, check your work with a lookup tool, and give caches time to catch up.

First, find where your DNS lives

Before you change anything, work out two things.

  1. Who is your registrar? That's where you manage your domain's settings.[1] The registrars chapter shows how to look it up.
  2. Who runs your DNS? Look up your domain's nameservers. The nameservers chapter shows how. Often it is the registrar. Sometimes it is a separate DNS provider.

Your records live wherever your nameservers point. That's where any new records need to go.

Two ways to connect

Your host's instructions will ask for one of two things. Some hosts offer both.

example.com splits into two ways. Way 1: change the nameservers at your registrar, and the host then runs all your DNS; copy your records first. Way 2: keep your nameservers, and add an A record for the bare domain and a CNAME for www; email is not touched.
Two ways to connect a domain to a host.

Way 1: change your nameservers

The host gives you two or more nameserver names. You enter them at your registrar, in place of the old ones.[2]

After that, the host runs your DNS. Any record you need, you add at the host.

This is the simpler choice if the host is going to manage everything. But remember the warning from the nameservers chapter. Switching moves all your records, including email. Copy every existing record to the host first.

Way 2: add records, keep your nameservers

Here you leave your nameservers alone. You just add a few records where your DNS already lives.

This is the safer choice if you already have email or other services on the domain. Nothing else changes.

Hosts usually ask for:

  • an A record (and maybe an AAAA record) for the bare domain, pointing at the host's IP addresses
  • a CNAME record for www, pointing at a name the host gives you

What host instructions look like

Here is a real example from one host's help pages. It lists four IP addresses for the bare domain's A records:[3]

GitHub Docs page on managing a custom domain. It lists four IPv4 addresses for A records and four IPv6 addresses for AAAA records, with a note to remove any default record first.
A real host's instructions: A and AAAA records for the bare domain. Screenshot: GitHub Docs, captured 2026-10-18.

The same guide asks for a CNAME on www. It points at a name the host gives you.[3] That's the pattern from the A record and CNAME chapters.

Notice the note in the picture. Some DNS providers add a default record by themselves. The guide says to remove that first.[3] Otherwise the old record and the new ones would compete.

In your DNS dashboard, the records usually go in as rows like these. The @ symbol is short for the bare domain itself:[4]

Type Name Value
A @ 192.0.2.10
A @ 192.0.2.11
CNAME www example.net

The addresses and names above are examples. Use the exact values your host gives you.

Checking your work

Once the records are in, check them with a lookup tool.

On the web: Google's Dig tool works in any browser. Type your domain, then pick the record type, such as A or CNAME:

Google Admin Toolbox Dig, with example.com entered and A selected. The results show two A records, each with a TTL of 5 minutes and an IPv4 address.
An A lookup for example.com returns two addresses. Screenshot: Google Admin Toolbox, captured 2026-10-18.

Compare the answer with your host's instructions. Every address should match.

In a terminal: you can use the dig command. Your host may even give you the exact command to run.[3]

$ dig example.com +noall +answer -t A
example.com.    3600    IN    A    192.0.2.10
example.com.    3600    IN    A    192.0.2.11

Windows doesn't include dig.[3] Instead, you can use the Resolve-DnsName command in PowerShell.[3]

If it doesn't work yet

Don't panic straight away. The likely reason is caching.

  • Old copies of your records may still be in caches. That host's guide says changes can take up to 24 hours.[3] The TTL chapter explains why.
  • If you looked up the name before adding it, a "no such name" answer may be cached too.

If it still fails after a day, check these:

  1. Did you add the records where your nameservers point? Records added anywhere else are ignored.
  2. Is there an old default record left over?
  3. Did you set up both the bare domain and www?
  4. Did you type the values exactly, with no extra spaces?
A checklist titled Still not working after a day? Records are where your nameservers point. Old default records are removed. Both the bare domain and www are set. Values match the host's, character for character.
Four things to check if your domain still doesn't reach your host.

The same steps for other services

You'll use these steps again and again. Email providers, search tools and many other services work the same way.

Each one gives you records to add. If it can't do this for you automatically, you add them by hand at your DNS provider.[5] Then you check them with a lookup tool, and wait for caches to catch up.

That's the whole guide. You now know how a name becomes a number, who runs each part, and how to connect your own domain.

Sources

  1. Domain Name Registrants, ICANN (accessed 2026-10-18)
  2. Update nameservers, Cloudflare DNS docs (accessed 2026-10-18)
  3. Managing a custom domain for your GitHub Pages site, GitHub Docs (accessed 2026-10-18)
  4. RFC 1035: Domain names - implementation and specification, IETF (accessed 2026-10-18)
  5. Verify your site ownership, Google Search Console Help (accessed 2026-10-18)