Is it possible to clear DNS cache globally?

2

Users are complaining they are seeing the old content, which is from the old website after we switched to new server. So they are looking at completely different website practically. Many of them don't have a clue about DNS cache. Is there something we could do to invalidate cache globally, so browsers are forced to clean it, or would it help if we take the old site down? Something has to be done, users don't care and don't know about the cache.

UPDATE:

Switch was 3 days ago, people are still getting old site.

Ska

Posted 2014-02-14T15:17:38.313

Reputation: 341

I suspect you would need your users to set their browser locally to not cache/remove cache on application shutdown/restart. – Matthew Williams – 2014-02-14T15:35:28.180

How long has it been since you switched? – MrWhite – 2014-02-14T15:45:25.523

@w3d 3 days, just updated the question. – Ska – 2014-02-14T16:14:44.287

1Unless you are providing them the DNS itself you won't be able to change their DNS information. – Ramhound – 2014-02-14T16:27:16.813

Answers

4

The short answer is no.

The reason behind this, is because just flushing DNS (a restart should do this) won't help if the local PC and browser cache the DNS as well.

The option is to restart your DNS and ask users to reboot. It's a little overkill, but if they don't understand DNS cache, you will be spending enormous energy on helping them clear local cache...

The best solution to ensuring that this doesn't happen in future, is lowering your TTL for the domain a few days before moving to something like 5 minutes (1 if you're confident you have low levels of DNS queries for that domain), changing it, and then upping the TTL afterwards.

Aside from that, you could also create a redirect on the website (iptables, modrewite) to point to a new IP.

Smoothie

Posted 2014-02-14T15:17:38.313

Reputation: 351

Presumably you would only be able to implement the redirect if you are not on a shared server? – MrWhite – 2014-02-14T15:47:37.627

Mod_rewrite is configurable per domain name, so this would work in a shared environment. Also, iptables could be configured to redirect based on SRC IP, which could be the internal network, thereby not affecting anyone else. – Smoothie – 2014-02-14T15:52:23.290

1It's just that you would need to redirect to an IP address (as you suggest), rather than a domain name (since that is already cached by the client; pointing to the wrong IP). A shared server (one IP address for multiple websites) requires the domain name in order to resolve to the required website. ? – MrWhite – 2014-02-14T16:00:06.243

If all the domains on the shared server were configured with names, you could still use the IP as a "name" inside your virtual host configuration. But in general, this is far from ideal, so I would agree with your comment ;) – Smoothie – 2014-02-14T16:15:41.527

Solution was, as sysadmin said in making a "reverse proxy" on the old server back to new instance. I don't know more details :) – Ska – 2014-02-14T22:59:13.507

2

It's difficult to get in contact with administrators of the ~32 million DNS servers out on the public Internet much less get them to clear the cache on their servers without a really compelling reason, like buying them all a drink for their trouble.

Proper planning ahead of a change to drop the TTL down is best-practice. Too late for you, but at least now you know.

milli

Posted 2014-02-14T15:17:38.313

Reputation: 1 682