Guide Domains & DNS

How to point a domain to your hosting

The two ways to connect a domain to a hosting account, when to use each, and how to tell the change has actually taken effect.

Updated 7 min read Beginner

Buying a domain and buying hosting are two separate purchases, and they do not know about each other until you connect them. Until you do, the domain either shows a registrar parking page or nothing at all, while your hosting account sits there working perfectly on an address nobody is visiting.

Connecting them means telling the internet's address book — DNS — that this name belongs to that server. There are two ways to do it, and picking the right one takes about thirty seconds of thought.

Which method should you use?

MethodUse it whenWhat it does
Change the nameservers The normal choice. You want the whole domain — website and email — handled by your hosting account. Hands the entire domain over to your host's DNS. Records are then managed in your hosting control panel.
Change an A record Your email, or some other service, must keep working exactly where it is. Moves only the website. Everything else on the domain stays with whoever currently runs its DNS.

If you are setting up a brand new site, or moving a site and its mailboxes together, change the nameservers. It is fewer steps and there is less to get wrong. Use the A record method when your mail is somewhere you cannot disturb — a company Microsoft 365 or Google Workspace tenant, for instance — and you only want the website to move.

Before you change anything

If the domain is already serving a live website or live email, write down its current DNS records first. Changing nameservers replaces every record at once, and a mail record you did not know existed is the usual cause of "our email stopped" the morning after a migration.

Method 1: change the nameservers

  1. Find the nameservers for your hosting account

    These are listed in your hosting welcome email and shown in your control panel. They look like ns1.example-host.com and ns2.example-host.com, and there are usually between two and four of them. Copy them exactly as they appear.

    Use your own, not a set from a guide

    Nameserver hostnames differ between hosting platforms and sometimes between accounts on the same platform. Always copy the ones shown for your account rather than any set you found written down elsewhere — a plausible-looking wrong nameserver produces a domain that resolves to somebody else's server.

  2. Sign in where the domain is registered

    This is the company you bought the name from, which is not necessarily the company hosting your site. If you are not sure who that is, a public WHOIS lookup on your domain will name the registrar.

  3. Find the nameserver setting

    Registrars label it differently — "Nameservers", "DNS settings", "Manage DNS" — but it is always on the page for that specific domain, not in your account settings. There is normally a choice between the registrar's default nameservers and custom ones. You want custom.

  4. Replace what is there

    Delete the existing entries and add yours in their place. Do not leave the old ones in the list alongside the new ones: the domain would then answer from two different sources depending on which nameserver a visitor happened to reach, and the site would appear to work intermittently — the single most confusing failure in this whole process.

  5. Save, then leave it alone

    The change is now working its way around the world. See how long DNS propagation takes for what to expect. Repeatedly reloading your own site in the meantime tells you very little, because your own browser and network cache aggressively.

Method 2: change the A record

An A record maps a name to an IPv4 address. Changing it moves the website and leaves everything else — most importantly the MX records that route your email — exactly where it is.

You will need the IP address of your hosting account, which is shown in your control panel and in your welcome email. Then, wherever the domain's DNS is currently managed:

  • Edit the A record with the name @ (some panels show this as blank, or as the domain itself) and set its value to your hosting IP address.
  • Edit the record for www. This is usually a CNAME pointing at your domain, in which case leave it alone — it will follow the record above automatically. If it is a second A record, point it at the same IP address.
  • Leave every other record untouched.
Lower the TTL first, if you can plan ahead

TTL is how long other servers are allowed to remember a record. If you drop it to 300 seconds a day before the switch, the change itself takes minutes instead of hours. Put it back to its normal value once everything is settled.

How to check it worked

Do not use your own browser as the test. It has almost certainly cached the old answer, and a cached answer will keep you chasing a problem that no longer exists.

Instead, query DNS directly. On macOS or Linux:

dig +short yourdomain.com
dig +short NS yourdomain.com

On Windows:

nslookup yourdomain.com
nslookup -type=ns yourdomain.com

The first command should return your hosting IP address; the second should list your new nameservers. An online "global DNS checker" is also useful here, because it queries from several countries at once and shows you how far the change has spread rather than just what your own connection thinks.

When it still is not working

  • Under 48 hours have passed. This is nearly always the answer. Wait.
  • You changed DNS at the wrong place. If the domain uses your host's nameservers, records edited at the registrar are ignored, and vice versa. Only one of them is authoritative — the one the nameservers point to.
  • The domain is not added to the hosting account. Pointing DNS at a server that has never heard of the domain gets you a default page or an error. The domain has to exist on both sides.
  • The domain has expired. An expired domain stops resolving no matter how correct its records are. Check its expiry date at the registrar.
  • You are seeing a cached page. Try a private window, a different browser, or mobile data instead of your home connection.

If you have worked through all of that and the domain still is not answering correctly, send us the domain name and what you have already tried and we will look at it from our side.

Frequently asked questions

Will my website go down while the domain is pointing?

If the site is already live somewhere else, leave the old hosting active until the change has finished spreading. Visitors are sent to either the old server or the new one during that window, never to an error — provided both are still running. Cancel the old hosting only once the new one is answering everywhere.

Do I have to move my domain registration too?

No. A domain can stay registered wherever it is and simply point at hosting somewhere else. Moving the registration is a separate job, and it is worth doing only if you would rather have the billing in one place.

I changed the nameservers and nothing happened. What now?

Give it a few hours first — most of the time nothing is wrong. After that, check that you saved the change at the registrar that actually holds the domain, and that you replaced all the existing entries rather than adding to them.

Related reading