Changing a domain’s A record allows you to point your domain to a new server by specifying a new IPv4 address. This is a common step when moving to a new hosting provider or setting up a website on a new server.
🧠 What is an A Record?
An A record (Address Record) is a type of DNS (Domain Name System) record that maps a domain name to an IPv4 address. For example:
example.com ➝ 192.0.2.1
When users type your domain into a browser, the A record tells the internet which server to connect to.
✅ Before You Begin
To successfully change the A record, you must meet these requirements:
Your domain must be registered and active.
If the domain is expired or unregistered, DNS settings cannot be modified.Your domain must have valid NS (Name Server) records.
The A record can only be changed where the domain’s NS (Name Server) records are pointing. This is typically your domain registrar (like GoDaddy or Namecheap) or a DNS hosting service (like Cloudflare or AWS Route 53).
📝 Step-by-Step: Changing the A Record
Step 1: Identify Where Your Domain’s DNS is Hosted
Check the Name Server (NS) records for your domain. This tells you where your DNS settings (including A records) are managed.
You can check your NS records by using:
Online tools like https://www.iv.lt/en/whois-domain-check/
Terminal command:
nslookup -type=ns yourdomain.com
Step 2: Log in to Your DNS Hosting Account
Once you’ve identified where the domain’s NS records point:
Log in to the DNS management console of that provider.
Navigate to the DNS Management or DNS Zone Editor section.
Step 3: Locate the Existing A Record
Find the existing A record for your domain (typically for @
or www
):
@
refers to the root domain (e.g.,example.com
)www
refers towww.example.com
Step 4: Edit or Add the A Record
To update the A record:
Edit the existing A record if one already exists.
Or add a new A record if none is present.
Provide:
Name/Host:
@
(for root) orwww
(for subdomain)Type: A
Value: The new IPv4 address (e.g.,
203.0.113.42
)TTL (Time to Live): You can usually leave this as default (e.g., 3600 seconds)
Click Save or Apply to commit the change.
Step 5: Wait for DNS Propagation
Changes to A records may take a few minutes to 48 hours to propagate worldwide, depending on TTL and caching.
To check if the update has propagated, use tools like:
nslookup yourdomain.com
in a terminal
🚨 Common Mistakes to Avoid
Changing A records at the wrong provider: If your NS records point to Cloudflare, changing A records at your domain registrar won’t work.
Using an incorrect IP address: Double-check the destination server’s IP address.
Not allowing time for DNS propagation: Be patient and give time for DNS changes to take effect.