How do you suppose your PC, smartphone, or tablet knows where to go when you type in a domain name like makeuseof.com? It’s not by magic. No, all internet-connected devices make use domain name system (DNS), with DNS servers at its core.
But what is a DNS server, and how does it work to get you from A (a domain name) to B (the matching web server)? How do you know if your DNS server is responding properly or not? The system is designed to work without you even noticing, but it isn’t foolproof.
Let’s explain how DNS works and what you should do if there’s a problem with your DNS server.
What Is a DNS Server?
There’s a reason that you, your neighbor, and your long-lost family abroad can all type a URL into your browser and see the same result. The domain name system is the foundation of the web, acting as a database of every single public-facing website.
A DNS server resolves an IP address for a web server and matches it to a domain name and hostname (for www.google.com, the hostname would be www). The information is entirely held on 13 DNS root name server addresses run by companies, government agencies, and universities worldwide. Hundreds of matching root servers are hosted by these 13 organizations and share the same IP addresses across the globe for speed and reliability.
The reason for DNS is simple—it’s much easier for users to remember a domain name, like google.com, than they would an IP address.
For Google, that would be 220.127.116.11. If you hosted a website on your own server, you’d have to provide your own IP address if you weren’t using a free dynamic DNS provider or had a static IP address.
You’ll usually default to using the DNS servers provided by your ISP. You can also use public DNS servers to improve your safety online, like Google’s own public DNS servers at 18.104.22.168 and 22.214.171.124.
Why Is the DNS Server Unavailable?
When your PC can’t find a domain name you’ve typed in, there could be a problem with your DNS server. Your DNS server might be unavailable because of a problem with the server or a problem with connecting to that server (such as an internet outage).
How to DNS Flush on Windows, macOS, and Linux
If you’re using the DNS settings provided by your ISP and you get a DNS server not responding error, restart your router in the first instance. This may restore your connectivity to your DNS servers without any extra steps.
If that doesn’t work, resetting your DNS cache could help.
On Windows, hit Win + X, select Windows PowerShell (Admin), then type:
On macOS, assuming you’re running El Capitan or later, open a terminal and type:
sudo dscacheutil -flushcache; sudo killall -HUP mDNSResponder
Linux-based operating systems don’t generally perform any DNS caching unless you’re using nscd. If you are, type the following:
sudo /etc/init.d/nscd restart
If all else fails and your DNS server is unavailable for a long period, then it’s time to set your own.
Why You Should Set Custom DNS Settings
In most cases, you aren’t forced to use your ISP’s default DNS configuration. You can set your device to use alternative DNS servers if you’d prefer.
As we’ve mentioned, changing your DNS server can be a good way to protect yourself online. For parents, changing your DNS servers to a provider like OpenDNS can help you filter adult content and malware, plus deliver some additional privacy features.
One of the biggest reasons for changing your DNS server settings is speed. A few additional seconds of loading time for each page can start to add up—you can reclaim that time by changing your DNS settings to a quicker provider. Your ISP DNS servers (depending on your provider) might be poorly maintained, resulting in a noticeable slowdown, even with a fast internet connection.
It also helps to change your DNS settings if the servers you’re using aren’t reliable and frequently go down.
If you’re considering using a VPN, you might also want to change your DNS server settings from those provided by your ISP. You’ll also want to set up a VPN connection in Windows to use DNS leak protection properly. If you don’t, DNS leaks might reveal your identity to snooping authorities.
How to Change Your DNS Settings
You can change your DNS settings on modern operating systems like Windows and macOS quickly, although it’s a little trickier on Linux, depending on your distribution. Before changing your DNS configuration, consider which alternative DNS provider settings you will use. For example, Google DNS and Cloudflare DNS offer fast, secure connections, while numerous other DNS provider options exist.
To change your DNS settings on Windows:
- Hit Win + X and select Settings > Network & Internet > Network & Sharing Center.
- In the menu on the left-hand side, select Change adapter settings. Right-click your internet connection and select Properties. Select Internet Protocol Version 4 (TCP/IPv4) and select Properties.
- From here, enable Use the following DNS server addresses and fill in the preferred and alternate DNS server addresses with your chosen DNS providers. Follow the same for IPv6 addresses.
To change the DNS settings on macOS:
- Click the Systems Preferences icon on your dock, then click Network.
- Make sure your connection is selected, then click Advanced > DNS.
- Remove any existing DNS servers with the – icon, then hit the + icon to enter your new addresses.
- Once you’re done, click OK.
If you’re running Linux, changing your DNS settings will depend on your distribution. It’ll also depend on the network manager that distribution uses.
If you’re an Ubuntu user, you’ll need to manage your IP address settings on Ubuntu using either the GUI or by using a terminal editor to manually edit the relevant configuration files. There are also various Linux networking commands you’ll want to understand before changing your DNS.
The Dangers of DNS Malware
DNS spoofing (or DNS cache poisoning) can be a way for malware creators to manipulate the domain name system to benefit themselves. Rather than google.com taking you to Google’s homepage, DNS malware can set a record in your DNS cache to an alternate server. It might look like Google, and the URL might match, but your PC will have taken you to another website entirely—all without you realizing.
This sophisticated phishing attack can cause you to unwittingly reveal your personal data to a rogue server. To prevent this from happening, keep your antivirus and antimalware software up-to-date and run a scan of your PC regularly.
If you do find malware, clear your DNS cache using the methods listed above once it’s been removed.
Change Your DNS For Faster Internet Speeds
Under normal circumstances, you shouldn’t need to think about your DNS servers. They operate in the background, working on getting you from A to B as you use the web without any issues. However, changing your DNS settings can deliver faster internet speeds, privacy boosts, and more, so it’s worth considering an alternative DNS provider to your default ISP settings.
Now, if you do have issues with your DNS settings, it could be a sign of DNS malware or a problem with your internet connection. If that’s the case, check your PC for malware, and if you’re still having problems, try changing your DNS server settings to another provider.