How To Add An A Record To A Domain

The basic setup of most WordPress websites is:

There are two main ways of connecting the domain and the hosting. You could:

  • Set the A Record at the domain registrar to point to the hosting IP address, or
  • Set the nameservers at the domain registrar to that of the hosting account

I'll just cover the first in this tutorial.

How to add an A Record to a domain:

  1. Log in to your domain registrar
  2. Look for the domain you want to connect
  3. Go to the manage DNS area
  4. Add a record of type "A" with the IP address of your hosting
  5. Be sure to save the record

If you want to point the main domain at the hosting, there is probably already an A Record for "@" setup. The "@" means the main domain.

If you want to point a subdomain at the hosting account, you would add an A Record for that subdomain.

In these examples, I'm assuming you want yourdomain.com and www.yourdomain.com to point to your hosting as that's the most common reason for doing this.

Each registrar does it slightly differently. Below are walkthroughs of some of the more common registrars. Click the links below to jump to that section:

When you're finished, go to the What's Next section for figuring out when the update has worked.

Add an A Record to GoDaddy

Let's point yourdomain.com and www.yourdomain.com to your hosting account from GoDaddy.

Log into GoDaddy and find your domain.

If you're in the My Products section, click "DNS" next to your domain.

GoDaddy My Products section with arrow pointing at DNS

If you're in the My Domains section, click the three dots, then click "Manage DNS".

GoDaddy My Domains section with arrow pointing at Manage DNS

Whichever path you took, you'll end up at the DNS Managment page.

You'll probably see an A record for "@" (which is the root of the domain) pointing to "Parked".

GoDaddy A record for Parked circled

Click the pencil icon next to the A Record you want to edit.

GoDaddy DNS Management section with arrow pointing to pencil edit icon for A Record

Look for "Points to".

GoDaddy Records with parked circled

Change "Points to" to the IP address of your host. You should have received that in an email when you setup the hosting. The IP address will be a set of four numbers, separated by periods, but with no period at the end.

Be sure to click "Save".

GoDaddy Records section with Points to IP address circled and arrow pointing at Save

That should be all you need to do at GoDaddy to point the A Record to your host.

GoDaddy finished records showing update IP address A Record circled

Add an A Record to Namecheap

Let's set the A Record at Namecheap to point to your domain. The end result we want is for yourdomain.com and www.yourdomain.com to point to your hosting account.

Log in to Namecheap, find your domain, then click "Manage".

Namecheap domain list for domain with arrow pointing at Manage button

Go over to the Advanced DNS tab and click "Add New Record".

Namecheap domain section with advanced tab open and arrows pointing at advanced DNS tab and Add New Record button

Choose "A Record", if it's not already selected.

Namecheap Record type dropdown open with arrow pointing at A Record

Set the Host to "@" and the Value to the IP address of your host.

You should have received the IP address when you setup the hosting account.

Leave the TTL ("Time To Live") as the default.

Be sure to click the check mark to save the record

Namecheap DNS editor with circled @ host and 12.34.56.78 IP address fields. Arrow pointing to confirmation checkmark

Now we need to get rid of Namecheap's default parking records. I'm assuming your have a URL Redirect Record for @ pointing to the www subdomain of your site and a CNAME record for the www to parkingpage.namecheap.com.

If you have a different setup here, make sure you note down what's there and only proceed if you understand the setup.

Click the trash icon next to the URL Redirect.

Namecheap advanced DNS with arrow pointing to delete trash icon for URL Redirect Record

Click "Yes" to confirm deletion.

Namecheap advanced DNS with arrow pointing to Yes button on Delete Record confirmation

Next to the CNAME record for www, click the entry in the value column to edit it.

Namecheap advanced DNS with domain circled and arrow pointing to parkingpage.namecheap.com value

Change the value to whatever your domain is.

Click the check mark to save the record.

Namecheap advanced DNS with the domain in the value field for www CNAME record and arrow pointing to confirmation checkmark

Your setup should look something like this, with a CNAME record for www pointing to your domain and an A Record for @ pointing to your hosting IP address.

Namecheap advanced DNS showing a CNAME record for www to the domain and an A Record for @ with the IP address as the value

What's next?

When you're finished, use a DNS Propagation check to see whether the record has updated.

"Propagation" means to update all the records across the internet so that when someone types in your domain, the host is shown.

It can take up to 48 hours to fully propagate, but I find it's usually about an hour.

Mike Haydon

Thanks for checking out my WordPress and coding tutorials. If you've found these tutorials useful, why not consider supporting my work?

Buy me a coffee

Leave a Comment