william awe

← back to articles

How to connect a domain to your website

You have built a site and deployed it to a host like Vercel, Netlify, or GitHub Pages, but it is sitting on a long default address. What you actually want is for people to reach it at your own name, like yourdomain.com. Connecting a domain is how you do that, and it comes down to buying the name and then pointing it at your host.

Step 1: buy the domain

You buy a domain from a registrar. Common ones are Namecheap, Porkbun, Cloudflare, and GoDaddy. You pay a yearly fee to hold the name. At this point the domain is yours, but it does not point anywhere yet.

Step 2: understand DNS

DNS is the system that translates a human name like yourdomain.com into the address of the server that actually serves your site. You connect a domain by editing a few DNS records at your registrar. The two you will use most are:

Step 3: add the domain in your host

Go into your hosting dashboard and add your custom domain there first. The host will then tell you exactly what to point at. Usually it gives you an IP address for an A record, or a target address for a CNAME. Keep that page open, because you need those values in the next step.

Step 4: add the records at your registrar

Back in your registrar's DNS settings, enter the values your host gave you. A typical setup is an A record for the bare domain (yourdomain.com) and a CNAME for the www version pointing at your host. Some hosts prefer you change the nameservers instead, which hands DNS management to them entirely.

Step 5: wait, then check

DNS changes are not always instant. They can take anywhere from a few minutes to a couple of days to spread across the internet, which is called propagation. Most modern hosts also set up HTTPS for you automatically once the domain resolves, so you get the padlock without extra work. If it is not live after a while, a DNS checker tool will show you whether your records have taken effect yet.

That is the whole flow: buy the name, add it in your host, copy the records into your registrar, and wait for it to propagate. After that, your site answers to your own domain.