How to Point a Domain to Your Hosting (Nameservers, A Records & CNAMEs)

To point a domain to your hosting, either change the domain's nameservers at your registrar to the ones your host gave you, or keep your nameservers and edit the A record so it points to your host's server IP address. Then save and wait for the change to spread, usually within a few hours.

Key takeaways

  • There are two ways to connect a domain to hosting: change nameservers (easiest) or edit DNS records like the A record (more control).
  • Changing nameservers hands all your domain's DNS to your host, so it manages everything for you.
  • The A record method points just the address record at your host's server IP while another DNS provider stays in charge.
  • Never use both methods at once. Nameservers override any individual records you edit.
  • Changes are not instant. Allow up to 24-48 hours for full propagation before you decide something went wrong.

The two ways to connect a domain to hosting

You have bought a domain and signed up for hosting, but typing your domain into a browser still shows nothing, an error, or your registrar's parking page. That is normal. A domain and a hosting account are two separate things you own, and you have to tell the domain where your website actually lives. If you are unsure how these differ, our guide on the difference between a domain and hosting explains it in plain terms.

"Pointing" a domain means connecting its name to your host's server so visitors reach your site. There are two ways to do it, and picking the right one is the whole job.

Option 1 — Change the nameservers. A nameserver is a special server that holds all the DNS records for your domain and answers the question "where does this name point?" When you change your domain's nameservers to your host's, the whole domain's DNS (the system that turns names into numbers) is managed inside your hosting panel. This is the easiest method and the one we recommend for most beginners, because your host sets up the correct records for you.

Option 2 — Keep your nameservers and edit DNS records. Here you leave your domain's nameservers where they are and change individual records instead. The key one is the A record, short for "address record", which maps your domain to a numeric IP address such as 192.0.2.10. You point that A record at your host's server IP. This gives you more control and is the right choice when a separate DNS provider like Cloudflare manages your domain.

You will also meet the CNAME record, short for "canonical name". A CNAME points one name at another name instead of an IP, for example making www follow whatever your root domain does. To go deeper on records and how the lookup works, see what DNS is and how it works.

Method 1: Point your domain using nameservers

This is the simplest path. You change two settings at your registrar and let your host handle the rest. Use this if your host will manage your DNS, which is true for most shared and managed hosting plans.

  1. Find your host's nameservers. They look like ns1.yourhost.com and ns2.yourhost.com, and you will find them in your hosting welcome email or inside your hosting control panel under a "DNS" or "nameservers" section.
  2. Log into your domain registrar. This is the company where you bought the domain, such as your registrar's account dashboard. If you have not registered a name yet, see how to buy a domain name.
  3. Open the domain's nameserver settings. Look for a page named "Nameservers", "DNS", or "Manage domain", then choose the option to use custom nameservers.
  4. Replace the existing nameservers with your host's. Remove the registrar's default entries and enter ns1.yourhost.com and ns2.yourhost.com exactly as your host listed them.
  5. Save and wait for propagation. The change can take up to 24-48 hours to spread worldwide, though it is often much faster. Learn how to flush your DNS and check propagation while you wait.

Once the new nameservers take effect, your host controls all of the domain's records, so you manage email, subdomains, and everything else from your hosting panel.

Method 2: Point your domain using an A record

Use this method when you want to keep your current nameservers, perhaps because a separate DNS provider like Cloudflare is managing your domain, and you only want to send your website traffic to your host. You will edit records in a DNS zone editor, the page where your DNS provider lists every record for your domain.

  1. Find your host's server IP address. Look in your hosting control panel, often on the main dashboard or a "server details" page. It is a number such as 192.0.2.10.
  2. Set the A record for the root domain. In the DNS zone editor, edit the A record with the name @, which stands for your root domain (your bare example.com), and enter your host's server IP as its value.
  3. Add or confirm the www record. Create a CNAME record named www that points to your root domain, so www.example.com follows the same address. Alternatively, add a second A record for www pointing to the same IP.
  4. Save and wait for propagation. As with nameservers, allow time for the change to spread before assuming it did not work.

Because you left the nameservers alone, your DNS provider stays in charge of every other record, and only the traffic you redirected now reaches your host.

How to point a subdomain

A subdomain is a prefix on your domain, like blog.example.com or shop.example.com. Pointing one works the same way as pointing the root, just with the subdomain's name in the record. You have two choices:

  • Use an A record when the subdomain should go to a specific server IP. Create an A record named blog and set its value to that IP address.
  • Use a CNAME record when the subdomain should follow another hostname. Create a CNAME named shop pointing to something like stores.yourprovider.com, and it will always resolve to wherever that hostname points.

CNAMEs are handy for services that ask you to point a subdomain at their address, because if they ever change their IP, you do not have to update anything.

How to check it worked

After you save your change, give propagation some time, then confirm the domain now resolves to the right place. The simplest test is to visit the domain in your browser and see whether your site loads. For a more precise check, use an online DNS checker or a command-line tool.

Is my domain pointed correctly? After propagation, visit your domain in a browser to see if your site loads. To confirm the exact address, run dig example.com or nslookup example.com on your computer, or paste your domain into an online DNS checker. If the returned IP matches your host's server IP, the domain is pointed correctly. If you still see an old result, your local cache may be stale, so flush your DNS and check propagation.

On Windows, open Command Prompt and type nslookup example.com. On macOS or Linux, open Terminal and type dig example.com. Both print the IP address your domain currently points to, so you can compare it against the IP or nameservers you set.

Common mistakes to avoid

Do not mix both methods at once. If you change your nameservers to your host and also edit A records at your old DNS provider, the nameservers win. The records you carefully edited will simply be ignored, because your domain now reads its DNS from the new nameservers. Pick one method and stick to it.

Beyond mixing methods, these are the errors that trip people up most often:

  • Using the wrong IP address. Copy the server IP exactly from your host's panel. A single wrong digit sends visitors to the wrong server or nowhere at all.
  • Forgetting the www record. If you only point the root domain, www.example.com may not load. Always add a CNAME or A record for www.
  • Setting a very high TTL. The TTL (time to live) tells DNS servers how long to cache a record. A very high TTL means future changes take much longer to appear, so keep it modest, such as one hour.
  • Not waiting for propagation. Changes are not instant. Give them up to 24-48 hours before concluding something failed.

Frequently asked questions

How do I point my domain to my hosting?

Log into your domain registrar and either change the domain's nameservers to the ones your host provided, or keep your nameservers and edit the A record so it points to your host's server IP address. Then save the change and wait for propagation, which can take up to 24-48 hours.

What's the difference between nameservers and A records?

Nameservers decide which company manages all of your domain's DNS records. An A record is one of those records, and it maps your domain to a numeric IP address. Changing nameservers moves the whole zone to your host, while editing an A record changes only where one name points inside your existing DNS.

How long does it take for a domain to point to a new host?

It usually takes anywhere from a few minutes to a few hours, but full propagation worldwide can take up to 24-48 hours. The exact time depends on your record's TTL and how quickly DNS servers around the world refresh their cache.

Do I point the domain or transfer it?

Most of the time you point it, which keeps the domain registered where it is and simply directs it to your host. Transferring the domain moves its registration to a new company entirely and is a separate, slower process you only need if you want to change registrars.

How do I point a subdomain?

In your DNS zone editor, create a record named after the subdomain. Use an A record set to a server IP if the subdomain should reach a specific server, or use a CNAME record pointing to another hostname if it should follow an existing address such as a third-party service.

Why isn't my domain pointing to my site yet?

The most common reasons are that propagation is still in progress, your local computer has a cached old result, you entered the wrong IP or nameservers, or you edited A records while your nameservers point somewhere else. Wait for propagation, flush your DNS, and double-check that you used only one method with the correct values.

Summary

Pointing a domain to your hosting comes down to a single choice. Change your nameservers to your host for the simplest, hands-off setup, or edit your A record when you want to keep a separate DNS provider in control. Whichever you pick, use only one method, copy your values exactly, remember the www record, and give the change time to propagate before you test it. Once it resolves to the right IP, your site is live at your domain. Next, learn how to flush your DNS and check propagation so you can confirm your change quickly and troubleshoot with confidence.

References

  • ICANN, "Domain Name System (DNS)" educational resources — how domains resolve to addresses.
  • IETF RFC 1035, "Domain Names — Implementation and Specification" — A, CNAME, and NS record definitions.
  • Bitrich777 Hosting Help Center: What is DNS and What is a domain name.
Bitrich777 Hosting Team
About the author

The editorial team behind the Bitrich777 Hosting Help Center — practical, tested guides on web hosting, WordPress, servers, DNS, SSL, email, security and migration. Every walkthrough is reproduced on a live host before it is published.

Spotted an error? Tell us