An A record is a DNS (Domain Name System) setting that points a domain or subdomain to an IPv4 address, telling browsers which server to connect to when someone visits your site. This article explains how A records work and how to view or add one in cPanel and DirectAdmin.
How an A record works
A record stands for "address record". It links a host name, such as www.example.com, to a numeric IPv4 address, such as 104.218.15.162. When a visitor types your domain into their browser, the A record tells the browser which server to load the site from.
A records do not always match one-to-one with IP addresses. One IP address can serve many domains, and in some setups a single domain can resolve through more than one IP address for load balancing or fault tolerance. For IPv6 addresses, the equivalent record is called an AAAA record. A related record type, the CNAME record, points one domain name to another domain name rather than directly to an IP address.
Most hosting accounts come with default A records already set up: one for your root domain (example.com), one for www, and one for mail, all pointing to your server's IP address. For a full overview of how all DNS record types fit together, see our complete guide to DNS records.
Where to find your IP address
Only change an A record if you know the correct IP address to use. You can find this in your welcome email or by logging in to the client area. Do not guess an IP address, as an incorrect entry will take your site or email offline.
Adding or editing an A record
cPanel
- Log in to cPanel and go to the Domains section.
- Click Zone Editor.
- Find the domain you want to change and click Manage.
- To add a new record, click + A Record, or use Manage to see the full list of existing records.
- In the Name field, enter the domain or subdomain (for example, type "blog" to create
blog.example.com). - In the Address field, enter the IP address the record should point to.
- Set the TTL (time-to-live, the number of seconds before the record is re-checked). If you are unsure, use 14400, which is 4 hours.
- Save the record.
The Zone Editor can show up to 100 records per page, so use the type filter to find A records quickly. Only edit or delete the specific record you intend to change: removing the wrong A record (especially for @ or mail) can take your website or email offline.
DirectAdmin
- Log in to DirectAdmin and click Account Manager in the left-hand menu.
- Click DNS Management.
- Click Add Record at the top of the table.
- Select A as the record type.
- Enter the subdomain name, or leave it blank for the root domain.
- Enter the IP address in the value field and save.
DirectAdmin does not allow you to edit an existing record directly. To change an A record, add the new one first, then delete the old one. There can only be one A record for a given domain or subdomain at a time, so remove the outdated entry before adding the replacement.
When typing a full domain name into a DirectAdmin DNS field, it must end with a dot (for example, example.com.). Leaving this out, or adding an extra domain by mistake, is a common cause of broken records.
Common uses for A records
- Pointing your root domain or
wwwto your hosting server's IP address. - Setting up a subdomain, such as
blog.example.comorshop.example.com. - Pointing a staging or test version of your site to a different server temporarily.
Troubleshooting
- Site not loading after a server or IP change: check that the A records for
@andwwwpoint to the current IP address. In DirectAdmin, remember you must delete the old record before adding the new one. - Subdomain not resolving: each subdomain needs its own A record or CNAME record. Adding a subdomain name alone, without a matching DNS record, will not make it work.
- Changes made but nothing happens: if your domain uses an external DNS provider, such as Cloudflare, or your domain registrar's own DNS, changes made in cPanel or DirectAdmin's Zone Editor will have no effect. Manage DNS records at the provider that actually controls your domain's nameservers instead.
- Record looks duplicated, like
domain.com.domain.com.: this usually means the domain name was typed twice by mistake in DirectAdmin. Remove the extra text so the entry ends with a single dot after the domain name. - Still not working after a change: DNS changes can take anywhere from a few minutes up to 48 hours to propagate fully, depending on the TTL value. Wait at least 24 hours before raising a support ticket.
