How to change your DNS

191 0

This tutorial will give some basics on DNS and show you how to change your DNS. By default, your DNS is handled by your Internet Service Provider. There are usually more efficient and secure options out there that could possibly speed up your browsing and make it a little more secure even. Follow along to find out how to change it on your PC or on your Router.

What is DNS?

Domain Name System (DNS) is similar to a phone book in that you have a name (web address) that you want to go to but knowing the name is not enough. You have to have the number (IP Address) to make the call. All devices on the internet have their own IP Address and that is how you reach it. But imagine having to remember a number like for every web page you wanted to visit. Most of us are better at remembering names than numbers. When we enter a name like into a browser it is the job of DNS to find the IP Address for that domain name.

Exercise: Let’s try it

Feel free to skip past this section if you already know how this works.

In this exercise we will be doing a simple ping command to show you how DNS translates the name into an IP address and then show how the IP address and the name resolve to the same place.

On windows:

In your search bar open a command prompt by typing cmd and pressing enter. You should get a window like this:


First, we will “ping” the website. Ping is a command utility that allows you to test the connectivity between your source device and a device you are trying to reach. It works by sending a small packet of 32 bytes and you will get a response that tells you how long that it took as well as if any packets were dropped. Type in the following command and press enter. I have added the -n switch to this so you can just get 1 response. If you leave it off, the default it will return is 4 times.

ping -n 1

You should get something like this below. You will notice that it says Pinging followed by an IP Address. The IP address that you see could and probably will be different than what I am showing, because Google will have multiple servers that you could possibly connect to. This is so they can balance the load for a large amount of traffic across different servers. Copy that Ip address and paste it into a browser and press enter. In my case it was Once you press enter you will see the page has loaded.

Reverse lookup

If you have the Ip address like, but wanted to know what name that resolves to you can type in the following to a command prompt and press enter:

ping -a

It will return pinging

On Linux:

Open a terminal and type in the following (the -c 1 tells it to only return once. Otherwise, it will keep running until you type CTRL + C):

ping -c 1

Copy the returned Ip address and paste it into a browser and hit enter. This will load the page.

Reverse lookup

If you have the Ip address like, but wanted to know what name that resolves to you can type in the following to a terminal and press enter:

dig -x +short

This will return

How to change your DNS

If you have not changed it, it will be the default of your service provider.

However, to check it on a local machine, open a command prompt or terminal and type the following.


You will get a return at the top that shows server and address. If this points to a local Ip address, something like then it is showing your router and then if you look in your router it will either show something you have already set like or or it will show it is using your ISP.

To change it you would have to decide at what level you want to change it. Do you want to change it for everything that connects to your router or just one machine?

If at the router level, then open up your interface for the router (this will be dependent on the brand, google it) and look for something like setup. In there you will look for Domain Name System (DNS) address. Select to set the DNS and if you want to use google for the primary use and secondary use If you want to use cloudflare DNS use and

If you want to change it at the machine level then it depends on the operating system.
In the search box, type in Ethernet Settings and click on it. On this page you will see a link “Change adapter options”. Click on it.

Find your Ethernet or wifi connection, right click on it and then click on properties. In the box scroll down to Internet Protocol Version 4 (TCP/IPv4). Click on it and then click properties. For IPv6 you would follow the same steps and choose Internet Protocol Version 6 (TCP/IPv6) in the box.

Select the “Use the following DNS server addresses:” and type in your preferred DNS. Some popular examples are google primary and secondary or Cloudflare primary and secondary  Click ok.

at the terminal type in sudo nano /etc/systemd/resolved.conf and press enter
Arrow down until you see the #DNS= and #FallbackDNS=
Remove the # sign from the front and after the equal type in your preferred DNS like and fallback like Ctrl + X to save the file.

One thing to keep in mind about DNS is the priority order. It is machine > router > ISP. So, if you set at the router level and on the machine level, that machine will use but the other machines on the router will use

Popular public DNS server options


For more information visit — the Internet’s Fastest, Privacy-First DNS Resolver




For more information visit Public DNS  |  Google for Developers




For more information visit Quad9 | A public and free DNS service for a better security and privacy




For more information visit Setup Guide | OpenDNS

Final Thoughts

This is a basic tutorial and guide on how to change your DNS at the device level as well as at your router level. There is a lot more to DNS than what is here, but this is meant as an introduction to DNS as well as how to change your DNS from your ISP to a public DNS. There are many reasons you might want to change. Prime among these are speed and security.

Find more on

Total 0 Votes

Tell us how can we improve this post?

+ = Verify Human or Spambot ?

About The Author

Coolest hedgehog in town!

No Comments on "How to change your DNS"

Leave a Comment

Your email address will not be published. Required fields are marked *