Guides

Buying a Domain and Connecting It to Hosting: A Beginner's Walkthrough

A beginner's walkthrough for buying a domain and connecting it to web hosting: choose a registrar, set DNS, add SSL, set up email and check it all works.

By Zebra Hosting Cloud

Buying a domain and putting a website on it involves three separate things that beginners often confuse: the domain registration, the DNS that says where the domain points, and the hosting that stores the site. Understanding who does what makes the process routine, and it makes troubleshooting much easier when something does not load straight away.

The three pieces

PieceWhat it isWhere it lives
Domain registrationThe right to use a name, renewed yearly or longerA registrar (the company you buy the name from)
DNSThe directory that maps the name to serversThe registrar, the host or a separate DNS provider
HostingThe server that stores and serves your site and mailYour web host

The connecting step is telling DNS where your hosting is. You can buy the domain and the hosting from the same company or different ones; both work.

Step 1: Choose and buy the domain

Pick a registrar that is clearly identified, shows renewal prices before checkout, supports two-factor authentication and lets you transfer the domain away freely. Search for your name, choose the extension, and check the renewal price and what is included. Be careful with optional extras: privacy protection can be worthwhile, but the other add-ons are often unnecessary. Register the domain with your own details and an email address you will keep for years, and enable auto-renewal. If you need ideas on choosing the name itself, our guide to choosing a domain name covers it.

Step 2: Get your hosting details

After you order hosting, you receive the information needed to connect the domain. It will include either the host's nameservers (such as ns1.example-host.com) or the IP address of the server, or both. Keep these safe. Add the domain to your hosting account in the control panel first, so that the server knows to answer for it. In Plesk, this is done by adding a domain or site to your subscription; the knowledge base has the details.

Step 3: Point the domain at the hosting

There are two methods:

Method A: change the nameservers

At your registrar, replace the default nameservers with the ones from your host. From then on, the host's DNS is in charge, and records you create in the hosting panel take effect. This is the simplest method for most beginners, because the host can manage the whole zone, including mail records.

Method B: keep your DNS provider and edit records

If you want DNS to stay at the registrar or with a service such as Cloudflare, leave the nameservers alone and create an A record for the domain (and www) pointing to the host's IP address. You must also add the mail records yourself if you use email. Method B is useful when you want to keep DNS independent from hosting, so you can change hosts by editing one record. Our article on pointing a domain to hosting compares the two methods in detail.

Step 4: Wait, then check

DNS changes are not instant. Caches around the internet hold old answers for a period set by the TTL, so a change can take minutes to a few hours to be visible everywhere, and sometimes up to a day or more. While you wait, you can test by editing the hosts file on your computer, or by using an online DNS lookup tool to see which IP address the domain currently returns.

Step 5: Turn on HTTPS

Once the domain resolves to your hosting, issue an SSL certificate. On Zebra Hosting plans, Plesk can issue free Let's Encrypt certificates; see the SSL page. Then enable the redirect from HTTP to HTTPS and make sure your site's address setting uses https. If you also use Cloudflare, choose a full encryption mode rather than a flexible one to avoid redirect loops.

Step 6: Set up email

  1. Create the mailboxes in your panel or at your email provider.
  2. Check that the MX records point to the right mail server.
  3. Add SPF, DKIM and DMARC records so your messages are trusted.
  4. Send test messages to and from an outside address.

Common problems and fixes

  • The site shows a default page or another site: the domain has not been added to the hosting account, or DNS still points to an old server.
  • It works on some networks but not others: DNS caches have not updated everywhere. Wait and retest.
  • The certificate fails to issue: the domain must resolve to the server before validation can succeed.
  • The www version does not work: add a CNAME or A record for www and redirect one version to the other.
  • Email stopped after changing nameservers: the new DNS zone is missing the old MX and TXT records.

Keep control of your domain

Protect the registrar account with a strong password and two-factor authentication, enable registrar lock to prevent unauthorised transfers, and note the renewal date. Keep the domain registered in your name or your company's name, not your developer's.

Registrar and host: same company or separate?

Buying both from one company is convenient because nameservers and DNS are pre-connected. Buying them separately keeps your options open: if you ever change hosts, the domain stays where it is and you only update DNS. Many experienced site owners prefer the second approach for exactly that reason. Whichever you choose, make sure you can log in to the registrar yourself, that the contact email is yours and that you know how to get the transfer authorisation code if you ever want to move the domain.

Connecting your domain to Zebra Hosting

Our shared and WordPress plans activate within minutes of payment, and you can point your existing domain to them using nameservers or an A record, with Plesk and free SSL included. If you get stuck, our support team helps in 17 languages through the contact page, and the shared hosting plans are a good place to start.