You probably surf the web all the time and have a basic idea of how things work in the world of the internet but what you don’t know are the intricate details that make it all work. In this article, you will learn all about how a DNS works and what to do when you need to change it.
Whenever you search for something on the internet or open a certain website, you type in the webpage address and within minutes you have it there on your screen. But how the internet accesses that particular webpage is something very interesting that has a lot of logical mechanisms going on behind it.
How Does a Web Request Work?
Let us assume that you want to access the ProPakistani webpage from your browser. You type www.propakistani.pk in the search bar of your web browser. Your browser then sends a request to the web host of that page which then opens up the webpage you are trying to reach. But that’s not all that is to it. There is a major key player involved in the whole process.
The internet servers that are responsible for routing your requests do not understand domain languages like www.propakistani.pk but instead, they respond only to numeric values and IP addresses such as 24.465.085.096. The request generated by the router is received by the DNS which then translates it into the respective IP address of the webpage you are trying to load.
Upon receiving the IP address, the computer generates a connection with it and continues to load the page. What’s amazing about this whole process is that it takes less than a second to process. Some DNS requests take even half the time and do the job in 40 milliseconds!
What is a DNS and What Does it Do?
The term DNS stands for Domain Name System. In simpler words, it is a language used by computers to communicate with each other. All the devices in the world are assigned a particular IP address. DNS serves as a phone directory that associates each IP address with its domain name.
Why Would You Want to Change Your DNS?
You might want to change your DNS because of different reasons. Here are some:
- To access a webpage that is restricted in your geographical area.
- To boost the speed of your internet connection.
- To maintain a web browsing experience for children that is safe and full of parental controls.
- To protect your devices by allowing third-party DNS servers to provide more security features.
- To remove any glitches in the performance of your internet connection that might be linked with the DNS (such as slow connection etc).
VPN vs DNS
Sometimes, a certain webpage is blocked or restricted due to geographical limitations and bans. Most of the time using a VPN changes your IP address and it cannot be linked back to the location that you’re trying to access the webpage from.
In a similar fashion, changing your DNS masks your location and you can access the webpage. The only difference is that by using a VPN, your connection gets rerouted while the DNS shows that you are in a different location to the server. Since a VPN offers more privacy, it also tends to slow down your internet connection resulting in a delayed response from the webpage.
How to Fix If Your DNS Server is Down?
If your internet connection is acting weird and you cannot fathom the cause of the problem, there is a chance your DNS server might be down. To find out if your DNS server is down, here are some basic ways you can do it:
- Try Accessing Another Browser or Window: If you cannot open a webpage, try opening it in a different window. If that doesn’t work, try opening the webpage with a different browser or application.
- Connect to a Different Device: If the other devices with the same internet connection are working, there is a good chance the problem is with your device and not the internet connection. Try troubleshooting your device to get better access to the internet.
- Reset Your Internet Device: If all the devices in your location are experiencing the same issue, restart the entire internet connection by resetting your internet device.
- Connect to a Hardwire: Attach an Ethernet cable to your laptop or computer to check if the issue is with your Wi-Fi or your device.
If the issue still remains after trying everything, you will most likely see a message being displayed on your screen saying “DNS server unavailable”. That is your call to change your DNS server.
At this point, you can choose to do one of the following:
- Clear the DNS cache
- Change your DNS
How to Clear the DNS cache
Here’s how you can clear the DNS cache on your device:
- Navigate to the ‘Applications’.
- Go to the ‘Utilities’.
- Double-click on ‘Terminal’.
- Type and run the following command: sudo dscacheutil –flushcache
- If the command is successful, your system will not give any output for it.
- Go to the file explorer bar and type cmd to open the Windows Command prompt.
- Type ipconfig/flushdns in the opened prompt.
- When the cache is cleared, you will receive the success message on your screen.
How to Change your DNS
If you are considering changing your DNS server, you must first get a new free DNS server from a third-party. Once you get that, to change your DNS, you should follow these simple guidelines:
- Navigate to go to the System Preferences on your Mac.
- Select the Network option.
- Go to Advanced.
- Click on the DNS tab.
- Click on the + symbol at the lower-left corner if you want to add a new DNS server.
- Enter the number of a public DNS server which you can easily get from a third-party DNS server.
- Select OK.
- Click Apply to confirm your settings.
- From your explorer bar, open the Network and Internet Settings option.
- Go to Change Adapter Settings.
- Select your currently active connection and right-click to view Properties.
- Left-click on (TCP /IPv4) Internet Protocol version 4 and select properties.
- Select Use the following DNS server addresses and type in your new third-party DNS server address in its place.
- Your DNS server will be changed.