How to Add an A Record

Updated 25 February 2026 10 views DNS & Nameservers

Adding an A Record to Your Domain

An A record (Address record) is the most fundamental DNS record type. It maps a domain name or subdomain to an IPv4 address, telling browsers which server hosts your website.

When You Need an A Record

  • Pointing your domain to a web hosting server.
  • Pointing a subdomain (e.g., shop.yourdomain.com) to a different server.
  • Setting up a custom hostname for a service.

How to Add an A Record in DirectAdmin

  1. Log in to DirectAdmin and navigate to DNS Management.
  2. Select the domain you want to manage.
  3. Click Add Record.
  4. Set the Type to A.
  5. In the Name field, enter the subdomain or use @ for the root domain.
  6. In the Value field, enter the IPv4 address (e.g., 185.52.0.1).
  7. Set the TTL (Time to Live). The default of 3600 seconds (1 hour) works well for most situations.
  8. Click Save.

How to Add an A Record in Cloudflare

  1. Log in to your Cloudflare dashboard and select your domain.
  2. Go to DNS > Records.
  3. Click Add record.
  4. Select A as the type.
  5. Enter the Name (e.g., @ for root or shop for a subdomain).
  6. Enter the IPv4 address.
  7. Choose whether to enable the Cloudflare proxy (orange cloud) or leave it as DNS only (grey cloud).
  8. Click Save.

Common A Record Examples

  • @ → 185.52.0.1 – Points the root domain to your server.
  • www → 185.52.0.1 – Points the www subdomain to your server.
  • mail → 185.52.0.2 – Points the mail subdomain to your mail server.
  • shop → 203.0.113.50 – Points a subdomain to a different server (e.g., Shopify).

Troubleshooting

If your A record is not working, verify the IP address is correct, check propagation status using whatsmydns.net, and ensure no conflicting CNAME records exist for the same name.

Was this article helpful?

Let us know so we can improve our docs.