Get started

How to point a domain to your hosting: change nameservers or edit the A record

Change the nameservers to hand the whole domain to your host, or edit the A record to move only the website. Here is how to choose, make the change and check it has worked.

5 December 2026 · 6 min read

You have a domain and you have hosting, but the domain still shows a parking page, the old website, or nothing at all. The two are only connected when the domain’s DNS says where the website lives. There are two ways to do that: change the domain’s nameservers to your host’s, or keep your current DNS and point the domain’s A record at the hosting server’s IP address.

This guide explains the difference, when to use each, how to make the change, and how to check that it has worked.

Nameservers and A records in plain terms

  • Nameservers say which company answers all DNS questions for your domain. You set them at the registrar, the company you registered the domain with. Changing them hands the whole DNS zone, website, email and every subdomain, to the new provider.
  • An A record is one entry inside that DNS zone. It maps a name, such as example.com or www.example.com, to an IPv4 address. Changing it moves only that name.

Other records live in the same zone: MX records say where email goes, CNAME records point one name at another, and TXT records hold things like SPF and verification codes.

Which method should you use?

Change the nameservers if…

  • The domain is new, or nothing else depends on its current DNS.
  • You want your website and email at the same host, managed in one place.
  • You want cPanel to handle DNS for you: the zone is created with the account, and cPanel can set up the records for email authentication and AutoSSL.

Edit the A record if…

  • Your email is with Google Workspace or Microsoft 365 and you do not want to touch its records.
  • Your DNS is on a service such as Cloudflare that you want to keep.
  • Only the website is moving, or you want to move one subdomain, such as shop.example.com.

Both work equally well for the website. The difference is who manages the rest of the zone.

Option 1: change the nameservers

  1. Find your host’s nameservers. They are in your hosting welcome email, usually two or more names such as ns1. and ns2. followed by the host’s domain.
  2. Write down the records you need to keep. If the domain already has email somewhere other than your new host, copy its MX records, and any TXT and CNAME records, from the current DNS. When the nameservers change, the old zone stops being used, and anything not re-created at the new host stops working.
  3. Check DNSSEC. If DNSSEC is switched on at the registrar (a DS record is set) and the new DNS provider does not sign the zone with matching keys, validating resolvers will treat the domain as broken. Switch DNSSEC off at the registrar before you change nameservers, and set it up again with the new provider later if you want it.
  4. Change the nameservers at the registrar. In the registrar’s control panel, find Nameservers (sometimes under DNS or Manage domain), choose custom nameservers, replace the old ones with your host’s, and save. With .pk domains registered with us, you can change nameservers yourself in the client area at any time.
  5. Re-create the records you kept in cPanel’s Domains » Zone Editor.

Custom nameservers on your own domain, such as ns1.yourbrand.com for a reseller business, also need glue records (child nameservers) created at the registrar with the server’s IP addresses. Your host provides the addresses.

Option 2: point the A record

  1. Find the server’s IP address. It is in your welcome email, and in cPanel under Shared IP Address or Dedicated IP Address in the General Information panel.
  2. Open the DNS settings where the domain’s DNS is hosted, which is wherever its nameservers point: the registrar, Cloudflare or another DNS provider.
  3. Edit the A record for the root of the domain, often shown as @ or the bare domain, and set it to the server’s IP address.
  4. Point www as well, either with its own A record to the same IP or with a CNAME to the bare domain.
  5. Remove AAAA records for these names unless your hosting gives you an IPv6 address. A leftover AAAA record sends IPv6 visitors to the old server and can stop free SSL from being issued.

Leave the MX records alone and email keeps working where it is.

How long does it take?

DNS answers are cached for as long as their TTL (time to live) says. That is why changes do not show up everywhere at once.

  • A record changes follow the TTL on the old record. If it was 3600 seconds, most visitors see the new address within an hour. Lowering the TTL a day before a planned move makes the switch faster, as explained in our guide to moving a site without downtime.
  • Nameserver changes are slower, because the old nameservers are cached by resolvers too. For .com domains, for example, the registry publishes nameserver records with a TTL of 172,800 seconds, which is 48 hours. Many visitors move over within a few hours, but allow up to two days before you cancel the old hosting.

Check that it has worked

From a terminal on macOS or Linux (Windows users can use nslookup):

dig +short NS example.com
dig +short A example.com
dig +short A www.example.com
dig +short A example.com @8.8.8.8

The first line shows the nameservers the world currently sees. The others should return your hosting server’s IP address. Asking a public resolver such as 8.8.8.8 shows what visitors who are not using your own cached DNS will get. You can also look up the nameservers registered for a domain with our WHOIS lookup.

When the domain resolves to the server, cPanel’s AutoSSL issues a free certificate on its next run. If it does not, our guide to fixing AutoSSL walks through the usual causes.

Frequently asked questions

Should I change nameservers or the A record?

Change nameservers if you want website, email and DNS managed at your host. Change the A record if you want to keep your current DNS or email provider and move only the website.

How long do nameserver changes take?

Often a few hours, but allow up to 48 hours, because resolvers cache the old nameservers. For .com domains the registry’s nameserver TTL is 48 hours.

Will changing nameservers break my email?

It can. The old DNS zone stops being used, so copy your MX, TXT and CNAME records to the new zone first if your email is not hosted with your new host.

Where do I change my domain’s nameservers?

At the registrar where the domain is registered, not at the hosting company, unless they are the same company.

What is the A record for www?

The entry for www.example.com. Point it to the same IP as the bare domain, or make it a CNAME to the bare domain.

Domains and hosting in one place

Register a new domain or a .pk domain with us, or transfer an existing one, and you can manage nameservers in the same client area as your hosting. Search for a name on our domains page. Moving a live site from another host? Our free migration copies it over before you change DNS. If the DNS side is confusing, open a ticket and we will check the records with you.

Tags:

point domain to hosting

change nameservers

A record vs nameservers

DNS propagation time

cPanel Zone Editor

Domain Guide

How to transfer a domain to a new registrar without breaking the website

Unlock the domain, get the AuthInfo code, and start the transfer. Nameservers stay as they are unless you also want to move hosting.

Read More →

Domain Guide

How to register a .pk domain in 2026: PKNIC rules, .pk vs .com.pk, and transfers

PKNIC suffix rules, no local-presence requirement, two-year terms, and how transfers work.

Read More →