Skip to content

What Is an A Record and How Do You Point a Domain to a Server?

An A record links a domain name to an IPv4 address. This guide explains how it works, how to point your domain at a server, and what to check when it does not resolve.

10 min readUpdated Nov 19, 2026By XPASS Editorial Team

What Is an A Record and How Do You Point a Domain to a Server?

When you type a domain name into a browser, the network underneath does not understand words. It understands numbers. The job of turning a name into a number belongs to DNS, and the record type that does this for IPv4 is called the A record. If you have ever bought a domain and a hosting account and wondered how the two get connected, the answer is almost always one small line in your DNS settings. This guide explains what an A record is, how to create one, how to check that it works, and what usually goes wrong.

What an A record is

DNS is a distributed database that stores facts about domain names. Each fact is a resource record, and each record has a type. The A record, where the letter stands for "address", stores a single piece of information: the IPv4 address that a name should resolve to. IPv4 addresses are the familiar four-number format such as 203.0.113.25. The record is defined in the original DNS specifications, RFC 1034 and RFC 1035, and it has worked the same way for decades.

A record looks simple, but it carries the most important job in the whole system. Without an address, a browser cannot open a connection. With the wrong address, the browser connects to the wrong machine, and your visitors see an error page, a different website, or nothing at all.

A useful way to think about it is as a line in a phone book. The name is the person, the A record is the phone number, and DNS is the book. If you change servers, you do not need to tell visitors a new name. You only update the number in the book, and everyone who looks it up afterwards gets the new number.

Every A record has four parts that you will see in almost any DNS control panel:

Field Meaning Example
Name (host) Which name the record answers for @ for the root domain, www for the www host
Type The record type A
Value (points to) The IPv4 address of the server 203.0.113.25
TTL How long resolvers may cache the answer, in seconds 3600

The "@" symbol is a convention used by many control panels to mean "the domain itself", sometimes called the apex or root. Other names, such as www, blog or shop, create subdomains. Each of those can point to a different server if you need it to.

How a lookup uses the A record

Understanding the path of a lookup makes troubleshooting much easier. When someone visits example.com, their device asks a recursive resolver, usually run by their internet provider or a public DNS service. If the resolver already has a fresh answer in its cache, it returns that answer immediately. If not, it works down the hierarchy: it asks a root server which servers handle the top-level domain, then asks those servers which nameservers are responsible for your domain, and finally asks your authoritative nameservers for the A record.

The authoritative nameserver returns the record, including its TTL. The resolver passes the address to the device and stores the answer until the TTL runs out. The device then opens a connection to that IP address, and the web server on that machine responds.

Two consequences follow from this process. First, the A record only lives at the nameservers that are authoritative for your domain. If you edit records at a panel that is not actually serving your domain, nothing changes for the public. You can read more about that relationship in our guide to nameservers and what changes when you switch them. Second, caching means that changes are not instant everywhere. The cache is a feature, not a fault, because it keeps DNS fast and reduces load on authoritative servers.

If you want a broader picture of the whole system before working with individual records, DNS explained for people who build websites covers the lookup chain, record types and caching in more depth.

What you need before you start

Pointing a domain to a server takes only a few minutes, but it goes smoothly when you prepare the following:

  1. The domain, and access to where its DNS is managed. This might be your registrar's panel or a separate DNS provider. The place that matters is wherever the domain's nameservers actually point.
  2. The server's IPv4 address. Your hosting provider or cloud console shows it. Make sure it is the public address, not a private one such as 10.x.x.x or 192.168.x.x, which cannot be reached from the internet.
  3. A web server that is ready to answer for the domain. The machine should be running and configured to serve the domain name you are about to point at it. Otherwise visitors will reach the server but see a default page or an error.
  4. A plan for the existing records. If the domain already has A records, decide whether you are replacing them or adding to them. Also note any records for email, because changing the website's address should not disturb mail.

Take a quick screenshot or copy the current records before editing. If anything goes wrong, you can restore the old values in a minute.

Step by step: point your domain to a server

The exact buttons differ between control panels, but the steps are the same everywhere.

Step 1: Open the DNS zone. Log in and find the DNS management page for your domain. Make sure the domain is using the nameservers belonging to this panel, as described above.

Step 2: Lower the TTL in advance, if you can. If the domain is already live and you are moving it, change the TTL of the old record to something short, such as 300 seconds, a day before the move. Then, when you switch the address, caches expire quickly. If the domain is brand new, this step is not needed.

Step 3: Add or edit the record for the root domain. Create a record with type A, name @, and the server IPv4 address as the value. If an A record for @ already exists, edit it instead of adding a second one, unless you intentionally want more than one address.

Step 4: Handle www. Visitors often type the www form. You can add a second A record with name www and the same IP address, or create a CNAME from www to the root domain. The simplest approach is an A record for both names, each with the same IP address. A CNAME from www to the root domain also works, but it is a separate topic.

Step 5: Save and wait for the change. Most panels apply the change to their nameservers within moments. Public resolvers will pick it up as their caches expire.

Step 6: Verify. Use a lookup tool such as dig example.com A, nslookup example.com, or an online DNS checker, and confirm that the answer shows your server IP. Then open the site in a private browser window to avoid cached pages.

Step 7: Raise the TTL again. Once the site works as expected, set the TTL back to a longer value such as 3600 or more. Longer TTLs reduce lookups and make DNS slightly faster for visitors.

A worked example

Suppose you own mybakery.example and your hosting provider tells you the server address is 203.0.113.25. You want both mybakery.example and www.mybakery.example to open the same website.

In the DNS zone you would have:

Type Name Value TTL
A @ 203.0.113.25 3600
A www 203.0.113.25 3600

After saving, you run dig mybakery.example A +short. If it prints 203.0.113.25, the record is live at your authoritative nameservers and at the resolver you asked. If it prints the old address, the resolver is still serving a cached answer, and you should wait for the old TTL to pass. If it prints nothing, the record may be missing, the name may be mistyped, or the domain may be using different nameservers than the panel you edited.

Later, the bakery moves to a new server with address 198.51.100.80. The owner lowers the TTL to 300 a day ahead, edits both records to the new IP, verifies with dig, and then raises the TTL again. Visitors move across smoothly, and nobody has to change anything on their side.

Apex domains, subdomains and multiple records

Many people are surprised that the root domain and www are treated as separate names. They are separate. A record for @ does not automatically cover www, and a record for www does not cover @. If only one exists, one of the two forms of your address will fail. Always check both.

Subdomains work the same way. You can point app.example.com to one server and example.com to another simply by giving each its own A record. This is common when a marketing site lives on one host and a web application lives on another.

A single name can also have more than one A record. When there are two or more, resolvers typically return all of them, often in a rotating order, and clients try the addresses in turn. This is sometimes called round-robin DNS. It spreads requests and gives a crude form of redundancy, but standard DNS does not check whether a server is healthy. If one of the addresses goes down, some visitors will still be sent to it unless you use a service that adds health checks.

Wildcard records, written as *, answer for any name that does not have its own record. They are convenient for platforms that create many subdomains, but they can also hide typing mistakes, because misspelled subdomains will resolve instead of failing.

IPv4 and IPv6

An A record covers IPv4 only. Modern networks also use IPv6, whose addresses are longer and written in hexadecimal. A name that should be reachable over IPv6 needs a separate AAAA record. If your server has both kinds of address, publish both so that visitors on either type of network can reach you. The record that handles the IPv6 side is covered in AAAA records and how they relate to IPv6.

A common mistake is publishing an AAAA record that points to an address on which the web server is not actually listening. Browsers on IPv6-capable networks may try that address first, which produces slow loading or errors even though the IPv4 side is fine. Only publish an AAAA record when you have tested the IPv6 address.

TTL and propagation

TTL means time to live. It tells resolvers how many seconds they may keep an answer before asking again. A TTL of 3600 means up to one hour. When you change a record, there is no central switch that flips it for the world. Instead, each resolver that cached the old answer keeps using it until its copy expires, and then it fetches the new one.

This is why people talk about "propagation", although the word is slightly misleading. Nothing is being pushed outward. The new answer is available at the authoritative servers immediately, and the rest of the internet catches up as caches expire. The practical rule is that the worst-case delay is about the old TTL, though some resolvers and devices hold answers longer than they should.

To keep a migration calm, keep the old server running for a while after the switch. Visitors who still resolve the old address will reach the old machine, which can continue to serve the site or redirect to the new one. Then you can shut it down once traffic has moved.

Limits and what to watch for

  • An A record must contain an IP address, not a name. If your provider gives you a hostname instead of an address, you need a different record type, normally a CNAME or an ALIAS-style feature offered by some DNS hosts.
  • The address must be reachable. Private ranges do not work for public sites. Check that firewalls allow the ports your site uses, usually 80 and 443.
  • Dynamic addresses change. If the server's IP can change, for example a home connection, the record will go stale. Use a static address or a dynamic DNS service built for the purpose.
  • Nameserver mismatch. Editing records at one panel while the domain uses nameservers elsewhere has no public effect. Always confirm which nameservers are authoritative.
  • Duplicate and conflicting records. Leftover A records from a previous host can send some visitors to the old server. Remove addresses you no longer use.
  • Secure connections need matching names. Once the domain points to the server, the server must hold a certificate that covers the domain name if you want HTTPS to work without warnings.
  • Do not rely on one record for email. Mail delivery uses its own records. Changing the website's A record should not affect them, but you should confirm that mail records are untouched after any edit.
  • Respect lawful use. Only point a domain at servers that you are entitled to use and that comply with your hosting provider's rules and local law.

Troubleshooting checklist

If the domain does not reach your server after the change, work through the following in order:

  1. Query the authoritative nameserver directly, for example dig @ns1.yourprovider.example example.com A. If it shows the right address, the record is correct and the delay is caching.
  2. Query a public resolver and compare. A difference means caching or a different set of nameservers.
  3. Check that you edited the right name. @ and www are different entries.
  4. Look for typos in the IP address. One wrong digit sends traffic to a stranger's machine.
  5. Confirm that the server answers on that address by connecting to the IP directly, for example with a browser or curl.
  6. Clear your own caches. Browsers, operating systems and even local routers can hold DNS answers. A restart or a different network can reveal whether the problem is local.
  7. Check the web server configuration. If the page says "default site" or shows a different website, DNS is working and the server just does not have the domain configured.

Working from the top down keeps you from guessing. Each step narrows the problem to DNS, caching, the network, or the web server.

Summary

An A record connects a domain name to an IPv4 address, and it is the step that makes your domain open your server. To use it, find your DNS zone, add an A record for the root domain and for www, enter the public IP address, save, and verify with a lookup tool. Lower the TTL before a move, keep the old server alive briefly afterwards, and remember that caching explains most delays. Use an AAAA record for IPv6, make sure you are editing at the panel that really serves your nameservers, and keep the address list clean. If you are choosing or managing a name for your next project, you can look at the options on the domains page.

Frequently asked questions

What does an A record do?

An A record maps a domain name or subdomain to an IPv4 address. When a browser looks up your domain, the DNS answer tells it which server address to connect to.

How long does it take for a changed A record to work?

It depends mostly on the TTL of the old record and on resolver caches. Many changes appear within minutes, but some resolvers keep the old answer until the previous TTL expires, so allow extra time.

Can a domain have more than one A record?

Yes. A name can have several A records with different IP addresses. Resolvers may return them in rotating order, which is a simple way to spread traffic, but it is not the same as a health-checked load balancer.

Should I use an A record or a CNAME for my domain?

Use an A record when you have a fixed IPv4 address. Use a CNAME when a provider gives you a hostname to point to. A bare root domain normally cannot hold a CNAME in standard DNS.

Do I need an AAAA record as well?

Only if your server also has an IPv6 address you want visitors to use. An A record covers IPv4, and an AAAA record covers IPv6.

About the author

Bob Kanokphon Thongdee, founder of XPASS VPN

Bob Kanokphon Thongdee

  • Founder of XPASS VPN
  • Co-founder of eSIMonline.asia
  • More than 7 years in online marketing
  • Founder of Cojourney Visa and Cojourney Travel

Ready to register your domain?

Search a name, compare extensions and pay once for the years you choose.

.com registration from $18.81 for the first year

Search domains

Keep reading

Domain & DNS Guides

What Is a Nameserver and What Happens When You Change It?

Nameservers decide where your domain's DNS records live. This guide explains delegation, what moves when you change them and how to switch without downtime.

10 min read

Domain & DNS Guides

What Is an AAAA Record and How Does It Relate to IPv6?

The AAAA record is the IPv6 counterpart of the A record. This guide explains the format, when you need it, how to add it safely and how to test that IPv6 works.

10 min read

Domain & DNS Guides

What Is DNS? A Plain Explanation for Web Builders

DNS is the naming system that connects your domain to your website and email. This guide explains lookups, record types, TTL and caching in plain language.

10 min read