Domain pointing to the wrong IP address: how to fix your A record
Your domain points to the wrong IP when its A record still lists your old server's address. Find the new server's IP in your host's dashboard, edit the A record where your DNS is managed, and wait for the change to spread.
You moved your website to a new host, but visitors still land on the old server. Maybe they see an old copy of the site, an error page, or a security warning. Very often the cause is an A record that still points to the old server's IP address. This page explains how to check for it, fix it and stop it happening again. You do not need to be a developer for any of it.
What the problem is
An A record is a DNS entry that connects a name such as example.com or www.example.com to an IPv4 address, which is the number of a server. When someone types your domain, their browser asks DNS for that number and connects to it. If the number belongs to your old server, the browser goes to the wrong place.
What people usually notice:
- The site shows old content, or a different version from the one you just built.
- A browser warning about the certificate, or a connection error or timeout.
- The site works for you but not for a colleague or customer, because DNS answers can differ between networks for a while.
- A hosting company's default or "account suspended" page, because the old server still answers for your domain.
- The site works at
example.combut not atwww.example.com, or the other way round, because the two names have separate records.
Why it matters
Visitors who reach the old server see stale or broken pages, so you lose enquiries and sales and look less trustworthy. Search engines that crawl the wrong server may index outdated pages or record errors. There is a security side too: an old server that nobody updates or watches is a poor place to leave your domain pointing. If you cancel the old hosting, the IP may later be reused by someone else.
Certificates can also fail. Many hosts issue and renew SSL certificates by checking that your domain points at their server. If the A record points elsewhere, issuing or renewing can fail.
How to check if your site has it
All of these are free.
- Get the correct IP. Log in to your new host and look for the server or site IP address. It is often on the account overview, the hosting plan details, or in the DNS help for your plan. Some platforms do not give a fixed IP and tell you to use a CNAME or their own nameservers instead. If so, follow their instructions.
- Look up what your domain points to now. On Windows, macOS or Linux, open a terminal or command prompt and run one of these (dig may not be installed on Windows, where nslookup works):
nslookup example.com
dig +short example.com A
dig +short www.example.com A
- Compare. If the number returned is not the number from step 1, you have probably found the problem (if your DNS uses a proxy such as Cloudflare's orange cloud, lookups show the proxy's IPs instead of your server's, so that mismatch is normal). Check both the bare domain and the
wwwversion. - Check from other places. A free tool such as whatsmydns.net shows what DNS servers in different countries return. If some show the old IP and some the new one, the change is still spreading.
- Check for an AAAA record. An AAAA record is the IPv6 version. If an old one is left behind, some visitors may still reach the old server even after the A record is right.
How to fix it
The fix is the same on every platform: edit the record where your DNS is actually managed.
- Find out where DNS is managed. This is not always where you bought the domain. Look at your domain's nameservers (a lookup tool or your registrar's dashboard will show them). If they point to Cloudflare, edit records in Cloudflare. If they point to your host, edit them there. If they point to your registrar, edit them at the registrar.
- Open the DNS zone. It is usually called DNS, DNS Zone Editor, DNS Records or Manage DNS.
- Find the A records for
@(the bare domain) andwww. Some setups use a CNAME forwwwthat points to the bare domain, which is fine. Then only the@record needs the new IP. - Replace the value with the new server's IP. Edit the existing record rather than adding a second one, because two A records for the same name split visitors between two servers.
- Remove or fix an old AAAA record if the new host does not give you an IPv6 address.
- Save. If you can choose a TTL (how long DNS answers are cached), a lower value such as 300 seconds helps any later changes spread faster. Leave it as is if you are unsure.
Platform notes (menu names change between versions, so look for the DNS section):
- Cloudflare: DNS then Records. Edit the A record and check that the proxy setting (orange or grey cloud) is what you want. See the Cloudflare guide.
- GoDaddy: My Products, then DNS next to the domain. See the GoDaddy guide.
- Namecheap: Domain List, Manage, then Advanced DNS. This only applies if the domain uses Namecheap's own DNS. See the Namecheap guide.
- cPanel, WordPress hosts, Hostinger and SiteGround: look for a Zone Editor or DNS section in the hosting panel. This only works if the domain uses that host's nameservers. Otherwise edit DNS wherever the nameservers point.
If your email runs on the same domain, be careful. Changing the A record for example.com does not move email, because mail is routed by MX records. But if an MX record points at a name like mail.example.com, that name has its own A record, and it may need to stay on the mail server. If you are not sure, check your MX records before changing anything other than @ and www.
How to confirm the fix worked
- Run the same
nslookupordigcommands again. They should return the new IP. If they still show the old one, wait for the old TTL to run out. Many changes show within minutes, and some take a few hours. - Use whatsmydns.net and check that places around the world agree.
- Open the site in a private window, or on your phone using mobile data, to avoid your own cache.
- Look at the padlock in the browser and check that no certificate warning appears. If the warning stays after DNS is correct, ask your host to reissue the certificate.
- Test both
example.comandwww.example.com, with and withouthttps://.
If your computer still shows the old site after everyone else sees the new one, the cause is probably your local cache. Restarting the browser or running your operating system's DNS flush command usually clears it.
How to stop it coming back
- Make DNS part of your migration checklist. Write down the new IP before you move, change the record on the day, and test straight afterwards.
- Lower the TTL a day before a move, then raise it again once everything works.
- Keep the old server running for a few days after the switch, so visitors with cached DNS still see a working site. Cancel it only after the lookups all agree.
- Keep a note of where DNS lives and who has the login. Many problems come from editing the registrar's DNS when the nameservers point somewhere else.
- Re-check after any host change, including upgrades that move your site to a new server.
SiteMonday's week 10 service covers domain, SSL and email deliverability, and its written report flags DNS records that do not look right. It finds and explains the problem. Making the change is up to you or your developer.
Questions
How long does it take for a changed A record to work?
It depends on the TTL set on the old record. Often it is minutes, but it can take several hours for all networks to catch up.
Can I have two A records for the same domain?
Technically yes, but visitors are then split between the two servers. During a move, keep only the new IP.
Why does my site work for me but not for others?
Your device or network may have cached the new or old answer. Check from another network with a lookup tool such as whatsmydns.net.
Will changing the A record break my email?
Not by itself, because email uses MX records. Just check that any mail hostname the MX records point to still resolves to your mail server.
Where do I find my new server's IP address?
Look in your hosting dashboard, usually on the account overview or plan details. Some platforms do not give a fixed IP and tell you to use a CNAME or their nameservers instead.
I fixed the A record but still get a certificate warning. Why?
The certificate may have been issued for the old server or not yet reissued. Once DNS points to the new host, ask the host to issue or renew the certificate.