Reputation: 4597
I had 2 EC2 instances - one connected to mydomain.com
and another connected to dev.mydomain.com
When mydomain.com
instance went down because of some reason I changed the record set of mydomain.com
to the public IP of second EC2 instance. The change was immediately reflected and mydomain.com
started working fine.
After a few hours after fixing issues with the first EC2 server I reverted the IP address in the record set of mydomain.com
. But this does not work. mydomain.com
still points to the 2nd EC2 machine.
Can anybody suggest possible solutions?
Upvotes: 2
Views: 981
Reputation: 1686
DNS records have a ttl
or Time To Live. This means records are not refreshed from the central server until that TTL has expired.
You should look at using failover records in R53 :)
Upvotes: 3
Reputation: 269370
DNS changes take time to propagate. Also, computers cache DNS responses, so checking changes can be difficult. The best advice is to wait, or to check it via a different computer.
You might want to use a service like https://cachecheck.opendns.com/ to check the resolution, or clear your cache before checking (in Windows, use ipconfig /flushdns
).
Upvotes: 4