To point a domain to hosting, you log in where you bought the domain and tell it which server holds your site. There are two common ways. You can switch the domain's nameservers to the ones your host gives you, or you can add an A record with your server's IP address. Most people use nameservers because it is the easiest.

This guide explains nameservers, A records and CNAME records in plain words. Then it walks you through the steps, tells you how long to wait and shows you how to check that it worked.

What does pointing a domain actually do?

Your domain lives at a registrar, the company you rented it from. Your website lives on a server at your host. On their own, the two do not know about each other.

The Domain Name System, or DNS, links them. DNS works like the internet's phone book. When someone types your domain, DNS looks up the matching server address and sends the visitor there. Pointing your domain simply means you fill in the right entry in that phone book. If you are not sure how the two parts differ, read domain name vs web hosting first.

Nameservers, A records and CNAMEs: what is the difference?

Nameservers

A nameserver is a server that stores all the DNS records for a domain. When you change your nameservers, you hand the whole DNS job to someone else, usually your host. From then on, you manage every record in your host's panel. Your host's welcome email normally lists two nameservers, such as ns1.example-host.com and ns2.example-host.com.

A record

An A record, short for "address", links a domain to an IP address. A records only hold IPv4 addresses, the kind with four groups of numbers like 203.0.113.10. A newer kind of address, IPv6, uses an AAAA record instead. With this method you keep DNS at your registrar and only change the record that says where your site lives.

CNAME record

A CNAME record makes one name an alias of another name. It must point to a domain name, never to an IP address. People often use it for the "www" version of a site, so www.yourblog.com follows yourblog.com. Some services also ask you to add a CNAME to connect a subdomain like shop.yourblog.com.

Which one should you use?

  • Nameservers: best for most beginners. Your host sets up everything, including email records.
  • A record: good when you want to keep DNS at your registrar or at a DNS service, for example to keep email elsewhere.
  • CNAME: good for the www version and for subdomains that point to another service.

How do you point a domain to hosting, step by step?

Every registrar's screen looks a little different, but the steps are the same.

Method 1: change the nameservers

  1. Find your host's nameservers. Look in the welcome email or in the hosting dashboard under "DNS" or "Domains".
  2. Log in to your registrar and open the domain's settings.
  3. Look for "Nameservers" or "DNS settings" and choose "custom nameservers".
  4. Remove the old nameservers and paste in your host's ones, exactly as given.
  5. Save. Then add the domain to your hosting account too, if your host has not done that yet.

Method 2: add an A record

  1. Find your server's IP address in your hosting dashboard.
  2. Log in to wherever your DNS lives, which is usually your registrar.
  3. Open the DNS records list. Edit the A record for "@", which stands for the bare domain.
  4. Paste your server's IP address and save.
  5. Add a CNAME for "www" that points to your bare domain, so both versions work.
  6. Delete any old A records for the same name that point to a different address.

Before you switch an older site, take a backup and lower the TTL if you can, as explained below.

How long do DNS changes take?

DNS changes do not reach everyone at once. Servers around the world keep a saved copy, or cache, of your records for a while. That delay is often called DNS propagation.

Each record has a TTL, short for "time to live". It tells other DNS servers how long they may use their saved copy before they ask for a fresh one. TTL is counted in seconds, so a TTL of 3600 means one hour.

In practice, an A record change often shows up within minutes to a few hours. Nameserver changes are slower. Cloudflare notes that updated NS records may take several hours to spread, and that some registrars need up to 24 hours. So if your site still shows the old page after an hour, do not panic. Wait, and check again later.

A useful trick for a move: a day before you switch, set the old record's TTL to a low value like 300 seconds. After the switch, set it back to a longer value.

How do you check that it worked?

  1. Visit the site. Open it in a private browser window, so you do not see an old cached copy. Try it on your phone with Wi-Fi turned off, too.
  2. Look up the records. On a computer, open a command window and type nslookup yourblog.com. The IP address it shows should match your host's.
  3. Check the nameservers. Type nslookup -type=ns yourblog.com to see which nameservers the domain uses now.
  4. Use an online DNS checker. Free sites query DNS servers in many countries at once, so you can watch the change spread.
  5. Check the padlock. Once the domain points to your host, turn on the free SSL certificate in your hosting panel. Then make sure the "https" version loads.

When the site loads, send every visitor to one version, such as https with or without www. Our .htaccess redirect generator builds those rules for Apache servers. Later, you can check if your pages are indexed by Google.

What if it still does not work?

  • Typos: one wrong letter in a nameserver or one wrong digit in an IP address breaks the link.
  • Extra old records: two A records for the same name can send visitors to the wrong place.
  • Domain not added at the host: the server needs to know the domain belongs to your account.
  • Old cache: clear your browser cache or try another device and network.
  • Expired domain: check that the domain is paid and active.

If nothing helps after a day, ask your host's support. Send them your domain and a screenshot of your DNS settings.

Now you know how to point a domain to hosting: use your host's nameservers, or add an A record with your server's IP and a CNAME for www. Give DNS a few hours to catch up, then test with a private window and a lookup tool. New to hosting? Start with what web hosting is.

Frequently asked questions

Should I change nameservers or add an A record?

For most beginners, changing nameservers is easier, because your host then sets up all the records for you. Use an A record when you want to keep your DNS and email settings where they are. Both methods work well.

Will my email stop working if I change nameservers?

It can. When you switch nameservers, the old email records stop being used. Before you switch, copy your MX records, which tell the internet where to deliver your email, and add them at the new DNS provider.

Can I point one domain to two hosts?

Not in normal use. One name, such as yourdomain.com, should point to one hosting account. You can point different subdomains, such as blog.yourdomain.com and shop.yourdomain.com, to different hosts.