How to Point a Domain Name to Your Website

Hosting, Security & Maintenance3 min readBy the Monopage team

You've bought a domain and built a site. To make the address work, you need to tell the internet where your site lives. There are two main ways, and a few checks to do before and after.

Before you start

  1. Find out where your DNS is managed. It's usually your registrar, unless you've changed the nameservers. See how DNS works.
  2. Get the details from your host. They'll provide either nameservers to use, or the IP address or hostname to point to.
  3. Record your existing DNS settings, especially email records.
  4. Lower the TTL on existing records a day ahead if you're moving a live site, to reduce delay.

Method 1: Change the nameservers

Here you hand control of your DNS to the host (or another DNS provider).

  1. Log in to your registrar and open the domain's nameserver settings.
  2. Replace the current nameservers with the ones your host gave you.
  3. Save the change.
  4. In the new DNS zone, make sure all records you need are there, especially email (MX and TXT) records.

Pros: simple, with the host managing everything.

Cons: you must recreate any existing records, or email and other services may break. All changes happen at the new DNS host.

Method 2: Keep DNS where it is and edit records

You leave the nameservers alone and change individual records.

  1. Open the DNS settings at your current DNS host.
  2. For the root domain, create or edit an A record pointing to the IP address your host supplied (and an AAAA record if they give an IPv6 address).
  3. For www, create a CNAME record pointing to the hostname your host gave you, or to the root domain.
  4. Delete conflicting old records pointing to the previous server.
  5. Leave MX and TXT records alone unless you're also moving email.

Some hosts offer ALIAS or CNAME flattening for the root domain instead of a fixed IP.

Pros: you keep control of the rest of your records, including email.

Cons: you must update records if the host's addresses change.

Handle www and non-www

Choose a preferred version (with or without www) and redirect the other to it with a permanent redirect. Both versions must resolve. This avoids duplicate versions of your site. See 301 redirects explained and duplicate content and SEO.

Set up HTTPS

After DNS points correctly, request or enable an SSL certificate through your host. Many hosts issue free certificates automatically once DNS is correct. Then make sure all addresses redirect to HTTPS. See SSL and HTTPS.

Wait for propagation

Changes may take from minutes to a day or so to be visible everywhere. Meanwhile, some visitors may see the old site and others the new. You can check with online DNS lookup tools, or by testing from a different network such as a mobile connection.

Avoid downtime when moving a live site

  1. Build and test the new site on the new host first, using a temporary address or staging copy. See what is a staging site
  2. Lower TTLs
  3. Copy all DNS records needed
  4. Switch the records or nameservers
  5. Keep the old hosting active for several days
  6. Re-check forms, email, and key pages

See how to migrate a website without losing SEO.

Troubleshooting

  • Site not loading: check that the A record points to the right IP and that the host has your domain set up
  • Certificate errors: wait for propagation, then re-issue the certificate
  • Email stopped: compare MX and TXT records with your notes. See email for your domain
  • Old site still showing: clear your browser cache, flush DNS cache, or test from another device

Keep it secure

Use two-factor authentication on registrar and DNS accounts. See password managers for small teams.

The bottom line

Either switch nameservers to your host or edit A and CNAME records yourself. Keep email records intact, handle www, enable HTTPS, and allow time for changes to spread.