Navigating A Records in DNS: Essential for Directing Your Website Traffic

An A record is the real "phone number" written in the DNS phone book: it points your domain name at the numeric address (the IP) of the computer your website lives on. If you have ever asked "I switched servers, so why does my site still load the old one?", the answer is usually in this one record. Understanding it tells you which step matters most when you move hosts, and lets you tell a real mistake apart from a change that simply has not finished spreading yet. That saves wasted effort and stops you cutting over before everything is ready.

Navigating A Records in DNS: Essential for Directing Your Website Traffic
The A record is the single line in DNS that ties your domain to your server's real numeric address, which is why "I moved servers but my site still loads the old one" stops being a mystery once you understand it.

Who should read this?

If you run your own website, and especially if you are about to change hosts or move servers (or you already have, and the new site stubbornly will not appear), this is worth a few minutes. It focuses on one type of DNS record: the A record. If you do not have a website and do not deal with any of this, feel free to skip it.

Why the A record exists in the first place

Every computer that serves something on the internet (a server, which is just a computer left switched on, ready for visitors at any time) has a real identity that is a string of numbers called an IP address, for example 142.250.x.x. When computers connect to each other, the numbers are what they actually recognise. The trouble is that nobody can remember a long string of numbers, let alone print it on a business card or an ad.

That is the problem domains and the DNS system were built to solve. DNS works like the internet's phone book: you give it a name that is easy to remember (your domain), and it looks up the matching "number" for you. The A record is that actual number written under your domain in the phone book. It says, in effect, "for this domain, connect to the computer at this IP address." When a visitor types your domain into a browser, DNS quietly reads this A record so the browser knows which computer to knock on.

So the A record solves a very practical problem: it lines up the easy-to-remember name with the numeric address the machines actually use. Because of that layer, the day you move your site onto a faster computer, you only update this one record to point at the new address. You never have to tell visitors "our number changed", because they keep using the same domain.

What an A record actually looks like

When you fill one in inside a control panel, an A record comes down to three fields. In plain terms, you are writing one line in the phone book: "this name maps to this number, and you may remember it for this long."

  • Host (or Name): which name this record applies to. An "@" or a blank entry means the root domain itself (yourdomain.com); "www" means the www subdomain. In other words, you are choosing which name gets looked up.
  • Value: the server's IPv4 numeric address, for example 142.250.1.1. This is the "number" a visitor is ultimately connected to, and it is the heart of the record.
  • TTL: how long the answer may be cached before it has to be checked again, given in seconds (3600 is one hour). It decides how soon, after you later change this record, the rest of the world asks for the new number.

One thing to watch: different hosting providers label these differently. The "Host" above is called "Name" in some panels, and "Value" might appear as "Points to", "Address", or "Target". The wording changes, but you are filling in the same thing. (As an aside, newer IPv6 addresses use an almost identical record called an AAAA record, on the same principle.)

What it roughly looks like in practice

Take GoDaddy, a common registrar. Once signed in, this lives under your domain's DNS area (Manage DNS), where you open Records, choose Add, set the type to "A", and fill in the same three fields (Name, Value being the IP, and a TTL) before saving. Other panels put it in slightly different places with slightly different names, but it always comes down to picking the type, entering the name and the address, and saving. This is not a task for you to do yourself; it is simply so you recognise the thing when you see it.

One catch: change it in the right place

This step is easy to miss and the quickest way to waste an afternoon: an A record only takes effect if you change it at the DNS provider your Name Servers actually point to. The Name Servers decide which "phone book company" is holding your domain's records in the first place. If your domain has handed its Name Servers over to a service like Cloudflare, but you go and edit the record back at your original registrar, you have written the new number into a book nobody is reading, and nothing will change however long you wait. Confirming where your Name Servers point before you touch the A record saves a great deal of "I changed it and nothing happened".

"I switched servers, so why does my site still load the old one?"

This is a common confusion after a move, and there are usually two layers to it.

Layer one: the A record still points at the old address

Moving servers means copying your website onto a different computer, and that new computer has its own IP address. If the A record was never changed and still points at the old computer's number, visitors who follow your domain will keep landing on the old machine. So when you move, updating the A record to the new address is the step that actually redirects your traffic. The files can be on the new server, but if the "number in the phone book" still reads the old one, visitors keep arriving at the old door.

Layer two: it is correct now, but the world is still using the old number it wrote down

Even once the A record is correct, you often will not see the change straight away. To keep access fast worldwide, networks and servers along the way cache (temporarily store) the answer they looked up for a set period. That period is the TTL described above: until it expires, those caches keep handing out the number they last looked up. Until the old record expires, many places around the world are still holding the old number, so some people see the new site while others still see the old one. As each cache expires, the new address takes effect region by region, anywhere from a few minutes to a couple of days. If you want to really understand why a change has to wait, our overview of the different DNS record types is the place to start.

So "I changed the A record and nothing happened" is usually not a mistake. It is the caches around the world catching up. This is also why a professional move shortens the TTL beforehand and cuts over during a quiet period, rather than flipping the switch at peak traffic.

A records and CNAMEs get mixed up

Many people confuse A records with CNAME records. In short: an A record gives a numeric address (an IP) directly, so it is the "number itself", while a CNAME points one name at another name, more like "answer this under a different name." They serve different purposes, and using the wrong one can leave a site unreachable. We have written a separate piece that sets out where an A record fits and where a CNAME fits, and knowing the difference makes the wrong choice far less likely.

How 5U Website handles A records for clients

An A record is the kind of thing nobody notices when it is right, yet a wrong entry or an unplanned cutover can leave a whole site flickering between old and new for a while. After looking after a great many client websites, our habit when moving hosts is to record the current state first, shorten the TTL ahead of time, confirm the website actually runs on the new computer, and only then update this record, leaving a window for the caches to refresh. That keeps the half-switched state, where some visitors see the new site and others the old one, as short and harmless as possible.

Let us handle it

You do not need to work out what the A record should say or when to cut over. That is our day job. If your website is about to move, change hosts, or is already showing odd "I changed it but nothing happened" or "it works sometimes" behaviour, send 5U Website an email describing what is going on. We usually reply within one to two business days.

Last updated:

Get a 5U® Website Consultation

Free Quote

778-883-9222

1-day reply, guaranteed
2-hour, free consultation

WeChat

WeChat Us

Get a 5U® Website Consultation

WeChat Us

778-883-9222

1-day reply, guaranteed
2-hour, free consultation