Domains and DNS

How to connect a domain to hosting

You connect a domain to hosting in one of two ways: change the domain's nameservers to your host's, or keep your current DNS and point an A record at your server's IP address. This guide shows when to use each and how to check it worked.

Updated 7 min read

What connecting a domain actually means

Your domain (say yourbusiness.in) is registered with a registrar such as GoDaddy, Hostinger, Namecheap or BigRock. Your website files live on a hosting server somewhere else. Connecting the two means telling the Domain Name System (DNS) which server should answer when someone types your domain.

You do not need to move or transfer the domain. You only change where its DNS points. If DNS itself is new to you, read what DNS is and how it works first; it takes five minutes and makes every step below easier.

There are two ways to do it:

Method 1: Change nameservers Method 2: Point an A record
What you change The domain's nameservers at the registrar One or two DNS records at your current DNS provider
Who manages DNS afterwards Your hosting company's DNS (you edit it in cPanel or Plesk) Whoever manages it today (registrar, Cloudflare, etc.)
Best for New sites, simple setups, people who want everything in one panel Sites with email at Google Workspace or Microsoft 365, or a CDN, or many existing records
Typical time to take effect A few hours, up to 24 to 48 hours Often under an hour, depends on the old TTL
Risk Existing records (email, verification TXT) are lost unless you copy them Low, as long as you edit the right record

If you are unsure, use the nameserver method for a brand new domain, and the A record method if the domain already runs email or other services you do not want to touch.

Before you start

Before you start: Collect three things. Your registrar login, the nameservers or server IP address from your hosting welcome email, and a screenshot of your current DNS records.

The screenshot matters. If anything goes wrong, you can put the old records back in minutes.

ODHOST note: ODHOST does not currently register domains, so you will use a domain you already own. During checkout you can choose to use an existing domain. The nameservers and server IP address for your account are in your welcome email and in the client area. If you cannot find them, open a support ticket and the team will confirm the values for your plan.

Also add the domain inside your hosting control panel if it is not already there. On a cPanel account, the main domain is set when the account is created; extra domains are added under Domains. On Plesk, use Websites & Domains. Menu names vary a little by version and by what your host enables.

Method 1: Change the nameservers

Nameservers are the servers that hold the master copy of your domain's DNS records. Changing them hands control of the whole DNS zone to your host.

  1. Log in to your registrar account and open the domain you want to connect.
  2. Find the section called Nameservers, DNS servers or similar. Most registrars, including the ones popular in India, put it on the domain's management page rather than inside the DNS records editor.
  3. Choose the option to use custom nameservers (wording differs: "custom", "change", "use my own").
  4. Delete the existing entries and type the nameservers from your hosting welcome email, exactly as given. Most hosts give two; some give four.
  5. Save the change. Some registrars ask for an OTP or email confirmation.
  6. In your hosting control panel, check that the DNS zone for the domain exists and contains the records you need, including MX records if your email is hosted elsewhere.

Common mistakes at this step:

  • Typing the nameservers into the DNS records area as NS records instead of using the dedicated nameserver setting. That does nothing for delegation.
  • Leaving one old nameserver in the list. Visitors then get answers from two different zones, and the site appears to work only sometimes.
  • Forgetting a trailing typo, such as ns1.example.com.in. Copy and paste instead of retyping.

For screenshots and the exact flow, see the help article on pointing your domain's nameservers.

Method 2: Point an A record

An A record maps a name to an IPv4 address. If your DNS stays where it is, you only need to change the records for the website.

  1. Get your hosting account's IP address from the welcome email or client area.
  2. Log in to whoever manages your DNS today. Check the nameservers on the domain to find out: if they belong to your registrar, edit DNS at the registrar; if they belong to Cloudflare or another provider, edit it there.
  3. Open the DNS records editor (often called DNS management, Manage DNS or DNS zone).
  4. Edit the A record for the bare domain. Its host field is usually @ or blank.
  5. Edit or create the www record. A CNAME pointing to the bare domain is the simplest choice.
  6. Remove any AAAA (IPv6) record that still points to the old host, unless your new host gave you an IPv6 address.
  7. Save, and leave MX, TXT and other records alone.

The finished records look like this (203.0.113.10 is a documentation address; use your own):

; Website records for yourbusiness.in
@     3600  IN  A      203.0.113.10
www   3600  IN  CNAME  yourbusiness.in.

The difference between these two record types trips up many people. The help article on A records vs CNAME records explains when to use each.

A tip that saves hours: lower the TTL first

TTL (time to live) is how long, in seconds, other resolvers may cache a record. If your current A record has a TTL of 86400 (one day), the old address can stick around for up to a day after you change it.

A day before the switch, lower the TTL on the records you plan to change to 300 seconds. Wait for the old TTL to pass, then make the change. Raise it back to 3600 or more once everything works.

Add the domain on the hosting side

DNS gets visitors to the server. The server then needs to know which website to show for that name.

  • cPanel: The primary domain is attached when the account is created. Additional domains go in Domains (older versions call these Addon Domains). Each gets its own folder, often under public_html.
  • Plesk: Add the domain under Websites & Domains, then upload files to its httpdocs folder.

If you skip this step, the domain may resolve to your server but show a default page or the wrong site.

Wait for propagation, then verify

"Propagation" is really caches expiring around the world. Your laptop, your broadband provider's resolver and public resolvers all keep old answers until their TTL runs out. Jio, Airtel and BSNL users may see the change at different times for the same reason.

Check what the internet sees with these commands. The first shows which nameservers the domain uses, and the second which IP address Google's public resolver returns:

nslookup -type=NS yourbusiness.in
nslookup yourbusiness.in 8.8.8.8

On macOS or Linux, dig gives cleaner output:

dig +short yourbusiness.in A
dig +short www.yourbusiness.in

If nslookup against 8.8.8.8 shows your new IP, public resolvers have the change. If your own browser still shows the old site, clear your browser cache and run ipconfig /flushdns on Windows. The DNS propagation help article covers what to do if it is still slow after 48 hours.

After the domain connects

  1. Install SSL. Most hosts can issue a certificate only after the domain points to their server. ODHOST shared plans include a free SSL certificate; once DNS resolves, check its status in cPanel under SSL/TLS Status or in Plesk under the domain's SSL settings.
  2. Force HTTPS. Redirect http:// to https:// once the certificate is active.
  3. Test email. Send a message to and from your business address if you changed nameservers.
  4. Keep the old host for a few days. If you moved from another provider, do not cancel it until traffic has fully shifted.

Moving an existing website, not just a domain? Follow the full website migration guide, which covers copying files, databases and email safely.

Quick troubleshooting

Symptom Likely cause First check
DNS_PROBE_FINISHED_NXDOMAIN Nameservers mistyped, or domain expired Registrar: domain status and nameserver spelling
Old site still loads Cached record, high TTL nslookup yourbusiness.in 8.8.8.8
Hosting default page appears Domain not added in the control panel cPanel Domains or Plesk Websites & Domains
Email stopped arriving MX records missing from the new zone Compare MX records with your screenshot
"Not secure" warning SSL not yet issued for the domain SSL/TLS Status in the control panel

For more errors and their fixes, see troubleshooting common hosting errors.

Frequently asked questions

Do I need to transfer my domain to my hosting company?

No. A domain can stay with any registrar and still point to hosting elsewhere. You only change its nameservers or DNS records, and you keep renewing the domain where it is registered.

How long does it take for a domain to start working on new hosting?

A record changes often show up within an hour once the old TTL expires. Nameserver changes usually take a few hours and can take up to 24 to 48 hours in some networks.

Will changing nameservers stop my email?

It can. When you change nameservers, the new DNS zone must contain your MX and other email records. Copy them across before you switch if your email is hosted somewhere other than your new web host.

Should I point www and the bare domain separately?

Yes. yourbusiness.in and www.yourbusiness.in are two different names in DNS. Most people add an A record for the bare domain and a CNAME for www that points to the bare domain.

Sources and further reading

Contact us