Skip to Main Content
Clear Your DNS Cache

All domains on the web are really just easy-to-remember aliases for server IP addresses. There are SO many domains mapping to all sorts of IP addresses and they’re changing all the time, so there’s a whole system (and even server types) for sorting it all out. That’s all great–until you make a DNS change… How do you clear your DNS cache so you can force a machine to fetch the latest version of that domain/IP address phone book?

What is DNS?

All domains mapping to an IP address using what’s called the Domain Name System (or DNS, for short) which acts a lot like a giant phone book. My name resolves to my phone number as my domain name resolves to my IP address.

How DNS Works

Unlike a phone book, DNS information can be quickly updated. The problem? Every server in the world has their own “phone book” with a static cache of information updated periodically. Because the Internet is a distributed network (that’s the whole point of it), when DNS information is changed (if you change the IP address a domain is supposed to resolve to, for example) you have to wait for all these “phone book” DNS caches to update. The amount of time it takes them to update (called “Time To Live” or TTL) varies from 1 to 4 hours.

How to Force DNS Updates

Made changes to the DNS settings and you want to force all those DNS caches to update? Sorry, but you can’t. Remember, they’re not your servers.

How to Flush DNS

You can force a DNS update on a machine that you do own–the one you’re reading this wiki on. That’s right. Even the PC or MAC your reading this post on keeps its own DNS cache. Here’s how to erase (known as “Flushing”) your local DNS cache forcing your machine to fetch the latest DNS “phonebook.”

On Windows XP

Click “Start” and choose “Run.” Then, enter “cmd” into the run box and hit Enter. It’ll pull up our long-forgotten friend, DOS.

Anyway, type: ipconfig /flushdns — making sure there’s a space between “ipconfig” and “/flushdns.” It only takes a second and you’ll see the message: “Successfully flushed the DNS Resolver Cache.”

Type “exit” and hit ENTER to close the ugly command prompt window.

On Windows 7

Click “Start” button >> “All Programs” >> “Accessories” >> “Command Prompt“. It’ll pull up our long-forgotten friend, DOS.

Anyway, type: ipconfig /flushdns — making sure there’s a space between “ipconfig” and “/flushdns.” It only takes a second and you’ll see the message: “Successfully flushed the DNS Resolver Cache.”

Type “exit” and hit ENTER to close the ugly command prompt window.

On Mac OS X

Click the Apple menu and choose “Applications.” Select “Utilities” and then click “Terminal.”

For Mac OS X Tiger or earlier: Type “lookup -flushcache” into the terminal window () — make sure there’s a space between “lookup” and “-flushcache”

For Mac OS X Leopard or later: Type “dscacheutil -flushcache” into the terminal window () — make sure there’s a space between “dscacheutil” and “-flushcache”

Share the love:

Discussion

Comments are now closed.

Get the Email

Join 1000+ other subscribers. Only 1 digest email per month. We'll never share your address. Unsubscribe anytime. It won't hurt our feelings (much).

Preview Email