What is an A record and how do you set it up?
Published on June 19, 2026 9 min read
An A record links your domain to your server's IPv4 address. Learn what an A record is, how it works and how to set one up and check it.
An A record links a domain name or subdomain to the IPv4 address of the server where your website or service runs. It is the most widely used DNS record on the internet: without a correct A record, a browser has no way to know which IP address belongs to your domain, and your site stays unreachable. This article explains what an A record is, how it works, and how to set one up and check it yourself.
What is an A record?
The "A" stands for address. An A record is a DNS record that translates a hostname, such as yourdomain.com or www.yourdomain.com, into an IPv4 address. An IPv4 address is made up of four numbers from 0 to 255, separated by dots, for example 192.0.2.10.
The A record is the oldest and best known record type. It was defined in RFC 1035 back in 1987 and has type number 1 in DNS. Computers do not work with names but with IP addresses, so the A record forms the bridge between the name people remember and the address machines use.
How does an A record work?
When someone types yourdomain.com, the browser asks a DNS resolver which IP address belongs to that name. The resolver looks up the A record at the domain's nameservers and gets the IPv4 address back. The browser then connects to that server and loads the website.
In most DNS editors you fill in three things per record: a name (also called host), a type (A), and a value (the IPv4 address). The @ symbol stands for the domain itself, known as the root or apex. A subdomain is entered with its label, such as www, shop, or mail. That way each domain and subdomain can point to its own server.
| Name | Type | Value (IPv4) |
|---|---|---|
| @ | A | 192.0.2.10 |
| www | A | 192.0.2.10 |
| shop | A | 192.0.2.20 |
A record versus AAAA record and CNAME
The A record is often confused with two other records. The difference is in what they point to.
| Record | Points to | Use |
|---|---|---|
| A | An IPv4 address (32-bit) | Point a domain or subdomain to a server |
| AAAA | An IPv6 address (128-bit) | The same as an A record, but for IPv6 |
| CNAME | Another hostname | Point a name as an alias to another name |
An AAAA record (pronounced "quad-A") does the same job as an A record, but for the newer IPv6 standard. Many servers have both: an A record for IPv4 and an AAAA record for IPv6. This is called dual stack.
A CNAME record does not point to an IP address but to another name. One important rule: you cannot place a CNAME on the root domain (the apex, such as yourdomain.com without www). There you always use an A record or AAAA record. The reason is that the apex holds mandatory SOA and NS records, and a CNAME is not allowed to sit alongside other records on the same name.
The A record at LJPc
If you have a hosting package with LJPc and your domain uses our nameservers, the A record of your root domain is already set correctly. Plesk creates it when your package is set up, with the IP address of your hosting server, and usually an AAAA record for IPv6 as well. The name www is a CNAME record pointing to your root domain by default, so www automatically uses the same address. You only need to set an A record yourself if you want to point a subdomain or your whole domain to another server.
If you only have DNS management with LJPc, the A and AAAA records of your root domain initially point to an LJPc parking page. Replace them with the addresses of your own server.
You can see which IP address is in your A record right now in Plesk, under DNS Settings for your domain. If your domain is listed in the customer portal under Services > Domains, you can also see it on your domain's page, under DNS records. With a hosting package you can only view the records there: you change them in Plesk, through the Edit in Plesk button.
If your DNS is managed by another provider and you want your domain to point to your hosting at LJPc, enter the IP address from Plesk in the A record of your root domain at that provider, the IPv6 address in the AAAA record, and make sure www follows through a CNAME record or its own A record. The rest of such a move is explained in migrating your website to LJPc.
How to set up an A record
Where you set an A record depends on your package. If your domain comes with a hosting package, you manage your DNS records in Plesk. If you only have DNS management with LJPc, you do it in the customer portal. Which route applies to you is explained in managing DNS records. Your records only work if your domain uses the LJPc nameservers; how that works is explained in NS record explained and changing your nameservers.
In the customer portal
- Log in to the customer portal, open the Services menu, choose Domains and open your domain.
- To change an existing A record, click Edit in that record's row under DNS records. For a new record, click Add record; A is already selected under Type.
- Under Name, enter
@for your root domain, the name of a subdomain such asshop, or*for a wildcard. If you leave the field empty, it becomes@. You do not need to add your domain name after it. - Under Content, enter the IPv4 address, for example
192.0.2.10. If the address is not valid, you get the message Invalid IPv4 address. - Leave TTL at 3600 seconds or choose a value between 60 and 86400, and click Save.
If that name already has a CNAME record, as www does by default, you get the message that a CNAME cannot coexist with other records on the same name. Either let www follow your root domain through the CNAME, or delete the CNAME first and then add the A record.
In Plesk
You open Plesk from the customer portal; how that works is explained in opening Plesk from the customer portal.
- In Plesk, go to Websites & Domains, click the Hosting & DNS tab of your domain and then DNS. Then click Add Record.
- Choose A under Record type.
- Leave Domain name empty if the record is for your root domain. For a subdomain, enter only the first part, for example
shop; Plesk adds your domain name itself. For a wildcard, enter*. - Enter the IPv4 address under IP address.
- Confirm with OK. Plesk then queues the record, but does not apply it to your DNS zone yet.
- Click Update above the list. Plesk shows a notice there that your changes are not saved yet. Only after you click Update does the record go into your DNS zone.
When you edit or delete an A record, you also click Update afterwards, otherwise your DNS zone stays as it was. If you decide not to apply the queued changes after all, click Revert in the same notice.
If you point your domain to another server, also change or delete the AAAA record. Otherwise visitors on IPv6 still end up on the old server.
Multiple A records, subdomains, and wildcards
You can place more than one A record on the same name, each with a different IPv4 address. The DNS server then returns the addresses in a rotating order. This is called round-robin and spreads visitors roughly across several servers.
For subdomains you create separate A records, such as www, shop, or api, each with its own address. If you want every subdomain that you have not set up individually to point to the same address, you use a wildcard: an A record with the name *. At LJPc you can do this in Plesk and in the customer portal. A wildcard only takes care of DNS: whether a website actually appears on such a name depends on your hosting settings. To give a subdomain its own website, read creating a subdomain.
How to check an A record
After setting it up, you will want to confirm that the A record is correct. You can do this with a built-in command on your computer.
- Windows: in the command prompt, type
nslookup yourdomain.com. For the A record only, usenslookup -type=A yourdomain.com. - macOS and Linux: use
dig A yourdomain.com +short. This returns only the IPv4 addresses.
If the IP address shown matches your server, the A record is set correctly. If you still see the old address, the change has probably not been applied everywhere yet.
At LJPc, a new or changed record usually reaches our nameservers within a minute. To see that right away, query one of our nameservers directly, for example with dig A yourdomain.com @ns1.ljpc.network +short. Servers that still have the old value in their cache only see the change once the TTL expires, which at LJPc is usually after an hour. Read more in DNS propagation.
Troubleshooting common problems
| Symptom | Possible cause | Solution |
|---|---|---|
| Site still unreachable after a change | The TTL or cache has not expired yet | Wait until the TTL expires, at LJPc usually an hour, then clear your DNS cache if needed. Only after a nameserver change can it take 24 to 48 hours |
| Your new record is not in your DNS zone | Plesk queued the change but did not apply it | Click Update above the list of records |
| Error when adding a CNAME on the root domain | A CNAME is not allowed on the apex | Use an A record or AAAA record on the root domain |
| Wrong website or error page | The A record points to the wrong IP address | Check the IPv4 address and correct it if needed |
| Some visitors still see the old site | The AAAA record still points to the old server | Change or delete the AAAA record |
| Change does not seem to take effect | You are seeing a cached version | Test with dig or nslookup and wait until the cache refreshes |
If this table does not solve it, see troubleshooting DNS problems.
With a correctly configured A record, your domain points to the right server and your website is reachable. If you get stuck or are not sure which IP address to use, create a support ticket and we will be glad to help.
Frequently asked questions
What is the difference between an A record and a CNAME record?
An A record points a name directly to an IPv4 address. A CNAME record points a name to another name, as an alias. On the root domain you always use an A record, because a CNAME is not allowed there.
Can I use multiple A records for the same domain?
Yes. You can place several A records with different IPv4 addresses on the same name. The DNS server returns the addresses in a rotating order, which is called round-robin, and this spreads traffic roughly across several servers.
What is the difference between an A record and an AAAA record?
An A record points to an IPv4 address and an AAAA record points to an IPv6 address. They do the same job for different kinds of IP address. Many domains have one of each.
How long does it take for an A record to become active?
At LJPc, a new or changed record usually reaches our nameservers within a minute. If you work in Plesk, click Update above the list after saving, otherwise the change is not applied. Servers that still have the old value in their cache only see the change once the TTL expires, which at LJPc is usually after an hour. Only after a nameserver change can it take 24 to 48 hours.
Which IPv4 address should I put in my A record?
The IPv4 address of the server where your website runs. With a hosting package from LJPc, that address is already in the A record of your root domain; you can see it in Plesk under DNS Settings for your domain. If you point your domain to a server elsewhere, use the IPv4 address that provider gives you.
How do I check my A record?
On Windows use nslookup yourdomain.com, and on macOS or Linux use dig A yourdomain.com +short. The IPv4 address shown should match the address of your server.
Where do I set up an A record with LJPc?
If your domain comes with a hosting package, you add the record in Plesk, under DNS Settings for your domain, and then click Update. If you only have DNS management with LJPc, you do it in the customer portal on your domain's page, with the Add record or Edit button.
Can I create a wildcard A record?
Yes. Use an asterisk (*) as the name, under Domain name in Plesk or under Name in the customer portal. The record then applies to every name under your domain that does not have its own record. A wildcard only takes care of DNS: whether a website actually appears on such a name depends on your hosting settings.