How to change your DNS server with command prompt.

How to change your DNS server with command prompt.

  • Hi there and welcome to PC Help Forum (PCHF), a more effective way to get the Tech Support you need!
    We have Experts in all areas of Tech, including Malware Removal, Crash Fixing and BSOD's , Microsoft Windows, Computer DIY and PC Hardware, Networking, Gaming, Tablets and iPads, General and Specific Software Support and so much more.

    Why not Click Here To Sign Up and start enjoying great FREE Tech Support.

    This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
In this guide I will show you how to change your DNS server with command prompt. Simple and straight to the point no nonsense tutorial.

You might want to change your DNS server for many reasons, to decrease ping time when online gaming, to add parental controls like blocking adult sites and various other reasons.


First thing you will want to do is bring up an elevated command prompt. Then copy the content of the code box below. Paste it into the command window and hit enter. This will change your DNS server to Alternate DNS as primary DNS server, and Google DNS as alternate DNS server.

Note: Do not copy the word code!!


Code:
wmic nicconfig where (IPEnabled=TRUE) call SetDNSServerSearchOrder ("76.76.19.19", "8.8.4.4")


You simply need to replace the first number in quote marks as your primary and the second number will be your alternate DNS server.

1651878262070.png

Note: Make sure and leave the quote marks as well as the comma and parentheses, and only change the numbers!!

Here is a list of the free DNS servers available to you, some block malware, some block ads and some are family friendly to keep your children from visiting dodgy websites, so you do not have to worry about that sort thing when the kids have their computers on, alone in their room.


Click here to view the list of free DNS servers.

Once you have changed the DNS server, you will want to enter the following commands in the elevated command prompt.


Code:
ipconfig /flushdns
ipconfig /registerdns

That's it simple right, you have changed your DNS server via command prompt.
Author
Malnutrition
Views
4,281
First release
Last update

Ratings

0.00 star(s) 0 ratings

More resources from Malnutrition