Home / Guides

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

You have a domain and a site. Connecting them is a five-minute job with a few moving parts.

Two ways to connect

  1. Change nameservers. Your host manages all DNS for you. Simple, but it moves control away from your registrar.
  2. Add DNS records. You keep DNS where it is and add the records your host tells you to. More control.

The usual steps

  1. Add your domain inside your hosting dashboard.
  2. Copy the records or nameservers it shows you.
  3. Paste them into your registrar's DNS settings.
  4. Wait for the change to spread.
  5. Visit your domain and confirm it loads over HTTPS.

How long does it take?

Often minutes, sometimes a few hours, rarely up to a day. Lower the time-to-live (TTL) before a big change if you want it faster.

Do both versions work?

Decide whether your site lives at example.com or www.example.com, and redirect the other to it. Use the chosen one in all your links and in your sitemap.

If something is wrong

More on records

See DNS records explained.

Gear and reading that fits this guide

Photos and links go to Amazon. Check the current price, model and seller there.

The Linux Command Line, 2nd Edition product photo

The Linux Command Line, 2nd Edition

The quiet foundation for working with servers and hosting.

Check it on Amazon →

Want the whole shelf sorted by type? Browse all Top Picks →