How to add or edit an A record
Where to find the A record setting in your DNS zone, what each field means, and how to confirm the change actually took.
An A record is a name paired with an IPv4 address. Editing one tells DNS "when anyone asks about this name, answer with this address" — nothing more complicated than that, though it is easy to get the name field or the destination wrong in ways that are hard to spot afterwards.
Before you touch anything, know where the record actually lives
DNS records are edited wherever a domain's authoritative nameservers point — which might be your hosting control panel, your registrar, or a separate DNS service. Editing an A record in the wrong place changes nothing on the live domain; the panel will happily save your change and it will simply never be consulted.
Run nslookup -type=ns yourdomain.com (or dig +short NS yourdomain.com on macOS or Linux) and compare the result against your control panel. See how to check which DNS a domain is actually using if the two do not obviously match.
Adding or editing the record
-
Open the DNS zone for the domain
In your control panel, find the DNS section and select the domain you want to change. You should see a list of its existing records grouped by type — A, CNAME, MX, TXT, and so on.
-
Choose the name
@(or the domain left blank) means the bare domain itself —yourdomain.comwith nothing in front. A name likeshopcreates a record forshop.yourdomain.cominstead. Get this field wrong and you will point a subdomain, or the wrong thing entirely, rather than the domain you meant. -
Enter the IPv4 address
This has to be a plain IPv4 address — four numbers separated by dots, such as
203.0.113.10— never a hostname. If you are pointing at your own hosting, the correct address is shown in your control panel or welcome email; do not reuse an address from a guide or a previous project, since it almost certainly belongs to someone else's server now. -
Set the TTL
Leave this at its default — usually somewhere between 3600 and 86400 seconds — unless you are planning a change and want it to take effect quickly. Dropping it to 300 seconds a day in advance means the eventual switch spreads in minutes rather than hours. See what a DNS TTL is for the full explanation.
-
Save the record
If you were editing an existing A record rather than adding a new one, make sure you changed the value on the correct existing row instead of leaving a duplicate behind — two A records under the same name is valid DNS, but it means visitors are randomly sent to either address, which is rarely what you want.
Editing the record for www too
Check what currently exists for www. Most zones set it up as a CNAME pointing back at the bare domain, in which case it will follow your A record change automatically and needs no separate edit. If it is instead a second, independent A record, update it to match — otherwise the site works on one version of the address and not the other, which is a confusing thing to discover after the fact.
Confirming the change
Do not judge this by reloading the site in your own browser. Browsers and operating systems cache DNS aggressively, and a cached answer will have you chasing a problem that has already been fixed. Query DNS directly instead.
On macOS or Linux:
dig +short yourdomain.com
On Windows:
nslookup yourdomain.com
Either command should return the address you just set. If it still shows the old one, the record has not finished spreading yet — see how long DNS propagation takes for realistic timing, which is usually a few hours rather than the full 48 often quoted as a worst case.
A phone on mobile data with Wi-Fi turned off queries through an entirely different path and cache than your home connection, which makes it one of the fastest ways to tell whether a change has actually gone live anywhere else in the world yet.
Common problems
- Wrong record edited. DNS being edited at the registrar while the domain's nameservers actually point elsewhere is the single most common cause of "I changed it and nothing happened."
- A subdomain accidentally created. Typing anything other than
@into the name field creates a new subdomain rather than changing the main domain. - Two conflicting A records left in place. If an old record was never removed, the domain answers inconsistently depending on which one a resolver happens to pick.
- The address is not actually reachable. An A record pointing at a correctly formatted but wrong or offline IP address will resolve fine and still fail to load anything, because DNS has no way to check whether the destination actually works.
If you have checked all of the above and the record still is not behaving as expected, contact our support team with the domain name and what you changed, and we can check what it is currently resolving to from our side.
Related reading
What each DNS record type actually does, in plain terms, and the handful you will realistically ever need to touch.
What is a DNS TTL?The number of seconds a DNS answer is allowed to be cached before it has to be checked again, and why it decides how fast a change spreads.
How to point a domain to your hostingThe two ways to connect a domain to a hosting account, when to use each, and how to tell the change has actually taken effect.
How to check which DNS a domain is actually usingHow to find out, with certainty rather than a guess, which company actually controls a domain DNS right now.