How to Change Your Router DNS Settings and Avoid Hijacking (2024)

What is DNS?

The Domain Name System (DNS) is the internet’s phonebook — a list of every address on the internet. When you want to visit a website, you use a domain name, like google.com or facebook.com. Domains make navigating the web easy, because most websites use easy to remember names.

This Article Contains:

This Article Contains:

    See all Performance articles

    How to Change Your Router DNS Settings and Avoid Hijacking (1)

    This Article Contains:

      When you enter a domain into a web browser, your browser converts the domain name into a numerical string, called an IP address. Every website has its own IP address — when you visit a website, the IP of your device sends a message to the IP of the website you want to visit, requesting information to be sent back, like a homepage.

      In the same way that using a phone book (before the internet age) meant we didn’t have to remember everyone’s actual phone number, DNS directories are indexes of every website on the internet. The DNS is why we don't need to remember the complex numerical strings of specific IP addresses when we browse the web. We only have to remember a website's name.

      DNS servers act as a go-between, connecting humans and the computers we use by converting the domain names we type into web browsers into the machine-readable code needed to access the desired web page, server, or internet service we’re trying to visit.

      What is DNS hacking?

      DNS hacking attacks on internet routers allow cybercriminals to divert network traffic by manipulating DNS settings. By exploiting software vulnerabilities to hijack routers, hackers can override the DNS server settings and send domain name requests to IP addresses of their choosing in what’s known as a man-in-the-middle attack.

      Instead of connecting to the site or service you want, router hacking means you might land on a fake pharming website that could infect your computer with malware or capture your personal data. Even the usually secure SSL protocol may not keep you completely safe, as you’re sent through malicious servers and the encrypted connection is cut.

      If your router is set to its default factory settings or protected by a weak password, you’re at heightened risk. It’s estimated that over 60% of wireless routers run with default passwords, meaning hackers can take control without even having to work for it.

      Default DNS router settings

      By default, your router uses DNS servers set up by your internet service provider. All the devices on your network — computers, smartphones, tablets, games consoles, and anything else — use your router’s DNS server. If you alter or update the DNS server settings directly on your router, the updated configuration is applied to every device on your network.

      DNS influence on internet speed

      The DNS server you use doesn’t technically impact the speed of your internet connection, but it can affect how quickly certain pages load depending on the location of the servers the DNS directs your web traffic to.

      While there’s no impact on download speeds once connections have been established, switching to a different DNS server with lower latency can give you a smoother and faster browsing experience.

      How to change DNS server

      If you have an Android phone or tablet, it’s easy to change your DNS settings.

      1. Open up Settings and tap Connections to display your available Wi-Fi networks.

        How to Change Your Router DNS Settings and Avoid Hijacking (2)

      2. Tap the Settings icon next to your current network connection.

        How to Change Your Router DNS Settings and Avoid Hijacking (3)

      3. Tap Advanced and then tap the IP settings box and switch to Static rather than the default DHCP setting.

        How to Change Your Router DNS Settings and Avoid Hijacking (4)

      4. Input your preferred primary and secondary DNS servers under DNS 1 and DNS 2.

        How to Change Your Router DNS Settings and Avoid Hijacking (5)

      5. Now tap Save. Your device will now use your primary DNS server setting (DNS 1) when connected to that Wi-Fi network.

      Note that the steps above change the DNS settings only for the device you’re on. To configure your preferred DNS server across your entire home network, it’s best to change router DNS settings at the source. Then, all devices connected to it will follow the new protocol.

      How to change DNS settings on a router

      You can change your router DNS settings through your router’s web interface — the process varies slightly depending on which router you have. To change your router DNS settings you need to assign it a static IP address. Check out the user guide or setup manual to learn more.

      Here’s how to change the DNS server on the most popular routers.

      Linksys routers


      1. Type http://192.168.1.1 into your browser’s address bar and sign in to your Linksys router’s web interface.

      2. Click Setup on the main menu and then select Basic Setup.

      3. Enter your preferred primary and secondary DNS servers in the Static DNS 1 and Static DNS 2 fields.

      4. You can add a primary DNS server from another provider in the Static DNS 3 field or you can leave that field blank.

      5. Click Apply at the bottom of the screen to save your settings.

      NetGear routers

      NetGear uses several different default gateway addresses, so first you need to find the IP address of your specific router.

      To find your router’s default gateway IP address, open Command Prompt by typing cmd into the search field on your desktop taskbar, enter ipconfig, and find the string of numbers listed next to Default Gateway.

      Once you have your router’s default gateway IP, follow these steps:

      1. Sign in to the NetGear web interface by entering the default gateway IP address into your browser.

      2. Some NetGear interfaces have Basic and Advanced tabs displayed at the top of the page. If so, select Basic and then click the Internet option. If not, simply click Basic Settings instead.

      3. Under Domain Name Server (DNS) Address, select Use These DNS Servers.

      4. Enter your preferred primary and secondary DNS servers in the Primary DNS and Secondary DNS fields.

      5. Click Apply. Restart your server if prompted — otherwise you’re all set.

      Asus routers


      1. Enter http://192.168.1.1 into your browser’s address bar to access your Asus router’s admin page.

      2. Select WAN from the left-side menu and then click the Internet Connection tab at the top of the window.

      3. Scroll down to WAN DNS Setting and change the setting called Connect to DNS server automatically to No.

      4. Enter your preferred primary and secondary DNS servers in the DNS Server 1 and DNS Server 2 fields.

      5. Click Apply to save your settings.

      Why you should change DNS router settings

      Changing your router to an alternative DNS server has many benefits. It can give you faster web browsing and reduce the likelihood of technical issues disrupting your connection. And the best DNS servers include enhanced security features against dangerous websites and phishing attacks to help keep you safe online.

      The best DNS servers

      The best DNS servers are free, while offering a more reliable, faster, and more secure connection. There’s nothing wrong with the default DNS server designated by your internet service provider, but you can likely do better.

      Cloudflare

      Cloudflare offers a free DNS server along with its suite of web services, and it often appears at the top of lists of the fastest public DNS service.

      But Cloudflare’s 1.1.1.1. DNS isn’t all about speed. Privacy protocols are built into the service — instead of using your browsing history to serve you ads, or sharing your behavior with other companies, Cloudflare deletes all data logs needed to run the service within 24 hours.

      Google Public DNS

      Google’s free 8.8.8.8 DNS server is not only very easy to use, but is likely an upgrade over standard ISP servers in almost every regard. If you’re concerned about your data privacy, note that Google Public DNS only stores full IP address data for up to 48 hours, and only permanently stores a small, randomized sample of anonymous information for diagnostic purposes.

      Learn more about how Google uses your data, or check out our guide to downloading your Google data.

      Open DNS

      Along with low-latency connections ensuring lightning-quick page loads, Open DNS has comprehensive security features, including automatic blocks on phishing sites, and parental controls to restrict access to harmful web content. Reliability is another feather of Open DNS, as it’s one of the few DNS providers that boasts 100% uptime.

      CleanBrowsing

      CleanBrowsing is another highly rated DNS server that emphasizes family-friendly security features, including fully customizable filtering tools for blocking age-inappropriate content. With built-in anti-phishing and ransomware protections, CleanBrowsing is a great DNS choice for safety-conscious users.

      AvastDNS

      From the developers of award-winning antivirus software, Avast’s free DNS over HTTPS (DoH) service protects you from malicous websites and DNS-based attacks, such as man-in-the-middle and other spoofing attacks. You can set it up easily on popular operating systems and browsers, including Google Chrome.

      Why you should use different DNS servers

      Using the best DNS server is rarely a one-time solution. You may have configured your internet router’s DNS settings to suit your family needs, but what about when you take your phone, laptop, or tablet to work, or connect to public Wi-Fi?

      Your home DNS needs may differ from those outside your home, especially with regard to security, so you should consider using different DNS servers depending on the network you’re connected to. This is especially true when traveling internationally, since the speed and reliability of DNS servers can vary by region and country.

      Protect against router hacking

      The easiest way to protect your internet router from DNS hijackers is to change the default login credentials and use a strong, unique password. And change the name of your network, so that hackers won’t know what router model you’re using.

      And to further protect the devices on your network, use Avast SecureLine VPN, which will encrypt all your internet traffic so you can enjoy safe, secure, and totally private browsing, regardless of which network you’re on.

      DOWNLOAD AVAST SECURELINE VPNFree Trial

      Get it for Android, iOS, Mac

      DOWNLOAD AVAST SECURELINE VPNFree Trial

      Get it for iOS, Android, PC

      INSTALL AVAST SECURELINE VPNFree Trial

      Get it for Mac, PC, Android

      How to Change Your Router DNS Settings and Avoid Hijacking (2024)

      FAQs

      How could we prevent DNS hijack? ›

      Use anti-malware

      DNS hijackers can target users' login information using malware that reveals passwords. Installing antivirus software can help you catch any attacker trying to leverage this type of malware. But to reduce the likelihood of data being compromised, use secure virtual private networks (VPNs).

      Should I change my router's DNS settings? ›

      Changing your router to an alternative DNS server has many benefits. It can give you faster web browsing and reduce the likelihood of technical issues disrupting your connection.

      What does changing DNS to 8.8.8.8 do? ›

      These are the domain name system servers for Google and essentially Google's public IPs. Changing your domain name system settings to these IP addresses puts you on Google's domain name system service, allowing you access to their fast speeds and security.

      How do I change the DNS of my router? ›

      Change the DNS servers on your D-Link router in the Setup menu. Choose Internet on the left side of the page. Select Setup at the top of the page. Find the Dynamic IP (DHCP) Internet Connection Type section and enter the primary DNS server you want to use into the Primary DNS Address field.

      Does VPN prevent DNS hijacking? ›

      Yes. A VPN helps prevent DNS hijacking.

      How do I make my DNS secure? ›

      Hide DNS information and servers

      To enhance safety, start by making only the servers and the information required for those using them accessible. This is crucial if you need the public to be able to see your domain names. Next, hide your main DNS server. External users should not be able to see primary servers.

      Is 1.1 1.1 or 8.8 8.8 faster? ›

      While Google's 8.8.8.8 DNS server is more popular, according to DNSPerf, Cloudflare's 1.1.1.1 DNS server is faster. In addition, the 1.1.1.1 DNS server does not store user data, offering more privacy.

      What should I change my DNS settings to? ›

      What are the best DNS servers to use?
      1. Cloudflare. Primary DNS (preferred DNS): 1.1.1.1. ...
      2. Google Public DNS. Primary DNS (preferred DNS): 8.8.8.8. ...
      3. Quad9. Primary DNS (preferred DNS): 208.67.222.222. ...
      4. NextDNS. Primary DNS (preferred DNS): 45.90.28.190. ...
      5. NordVPN. Primary DNS (preferred DNS): 103.86.96.100.
      Jan 15, 2024

      Does changing DNS settings do anything? ›

      Although DNS is not directly related to your Internet speed, it can influence how fast an individual webpage appears on your computer. Once a connection has been established though, it should not affect download speeds. If you want to amend your router's DNS servers however, this can help improve your overall speed.

      How do I fix my router DNS? ›

      Here are how you can fix the “DNS server not responding” issue:
      1. Troubleshoot network problems. Run network diagnostics to identify and troubleshoot internet connection problems.
      2. Restart modem or router. ...
      3. Deactivate antivirus and firewall. ...
      4. Flush DNS cache. ...
      5. Change the DNS server address.

      How do I reset my router DNS? ›

      Additional Steps
      1. Turn off your computer.
      2. Turn off your modem and router (if you have one), then wait for about 15 seconds.
      3. Plug in your modem, then wait for 1-2 minutes.
      4. Plug in your router (if you have one), then wait for 1-2 minutes.
      5. Turn on your computer.

      What is the best DNS server? ›

      Some of the most popular free DNS servers include:
      • Google DNS.
      • OpenDNS.
      • Cloudflare DNS.
      • Quad9 DNS.
      Mar 19, 2024

      How to prevent a DNS leak? ›

      One effective strategy is to enable your VPN to only connect to its own DNS servers, forcing your device to use the VPN's DNS instead of your ISP's DNS. This configuration can prevent your DNS queries from leaking outside your VPN's secure tunnel.

      How can we protect against DNS spoofing? ›

      To protect from DNS spoofing, internet providers can use DNSSEC (DNS security). When a domain owner sets up DNS entries, DNSSEC adds a cryptographic signature to the entries required by resolvers before they accept DNS lookups as authentic.

      How do you prevent DNS bypass? ›

      The good news is that DNS bypassing can be prevented with proper firewall rules and network configuration. Setting DNS configuration network wide will prevent most users from trying to bypass the system. Most routers and firewalls allow you to force all DNS traffic over port 53 on the router/firewall.

      How session hijacking can be prevented? ›

      Some of the most common ways to prevent session hijacking attacks are: Share session IDs with only trusted sources. Remember that session id may be included when sharing links or sending requests to websites. Using a VPN prevents attackers from intercepting traffic, making stealing session IDs more difficult.

      Top Articles
      Latest Posts
      Article information

      Author: Reed Wilderman

      Last Updated:

      Views: 6200

      Rating: 4.1 / 5 (52 voted)

      Reviews: 83% of readers found this page helpful

      Author information

      Name: Reed Wilderman

      Birthday: 1992-06-14

      Address: 998 Estell Village, Lake Oscarberg, SD 48713-6877

      Phone: +21813267449721

      Job: Technology Engineer

      Hobby: Swimming, Do it yourself, Beekeeping, Lapidary, Cosplaying, Hiking, Graffiti

      Introduction: My name is Reed Wilderman, I am a faithful, bright, lucky, adventurous, lively, rich, vast person who loves writing and wants to share my knowledge and understanding with you.