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.
Webmasters Stack Exchange is a question and answer site for pro webmasters. It only takes a minute to sign up.Sign up to join this community
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
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.