Have you ever wondered how to specify a DNS server other than your default one to query a hostname or IP address? In this article, we will explore the steps to achieve just that. Let’s dive in!
DNS stands for Domain Name System. It is a decentralized system that translates human-readable domain names into IP addresses.
When you type a website’s domain name in your browser, your computer sends a DNS query to your default DNS server, asking for the corresponding IP address. The default DNS server is usually provided by your internet service provider (ISP).
Why Specify a Different DNS Server?
While the default DNS server works fine for most cases, there are scenarios where you might want to specify a different DNS server:
- Faster performance: Some public DNS servers like Google Public DNS or Cloudflare offer faster response times than your default server.
- Bypassing censorship: If certain websites are blocked by your ISP, using an alternative DNS server can help access them.
- Improving privacy: Some alternative DNS servers prioritize user privacy and security by not logging user data.
Specifying a Different DNS Server
To specify a different DNS server, follow these steps:
- Open Network Connections: Press Windows + R, type “ncpa.cpl,” and hit Enter.
- Select Your Network Connection: Right-click on the active network connection and choose “Properties.”
- Select Internet Protocol Version 4 (TCP/IPv4): Double-click on it to open the properties.
- Specify DNS Server: Choose “Use the following DNS server addresses” and enter the IP addresses of your preferred DNS servers.
- Save Changes: Click “OK” to save the changes.
- Open System Preferences: Click on the Apple menu, select “System Preferences,” and click on “Network.”
- Select Your Network Connection: Choose your active network connection from the list of connections on the left.
- Select Advanced: Click on the “Advanced” button in the lower-right corner.
- Navigate to DNS: In the top navigation bar, click on the “DNS” tab.
- Add DNS Server: Click on the “+” button at the bottom left and enter your preferred DNS server’s IP address.
- Edit Network Connections: Open Terminal and run the command: sudo nano /etc/network/interfaces
- Add DNS Servers: Under your network configuration, add a line with “dns-nameservers <DNS server IP>”. Add multiple lines for multiple servers.
- E.g., dns-nameservers 8.8.8 – for Google Public DNS
- E., dns-nameservers 1.1.1 – for Cloudflare DNS
Verifying DNS Servers
To verify that your computer is now using the specified DNS server, you can use the following methods:
- Using Command Prompt/Terminal: Execute the command “nslookup <website URL>” and look for the “Server” field to see which DNS server responded.
- Using Online Tools: Various websites provide tools to check your current DNS server.
In this article, we explored how to specify a DNS server other than your default one to query a hostname or IP address. By following the steps provided, you can enhance your internet browsing experience with improved performance, privacy, and access to blocked content. Experiment with different DNS servers and choose the one that suits your needs best!