0

domain example.com is running on a server A.

Then I changed host to the server B.

Now when I open URL example.com, I still see the files from host A.

But I want the files from host B.

  • Have you changed the DNS of example.com to point to host B?! This is one of the first bits of information that host B should have told you. – MrWhite Jun 27 '14 at 8:22
  • If you have not changed DNS, then you can change your local computer's host file to point to the new server IP. – jeffatrackaid Jun 27 '14 at 14:35
1

This is because of caching. The internet works by IP adressess, but people don't work like that, so we've got domainnames. A domainname is a alias for an IP address (simple put).

If you go to example.com, the browser needs the ip address. It gets that of DNS server (Domain Name), which translates the domainname to an ipaddress.

If your browser has to ask the ip every time, every load, every file, internet becomes very slow. So your browser/computer caches this value and, depending on the set Time To Life(TTL), refreshes only once per while, often somewhere between 3 to 8 hours.

To clear this cache on Windows: Go to cmd and type ipconfig /flushdns


Which DNS is choosen by the browser is set per domainname. You do this in your webhosting/domainname settings (if you can, this is a more advanced setting).

If you switch hosting, those references to the new DNSserver have to update as well. This can take upto 3 days (but often less then 12 hours). This is a waiting game.

You can speed this up if you have access to the current DNS, by telling your current DNS to point to the new hosting.

|improve this answer|||||
  • Should also be noted that most browsers and routers cache DNS. So ipconfig should be flushed along with all the other things known to cache dns. – Simon Hayter Jun 27 '14 at 10:11
  • I have an infographic (rackaid.com/blog/help-understanding-dns-lookups-an-infographic) that I use to help explain where caching can occur. Applications (browsers), OS, routers, ISPs, and nameservers can call have caches that ignore TTLs set at the nameservers. I am not sure of a free tool but dnsstuff.com has a tool to check DNS propagation at many ISPs. – jeffatrackaid Jun 27 '14 at 14:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.