Sahel Escale

Domains 5 min read

How to Connect a Domain Name to Your Website (Step by Step)

This article contains an affiliate link. If you buy through it, I may earn a small commission at no extra cost to you.

You bought a domain name and you have a website, but typing your new address shows nothing, or the wrong page. This guide explains what is missing and how to connect the two, one clear step at a time.

What does "connecting a domain" mean?

Think of it like a house. Your website is the house, your hosting is the land it stands on, and your domain is the street address. Buying an address does not move the house: you must tell the world where the house is. That information is stored in DNS, which works like a phone book for the internet. Connecting your domain means writing the right entry in that phone book.

Before you start

Step 1: Choose your method

There are two ways to connect a domain. Your host usually tells you which one to use, so look in its help pages first.

Method A: change the nameserversMethod B: add DNS records
What you doTell your registrar to use your host's DNS serversKeep the registrar's DNS and add a few lines to it
Where DNS is managedAt your hostAt your registrar
Best forHosts that give you two nameserver addressesHosts that give you an IP address or a target name
DifficultyEasyMedium

Method A: change the nameservers

This is the method I used. My host gave me two nameserver addresses, and I entered them at Namecheap, where I bought my domain. The screens look similar at other registrars, but the names of the menus may differ.

  1. Copy the nameservers from your host. They look like two addresses, each ending with the host's name. Write them down exactly, because one wrong letter breaks everything.
  2. Log in to your registrar and open your list of domains.
  3. Open the settings of your domain. At Namecheap, click Manage next to the domain.
  4. Find the "Nameservers" setting. It is usually a drop-down menu showing the registrar's default DNS.
  5. Choose "Custom DNS". Two empty boxes appear.
  6. Paste the two addresses from your host, one per box. Make sure there is no space before or after each one, and delete any old address left in the boxes.
  7. Save. At Namecheap, click the green check mark next to the boxes.
  8. Go back to your host and ask it to check the nameservers. Some hosts have a button for this and send an email when the domain is active.

Method B: add DNS records

Use this method if your host asks you to add records instead of changing nameservers.

  1. At your registrar, open the settings of your domain and find the page for DNS records. At Namecheap, it is the Advanced DNS tab.
  2. Delete the parking records. A newly bought domain often points to a "parked" page of the registrar. Remove the old records of type A and CNAME that point to it, or your site will not appear.
  3. Add the records your host gives you. They usually look like this:
TypeHostValueWhat it does
A@the IP address your host gives youConnects yourdomain.com
CNAMEwwwthe target name your host gives youConnects www.yourdomain.com

The symbol @ means "the main domain with nothing in front of it". Copy the values from your host, not from this page, because they differ from one host to another.

Step 3: Tell your host about the domain

Many hosts also need you to add the domain on their side. Look for a section called Domains or Custom domain in your project, type your domain, and also add the www version. This is the step that makes the host serve your site when someone types your address.

Step 4: Wait, then test

After the change, the information spreads across the internet. This can take from a few minutes up to 24 hours. You cannot speed it up, so do not change settings again and again, because that can make the wait longer.

  1. Open a private browser window and type your domain.
  2. Test yourdomain.com and www.yourdomain.com.
  3. Check that the address begins with https and that the browser does not show a security warning.

Fix the most common problems

What you seeLikely causeWhat to do
The registrar's "parked" pageOld parking records still existDelete the old A and CNAME records, or check that Custom DNS is saved
"Site cannot be reached"The change has not spread yet, or a value is wrongWait a few hours, then compare every value letter by letter
"Not secure" warningThe security certificate is not ready yetWait 15 to 60 minutes and refresh
Main domain works, www does notThe www record or host setting is missingAdd the www version at your registrar and at your host
Your old page appearsYour browser kept an old copyPress Ctrl + F5 or use a private window

If you also use email on your domain

If you already created email addresses such as contact@yourdomain.com, do not delete the MX and TXT records. They control your email. Only remove the parking records for the website.

Final checklist

Final thoughts

Connecting a domain feels technical the first time, but it is only two things: tell the registrar where your DNS is, and tell your host which domain to serve. Take it slowly, copy each value carefully, and give it time. Next, you can build a free email list to keep in touch with your first visitors.

← Back to all guides