whatsmydns.net is a free online tool that lets you quickly and easily perform a DNS lookup to check DNS propagation and see information of any domain from DNS servers located in many countries all around the world.
You can test changes made to new or existing domains and see if they have been updated correctly without the need to manually query remote servers. This gives you immediate insight into how users globally may be resolving DNS records for your website, email or other online service.
Many operating systems include DNS tools to check DNS records manually for diagnosing problems. However, using these tools can be complicated and difficult to understand for non-technical people which is why the whatsmydns.net DNS checker was created to help with quickly checking DNS propagation.
whatsmydns.net makes the process of performing global DNS checks easy by maintaining a range of DNS servers to perform lookups with. These results are then parsed and displayed on a map so that results are easier to understand at a glance. Individual lookup results can be seen in detail by selecting a server location from the list or clicking on the map markers once a search has been completed.
What is DNS and how does it work?
The Domain Name System (known as DNS) is a system used to convert a name (like www.google.com
) into an IP address (like 192.168.2.1
). These addresses are used by computers to communicate with each other on the internet. Most people find remembering names much easier than numbers, so DNS makes this process easy.
When you visit a website, your computer, phone or tablet will first check your local DNS cache for the corresponding IP address. If your device has not recently looked up this website, then it will need to ask your configured DNS server which will forward the request on to the DNS server responsible for managing the records. This process is known as a DNS lookup request.
Once the IP address is known, it is stored locally for a set period of time known as the Time To Live (TTL) and used to speed up future requests. Updated records will not be returned until this time has expired, this can often be the cause of why DNS changes do not appear to be working right away.
What is DNS propagation?
DNS propagation is the term commonly used to check the current state of DNS results globally and is often asked about when changes made to DNS zones do not appear to be working as expected. This process can take from only a few minutes, but often takes up to 48-72 hours and sometimes longer.
While technically DNS does not propagate, this is the term that people have become familiar with. DNS requests are recursively forwarded and looked up from the locally used resolver to the authoritative name server on demand and then cached to speed up future lookup requests. For this reason, commonly used DNS servers of large network providers located around the world have been selected when performing DNS checks.
For popular websites, DNS results may be cached for people in different parts of the world using many different recursive DNS resolvers. If you have recently made changes to your configuration, and the TTL has not yet expired, then some people may be receiving out of date results which could mean that they see an older version of your website.
How long does DNS propagation take?
How long DNS propagation takes usually depends on your records TTL setting. This can be anywhere from several minutes up to 48-72 hours or longer. However, there are sometimes other reasons for a long propagation time.
The main issues as to why DNS propagation can take so long are:
DNS Cache – The Time to Live (TTL) is the duration in which DNS data is allowed to ‘live’ in the cache of a local device or DNS resolver. When this duration expires, the local device or server removes existing DNS information and carries out another DNS lookup to fetch new information. Higher TTL settings can often cause a delay in DNS propagation.
Internet Service Providers – Your ISP also caches DNS results, which allows for many users to access sites faster. For every website requested, they will ask the DNS server responsible only once but return the same result for many users. Some ISPs also overlook TTL rules, keeping a cached DNS record even if the TTL has expired. This can make DNS propagation take longer than it should.
Other DNS Servers – You may not be using your ISPs DNS server, if this is the case then the same issues that may be causing delays can still apply.
Domain Name Registrar – When changing web hosting or DNS providers for your domain, it is often also required to update your authoritative name servers. These changes will need to be reflected in the corresponding TLD nameserver for your domain name. For example, if you were to change the NS records for example.com, then the .com TLD nameserver would also need to update which can cause delays in DNS propagation.
How do you speed up DNS propagation?
A technique used to speed up DNS propagation and prevent a delay is to lower your DNS records TTL a few days in advance of making any changes so that when the change is made any old records expire more quickly. Unfortunately, most people who are having issues and trying to speed up DNS propagation only find this out after making changes and are wondering why they’re not seeing instant results.
If you have checked DNS globally, and are seeing different results locally then you may consider flushing your DNS cache, or using another DNS server. As a last resort, manually overriding your local DNS entries in your systems hosts file can also be done but should be considered a temporary measure and only works for certain record types.
What server types are used in a DNS check?
There are 4 different types of DNS servers involved when performing a DNS check. Each has a different role and may not be needed at all depending on the situation, having all these different server types is what contributes to DNS propagation issues.
Recursive Resolver – The DNS server your device communicates with is called the recursive resolver and is issued to you automatically by your ISP, but can be also configured on your router or individual devices. These DNS severs are ideally located in close geographical proximity to return results as fast as possible. These servers will cache a copy of the DNS results to speed up future DNS lookup requests.
Root Name Server – This type of DNS server is responsible for returning the IP address of the TLD (Top Level Domain) nameserver. For instance, if it is trying to resolve example.com, the root name server returns the IP of the TLD name server that runs .com domains.
TLD Name Server – This name server returns the authoritative name servers for each domain under the Top Level Domain it’s responsible for. The .com TLD name server will return results for example.com but not example.org.
Authoritative Name Server – This stores DNS servers’ configuration data for specific domain names.
What happens when a DNS request is made?
Below demonstrates the flow of events when a user requests to visit www.example.com
in their web browser for the first time and does not yet have cached results. As you can see, each step introduces the possibility of a DNS propagation delay.
- → You type
www.example.com
into your web browser. - → Your device sends a request to your configured recursive resolver.
- → The recursive resolver asks the root nameserver for the IP address of the TLD nameserver responsible for
.com
domains. - ← The root nameserver returns the IP address of the .com TLD nameserver to the recursive resolver.
- → The recursive resolver asks the .com TLD nameserver for the address of the authoritative nameserver responsible for
example.com
. - ← The .com TLD nameserver returns the IP address of the authoritative nameserver to the recursive resolver.
- → The recursive resolver asks the authoritative nameserver for the IP address of
www.example.com
. - ← The authoritative nameserver returns the IP address of
www.example.com
to the recursive resolver. - ← The recursive resolver returns IP address of
www.example.com
to the browser. - → Your browser makes a web request directly to the resolved IP address.
Which DNS record types can be checked?
You can check DNS propagation for common record types including:
- A – The most common DNS record, used to point a domain to an IP address.
- CNAME – Also known as alias records, they point to other DNS records. Sometimes used for subdomains like www.
- MX – Mail Exchanger records are used set email servers and their priority.
- NS – Name Server records store the authoritative nameserver.
- TXT – Text records are commonly used for configuration settings such as SPF and DKIM records.
Additional types that can be checked which are usually used in more advanced configurations include: AAAA, CAA, PTR, SOA and SRV.
Make sure to check all your DNS records
When checking DNS records, there are often multiple record types that you need to verify are correct. For example, websites sometimes include www or other subdomains as either an A or CNAME record, and email servers use the MX record type.
DNS Lookup
whatsmydns.net DNS Lookup tool lets you query DNS servers and get instant results.
You can perform a DNS lookup to do a quick DNS check for all of the most common DNS record types from a selection of DNS servers for any domain name.
Looking for easier to understand results? Use the Global DNS Checker tool to check DNS propagation.
What is a DNS lookup?
A DNS lookup typically refers to the process of converting easy to remember names called domain names (like www.google.com) into numbers called IP addresses (like 192.168.2.1).
Computers use these numbers to communicate with each other on the Internet, but these numbers would be difficult for humans to remember and can change from time to time when network configuration changes are required.
A great way to think of a DNS lookup is similar to the contact list on your phone, but a special one where it has everybody’s name without them having told you their number, and if they get a new number, your phone automatically updates it. You don’t need to remember each of your contact’s numbers, but searching for their name is quick and easy. When you select their name to make a call, your phone will automatically use their current phone number. https://6c602248b1bb4267f2991f7f38dbee9a.safeframe.googlesyndication.com/safeframe/1-0-38/html/container.html
What DNS record types can be looked up?
There are many different types of DNS records which are used for different purposes, for example the domain name www.example.com may host a website (A record), send and receive email (MX record), as well as use a VoIP service (SRV record). Different DNS record types are used to configure each of these services.
The DNS lookup tool lets you perform a DNS lookup for any domain name on the below record types.
A Record Lookup – Address or IPv4 DNS records, these store IP addresses for domain names.
AAAA Record Lookup – Address v6 or IPv6 DNS records, same as A records but store IPv6 IP addresses.
CAA Record Lookup – Certificate Authority Authorization DNS records are used to store which certificate authorities are allowed to issue certificates for the domain.
CNAME Record Lookup – Canonical Name or sometimes known as Alias records are used to point to other DNS records. Often used for subdomains like www.
MX Record Lookup – Mail Exchanger DNS records are used to store which email servers are responsible for handling email for the domain name.
NS Record Lookup – Nameserver DNS records store the authoritative nameserver for a domain name.
PTR Record Lookup – Pointer or reverse DNS records. This is the opposite of A or AAAA DNS records and is used to turn an IP address into a hostname.
SOA Record Lookup – Start of Authority DNS records store meta details about a domain name such as the administrator contact email address and when the domain last had changes made to its DNS configuration.
SRV Record Lookup – Service DNS records store protocol and port numbers for services offered by the domain name, for example VoIP or chat server.
TXT Record Lookup – Text records are used to store notes as DNS records, however they are typically used to store configuration settings for various services like SPF records which are used to define which email servers are allowed to send email from the domain or verification codes for some webmaster tools.
How does a DNS lookup work?
The Domain Name System (DNS) is a series of servers located all around the world which store the configuration information of a domain name in order to make the process of converting a domain name into an IP address or other DNS configuration information to more easily access a server.
There are 4 different types of DNS servers involved when performing a DNS lookup. Each DNS server type has a different role to play and may not all be required under certain circumstances.
Recursive Resolver – This is the DNS server that your computer or device communicates with. This DNS server is typically issued to you automatically by your service provider and is geographically located nearby in order to return results as fast as possible. This server will cache DNS record data in order to speed up future DNS lookup requests.
Root Nameserver – The root name server is responsible for returning the IP address of the TLD nameserver. For example, when resolving example.com, the root name server will return the IP address of the TLD name server responsible for .com domain names.
TLD Nameserver – The Top Level Domain (TLD) name server is responsible for returning the authoritative name servers for all domains under the TLD it is responsible for. The .com TLD name server will return results for example.com but not example.org.
Authoritative Nameserver – This is the DNS server for actually storing the DNS configuration data of a domain name.
Example DNS lookup flow
As an example of the flow of events when performing a DNS lookup, this is the order of events that will happen when you request a URL to visit a website like example.com in your web browser.
- A user types the URL example.com into their web browser.
- The user’s computer sends a request to the recursive resolver.
- The recursive resolver then sends a request to the root nameserver which provides the address of the TLD nameserver responsible for .com domain names.
- The root nameserver returns the result of the TLD nameserver to the recursive resolver.
- The recursive resolver sends a request to the .com TLD nameserver which provides the address of the authoritative nameserver responsible for the example.com domain.
- The TLD nameserver returns the result of the authoritative nameserver to the recursive resolver.
- The recursive resolver sends a request to the authoritative nameserver responsible for example.com which provides the DNS records requested.
- The authoritative nameserver returns results to the recursive resolver.
- The recursive resolver returns DNS records containing the IP address to the browser.
- The browser makes a request directly to the IP address of the server hosting the website.
Why are DNS records cached?
When DNS requests are made, the response includes what is known as the Time to Live (TTL) which specifies the number of seconds in which DNS records should be cached for.
Caching typically happens at the recursive resolver being used, as these are typically used by many users on a network with close geographical distance. This will not only speed up subsequent requests for the user who made the original request but all other users using the same DNS resolver.
Caching DNS records can make a big difference to response times as often many authoritative nameservers are located on the other side of the world for international users and if your web browser can skip parts of the full DNS lookup process and just get the IP address of a domain name from a local cache then the request can be sped up significantly.
What is a reverse DNS lookup?
A reverse DNS lookup is the opposite of a regular DNS lookup. Instead of converting a domain name into an IP address, it converts an IP address into a domain name. The DNS server will need to have a PTR record pointing to the domain name.
You can use the special reverse DNS lookup tool to analyse reverse DNS records.
How do you do a DNS lookup?
Most of the time, a DNS lookup is something that you do not need to worry about as your operating system, or web browser, will handle this for you automatically when you need to resolve a domain name.
Many operating systems include a DNS lookup tool for performing DNS lookups manually for diagnosing problems. Windows systems provide a command line tool called nslookup and Linux and Mac systems include the powerful dig tool.
Using these command line tools can be complicated and difficult to understand for non-technical people which is why the whatsmydns DNS lookup tool was created to help with quickly performing a DNS check.
As an online alternative, all you need to do is simply enter the domain name that you want to perform a DNS lookup against and the results will be displayed right in your web browser. This provides even novice users with an easy to use DNS lookup tool.
What is a reverse DNS lookup?
A reverse DNS lookup, sometimes also known as a reverse IP lookup is a type of DNS lookup request which does the opposite of the much more common forward lookup. A forward lookup will convert a domain name like www.example.com
into an IP address like 192.0.2.1
, while a reverse lookup will convert an IP address back into a domain name.
Reverse DNS records are not required to be configured for DNS to function correctly, and forward and reverse DNS records do not even have to agree with each other – but if they do, then this is referred to as a forward-confirmed reverse DNS.
Reverse DNS records are not stored with other DNS records for the domain name they are for, but instead are stored on the special .arpa
domain name. The DNS record type used for reverse DNS is known as a PTR record, short for a Pointer record.
PTR records take on a special format depending on if they are for IPv4 A records or IPv6 AAAA records. A records live under the .in-addr.arpa
subdomain while AAAA records are within .ip6.arpa
.
The DNS record for the IPv4 address 192.0.2.1
is 2.1.0.192.in-addr.arpa
.
The reverse DNS record for the IPv6 address 2002:7f00:1::
is 0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.1.0.0.0.0.0.f.7.2.0.0.2.ip6.arpa
.
You can use the reverse DNS record generator to learn more about the special format required, as well as easily create them with the online tool.
What are the benefits of reverse DNS records?
Reverse DNS records for an IP address is quite often not required, especially given most DNS resolution happens as a forward lookup for converting easy for humans to remember domain names into IP addresses for computers, but there are some advantages to consider taking advantage of.
Email deliverability – Email servers commonly use reverse lookups to verify that the emails are coming from servers which are designated to be allowed to send email on behalf of the domain in question. Email servers will often reject messages from servers which do not have reverse DNS records as they are more likely to be used for sending spam.
Ease of identity – Many system administrators find it convenient to capture IP addresses as well as reverse DNS records in their log files in order to easily identify trends in traffic by looking at domain names rather than IP addresses.
How do you perform a reverse DNS lookup?
There are many ways to do a reverse DNS lookup, but due to the special format required for reverse DNS records it is often much easier to use an online tool which automatically converts the request into the correct format.
Reverse DNS lookup online tool
The easiest way to do a reverse DNS lookup is by using the tool on this page. Simply enter the IP address you wish to resolve and press the lookup button.
The tool will also automatically perform additional forward lookups on any alternative results which allows you to quickly and easily get insight into all available matching records.
For added convenience, you can also enter a domain name and a reverse DNS lookup will be performed on the resulting IP addresses.
Reverse DNS lookup on Windows
Windows includes the DNS lookup tool nslookup
, this tool will allow you to perform many types of lookup requests including PTR records for reverse DNS entries.
Fortunately nslookup
makes the process of reverse DNS lookups easy and will automatically perform the PTR record conversion into the correct .arpa
domain for you.
Using the nslookup command
To find the reverse DNS entry for the IP address 192.0.2.1
using your systems built in DNS resolver:
nslookup 192.0.2.1
To find the reverse DNS entry for the IP address 192.0.2.1
using the specified DNS resolver 1.1.1.1
:
nslookup 192.0.2.1 1.1.1.1
Reverse DNS lookup on Linux and Mac
Linux operating systems like Ubuntu, CentOS & Redhat as well as Apple Mac OS include a few different tools available for performing reverse DNS lookups. The most commonly used is dig
as it can provide a lot of technical details used for diagnosing issues, while the host
command is simple and provides easy to read output without having to remember extra command line options.
Using the host command
To find the reverse DNS entry for the IP address 192.0.2.1
using your systems built in DNS resolver:
host 192.0.2.1
To find the reverse DNS entry for the IP address 192.0.2.1
using the specified DNS resolver 1.1.1.1
:
host 192.0.2.1 1.1.1.1
note: the above commands recognise that the request is for an IP address and assumes a reverse DNS lookup so automatically implies the -t ptr
parameter. The equivalent full form command would be:
host -t ptr 192.0.2.1
Using the dig command
To find the reverse DNS entry for the IP address 192.0.2.1
using your systems built in DNS resolver:
dig -x 192.0.2.1
To find the reverse DNS entry for the IP address 192.0.2.1
using the specified DNS resolver 1.1.1.1
:
dig -x 192.0.2.1 @1.1.1.1
DNS Security
The Domain Name System (DNS) is a very important part of how the Internet functions, and is relied on by software and end users when initiating almost everything online.
Because DNS is so important to how the Internet functions, DNS security is also an extremely important part the overall security and reliability of the Internet. Without the many things in place to help with DNS security, the Internet as we know it would not be able to function.
DNS security vulnerabilities can lead to things such as redirecting a website’s traffic to an unauthorized copy used to steal personal information (such as passwords or credit card details), overloading DNS servers resulting in sites not loading at all, or potentially losing total control over a domain name.
What is DNSSEC?
When the Internet first came about, the Domain Name System was not designed with security in mind which lead to many of today’s problems. As Internet technology progressed, the underling DNS system for the most part remained unchanged, this opened the door for malicious actors to take advantage of these limitations.
DNS Security Extensions (DNSSEC) is a new security protocol released in order to fix many of these shortcomings. DNSSEC helps to solve these issues by digitally signing responses while also maintaining backwards compatibility with the existing DNS implementation.
DNSSEC signs and protects all response types including IP addresses, TXT records and MX records. Each layer of the DNS lookup process is signed, this includes responses from the root nameserver to TLD nameservers, and TLD name servers to authoritative nameservers.
You can use the DNSSEC checker tool to check if DNSSEC is enabled on a domain name.
DNS Attacks
While DNSSEC provides many benefits it is unfortunately not yet widely adopted leaving many vulnerable to various different types of DNS attacks.
There are many different types of DNS attacks that can occur, some of these affect website owners and network providers while others affect end users or online customers.
DNSSEC provides the means to ensure the authenticity of data transmitted, the data itself is not encrypted and does not directly protect against some DoS attacks however in many cases can help.
DNS Protection
DNSSEC alone often isn’t enough to be fully protected against various DNS attacks and further measures can be taken in order to ensure the smooth operation of DNS servers.
A simple method is to over-provision servers responsible for handling DNS requests, however this may not be viable for many due to cost restraints. Using on-demand scaling of services may be a good compromise for price vs performance if this approach is to be taken.
Multiple servers combined with anycast routing is also a method that many providers use as this allows multiple servers to share a single IP address. This means that if any single server is to be overloaded then there are still more available to serve requests resulting in minimal disruption.
DNS Firewalls
DNS firewalls are also an option that is available to help with DNS security and protection. DNS firewalls can offer simple rate limiting or provide advanced heuristics to determine if traffic is legitimate or part of a DNS attack.
DNS firewalls often also provide indirect security features like advanced caching options which can help with performance of serving results while at the same time lowering the requirements of the DNS servers that they are protecting.
DNS Content, Spam & Malware Protection
DNS recursive resolvers used by end users can additionally provide security benefits by implementing content filtering rules to block certain website categories, or sites that are known to be distributing malware or spam. They may also help with limiting botnets from being able to communicate with their master servers.
Flush DNS – How and why to clear your DNS cache
If you are having trouble accessing a web page or using an online service, it may be that your device has cached an out-of-date DNS record which needs to be manually cleared or reset. This is a process known as flushing your DNS cache and is easy to do, but the steps you need to take will depend on what device you are using.
How to flush your DNS cache
If you are familiar with using your systems command line or terminal, then the commands to flush your DNS for the most popular operating systems are listed below.
If you’re unsure of how to use these commands, more detailed instructions including screenshots of each step can be found in the dedicated section for each version.
Microsoft Windows
The following command will work on Windows 7, 8, 10 + Windows Server, but opening the command prompt is slightly different for each version.
- Right click on the start menu and choose
Command Prompt (Admin)
from the menu. - Type in the command
ipconfig /flushdns
.
Apple MacOS and Mac OS X
From the Mac Terminal
app, you need to run the following command depending on your version:
MacOS 11 & 12 (Big Sur, Monterey)
MacOS 10.12 – 10.15 (Sierra, High Sierra, Mojave, Catalina)
Mac OS X 10.7 – 10.9 & 10.11 (Lion, Mountain Lion, Mavericks, El Capitan)
- Open Finder and navigate to the
Applications
>Utilities
directory and open theTerminal
app. - Type in the command
sudo killall -HUP mDNSResponder
. - Enter your password when prompted.
Mac OS X 10.10 (Yosemite)sudo discoveryutil mdnsflushcache
Mac OS X 10.6 (Snow Leopard)sudo dscacheutil -flushcache
Mac OS X 10.5 (Leopard) and belowsudo lookupd -flushcache
→ view full instructions for all versions of MacOS & Mac OS X
Linux
From the terminal or SSH session run the following:
systemd – Ubuntu & Debiansystemd-resolve --flush-caches
NSCDsudo /etc/init.d/nscd restart
→ view full instructions for Linux
Why do you need to flush DNS cache?
DNS records are stored locally in a cache on your computer, phone, tablet, or even smart TV. These devices will automatically cache IP addresses and other DNS records when they perform a DNS lookup request the first time you visit or use them.
DNS results are cached in order to speed up subsequent requests to the same website or service without needing to perform an additional DNS lookup. Sometimes old results will be cached for a long period of time and your device will continue to try communicating with the IP address of the old result even though they may have since been changed, this can often result in you not being able to access a website, game server, or other online service as you would expect.
The amount of time that a result is cached on your local device is known as the TTL (Time-to-Live). Your device will not attempt to check for an updated record from the DNS server if this time has not yet expired. The TTL of DNS records are configured by the domain administrator and can be anywhere from a few minutes up to 3 days or even longer in some cases. For this reason, issues may arise if DNS changes to domain names DNS configuration have been made and your system has a cached result which is not yet due for renewal. If this occurs, then the cache needs to be cleared for your system to know how to communicate with the new server.
How do you know if you need to flush your DNS cache?
There are a few signs that may indicate that you need to flush your DNS, some of these include:
DNS records don’t match: You can easily check DNS propagation globally for any domain name, and if your local system is not returning the same results then this may indicate that you need to flush your DNS.
If you are a website owner and you have recently made changes to your domain, name servers, or DNS hosting providers settings and are having troubles accessing your own website, then it is likely that you will run into DNS caching issues, and you need to flush your DNS cache.
Unable to access websites: If you are unable to access a website, which you normally have no problems with then this may indicate a DNS cache issue.
Page not found errors: If you are getting a 404 page not found error, then it may mean that the page has simply been deleted. If, however you know that the page does exist, as it is your own website then this may mean that you are connecting to an old server which does not have the page you are after. This is often the problem when you have changed domain or hosting providers.
Seeing old versions of a website: If changes have been made to the DNS configuration of a website, you may not be connecting to the new version. If this is the case, flushing your DNS may help resolve the issue.
As you can see, there are a variety of reasons for needing to clear your DNS cache, so it is worth clearing your DNS cache to eliminate it as a possible point of failure.
What happens when you flush the DNS cache?
When you clear your DNS cache, your device will purge all local DNS records which have been previously resolved and cached regardless of the TTL set on the record. This means that when you access a website or service the next time, a new DNS lookup will need to be performed to get this information and it will be once again cached for future requests.
Is it safe to flush DNS cache?
Yes, it is safe to flush your DNS. Some people worry about clearing or resetting their DNS cache, or if doing it too often will cause some sort of damage. This may be due to some operating systems asking for administrator permission or elevated privileges in order to do so. However, you do not need be worried as it is perfectly okay and will not cause any damage to your system or device.
It should be noted that when you do flush your DNS cache, that the first time you access a website or service again after having done so will mean that a full DNS lookup will need to be performed, which will add a slight delay to the connection and may for example make a page appear to load more slowly. This is typically a very small delay, and most people would not be able to notice.
Can flushing DNS improve network performance and speed up the internet?
Typically flushing your DNS cache does not speed up your internet connection itself, however it is possible that doing so may make certain sites or services faster.
If service providers have moved their hosting infrastructure to more performant servers or network and you have a cached DNS record still pointing to an old server, then by flushing your DNS cache you will be able to start accessing the new server or network without having to wait for the records to expire naturally.
Some service providers use DNS servers which return multiple results for fault tolerance, routing and performance reasons. These results can depend on where you are located, and in certain circumstances you may receive results incorrectly or when maintenance was happening in a certain region, and you are assigned to a region which is not optimal. When this happens, at least getting slower access is better than no access. If this is the case, then flushing your DNS cache could have you connecting to a closer server resulting in faster access and improved performance.
Flushing DNS on Microsoft Windows
Flushing the DNS cache on Windows is easy to do but depending on which version of Windows you are running the steps will vary slightly.
Additionally, you will need to make sure that you have administrator permissions in order to flush the DNS cache on Windows as this is a system level command.
Windows 10
Flushing the DNS cache on Windows 10 is a very easy process. Due to system security permissions, you must ensure that you run the command prompt as an administrator user.
- Ensure that you’re on the Windows 10 desktop.
- Right click on the start menu and choose
Command Prompt (Admin)
from the menu. - Type in the command
ipconfig /flushdns
Some additional commands which can be run from the command prompt to reset your network connection and renew your IP address which can also help resolve issues are:
ipconfig /release
– Release your network connections assigned IP address.
ipconfig /renew
– Renew your network connection and obtain a new IP address.
Windows 8 / Windows 8.1
Flushing the DNS cache on Windows 8 and Windows 8.1 is a very easy process. Due to system security permissions, you must ensure that you run the command prompt as an administrator user.
- Ensure that you’re on the Windows 8 Start Screen.
- Simply type
cmd
and the Windows search bar will appear on the right-hand side with search results. - Right click on
Command Prompt
and clickRun as administrator
- Type in the command
ipconfig /flushdns
Windows Vista / Windows 7
Flushing DNS on newer versions of Windows is almost as easy as the earlier versions but due to Microsoft’s security additions you must run the command prompt with administrator privileges.
- Click the start button and navigate to the command prompt (Start > All Programs > Accessories > Command Prompt)
- Make sure that you right click on the command prompt application and choose “Run as Administrator”
- Type in the command
ipconfig /flushdns
Note: It is also possible to type in cmd
into the Windows Vista / Windows 7 start menu search field and then right click on the cmd.exe result instead of having to navigate through the various sub menus.
Windows 98/NT/2000/XP
Flushing the DNS on Windows is an easy process, outlined below is the steps that should be run if you wish to clear your DNS cache.
- Open the command prompt (Start > Run >
cmd.exe
> OK). - Type in the command
ipconfig /flushdns
Flushing DNS on Apple Mac
Flushing the DNS in MacOS and Mac OS X is an easy process, but the steps taken will depend on which version of MacOS you are running.
The first step you need to do is identify which version of MacOS you are running.
- Click the Apple icon at the top left of your screen.
- Select “About This Mac”.
- Look at the name and version of MacOS you are running and proceed to the section for your version below.
Note: You will need administrator permissions in order to flush the DNS cache on Mac, this can be done by running the commands as the root user or using sudo before each command.
macOS 12 – Monterey
If you are running MacOS 12, you need to follow the below steps:
- Open Finder and navigate to the
Applications
>Utilities
directory and open theTerminal
app. - Type in the command
sudo killall -HUP mDNSResponder
. - Enter your password when prompted.
macOS 11 – Big Sur
If you are running MacOS 11, you need to follow the below steps:
- Open Finder and navigate to the
Applications
>Utilities
directory and open theTerminal
app. - Type in the command
sudo killall -HUP mDNSResponder
. - Enter your password when prompted.
macOS 10.15 – Catalina
If you are running MacOS 10.15, you need to follow the below steps:
- Open Finder and navigate to the
Applications
>Utilities
directory and open theTerminal
app. - Type in the command
sudo killall -HUP mDNSResponder
. - Enter your password when prompted.
macOS 10.14 – Mojave
If you are running MacOS 10.14, you need to follow the below steps:
- Open Finder and navigate to the
Applications
>Utilities
directory and open theTerminal
app. - Type in the command
sudo killall -HUP mDNSResponder
. - Enter your password when prompted.
macOS 10.13 – High Sierra
If you are running MacOS 10.13, you need to follow the below steps:
- Open Finder and navigate to the
Applications
>Utilities
directory and open theTerminal
app. - Type in the command
sudo killall -HUP mDNSResponder
. - Enter your password when prompted.
macOS 10.12 – Sierra
If you are running MacOS 10.12, you need to follow the below steps:
- Open Finder and navigate to the
Applications
>Utilities
directory and open theTerminal
app. - Type in the command
sudo killall -HUP mDNSResponder
. - Enter your password when prompted.
Mac OS X 10.11 – El Capitan
If you are running Mac OS X 10.11, you need to follow the below steps:
- Open Finder and navigate to the
Applications
>Utilities
directory and open theTerminal
app. - Type in the command
sudo killall -HUP mDNSResponder
. - Enter your password when prompted.
Mac OS X 10.10 – Yosemite
If you are running Mac OS X 10.10, you need to follow the below steps:
- Open Finder and navigate to the
Applications
>Utilities
directory and open theTerminal
app. - Type in the command
sudo discoveryutil udnsflushcaches
. - Enter your password when prompted.
Mac OS X 10.9 – Mavericks
If you are running Mac OS X 10.9, you need to follow the below steps:
- Open Finder and navigate to the
Applications
>Utilities
directory and open theTerminal
app. - Type in the command
sudo killall -HUP mDNSResponder
. - Enter your password when prompted.
Mac OS X 10.8 – Mountain Lion
If you are running Mac OS X 10.8, you need to follow the below steps:
- Open Finder and navigate to the
Applications
>Utilities
directory and open theTerminal
app. - Type in the command
sudo killall -HUP mDNSResponder
. - Enter your password when prompted.
Mac OS X 10.7 – Lion
If you are running Mac OS X 10.7, you need to follow the below steps:
- Open Finder and navigate to the
Applications
>Utilities
directory and open theTerminal
app. - Type in the command
sudo killall -HUP mDNSResponder
. - Enter your password when prompted.
Mac OS X 10.6 – Snow Leopard
If you are running Mac OS X 10.6, you need to follow the below steps:
- Open Finder and navigate to the
Applications
>Utilities
directory and open theTerminal
app. - Type in the command
sudo dscacheutil -flushcache
. - Enter your password when prompted.
Mac OS X 10.5.1 – Leopard and below
If you are running Mac OS X 10.5.1 or below, you need to follow the below steps:
- Open Finder and navigate to the
Applications
>Utilities
directory and open theTerminal
app. - Type in the command
sudo lookupd -flushcache
. - Enter your password when prompted.
Other Operating Systems
Flushing DNS on Linux
For Linux systems including Ubuntu, Debian, Red Hat, Fedora, CentOS etc flushing your DNS cache will depend on how your system is configured and which service is responsible for DNS caching.
systemd
If you are running a system that uses systemd like Ubuntu or other Debian based systems, in order to flush your DNS cache then you will need to run the following.
- Open a command terminal (either as root or run the following with
sudo
). - Run the command
systemd-resolve --flush-caches
- Optional. You can verify that this ran correctly by running the command:
systemd-resolve --statistics
NSCD – Name Server Cache Daemon
If you are running the nscd Name Service Cache Daemon and wish to flush your DNS cache, then you will need to do the following.
- Open a command terminal (either as root or run step 2 with
sudo
). - Run the command
/etc/init.d/nscd restart
Other ways to flush your DNS cache
Sometimes the standard way of flushing your DNS cache my not be possible, for example if you do not have administrator permissions. Luckily, there are a few other ways to achieve the same result which can often be easier to do.
Restart your device: If you are having issues with any of the other solutions mentioned on this page, then you can try restarting your device. This may not work in all cases but is definitely worth trying.
Reset your network connection: You may try disconnecting and reconnecting a WiFi connection or unplugging and plugging back in an ethernet cable to try and reset your network connection.
Change DNS server: You may consider using one of the popular Global DNS Servers which provide many benefits including speed and security as well as allowing you the ability to ask them to clear their cache.
Hosts file: While making changes to your systems hosts file will not actually flush your DNS cache, it will allow you to force a certain domain name to resolve to a certain IP address. This can be useful as a temporary solution but should not be relied on long term.
How to clear the cache of public DNS resolvers
If you are using a DNS server which allows you to let them know that a record is out of date and needs to be cleared, then they might provide a web interface in order to do so.
Some of the popular providers which all you to do this are listed below:
Cloudflare 1.1.1.1
Cloudflare offers a popular public DNS resolver known as 1.1.1.1 which allows you to clear the DNS cache that they have.
- Visit the Cloudflare Purge Cache tool page.
- Enter the domain name you wish to clear the cache for.
- Choose the record type, this will typically be an A record or a CNAME record.
Google Public DNS 8.8.8.8
Google public DNS resolver also allows you to clear the cache of any domain name in their cache.
- Visit the Google Public DNS Flush Cache page.
- Enter the domain name you wish to clear the cache for.
- Choose the record type, this will typically be an A record or a CNAME record.
OpenDNS
OpenDNS public DNS servers allow you to clear the shared cache of domains that they have cached for all their users.
- Visit the OpenDNS CacheCheck page.
- Enter the domain name you wish to clear the cache for.
- Enter the CAPTCHA code.
- Click the “Check this domain” button.
- Once the cache has been checked, click the “refresh the cache” button at the bottom of the page.
source : https://www.whatsmydns.net/