Skip to content
AdminKit

Is my router's DNS hijacked? Signs and how to check

DNS hijacking means something — malware, a compromised router, or an attacker with stolen credentials — changed which DNS resolver your traffic uses, letting it quietly redirect you to fake sites or intercept lookups. AdminKit explains the signs and how to confirm which resolver you're actually using; a mismatch from what you expect is the clearest sign.

By AdminKit team, Netbase JSC · Updated

Key takeaways

  • DNS hijacking changes which resolver answers your lookups, so the attacker chooses where every name points. On home networks the usual target is the router’s DNS setting.
  • nslookup and dig show the resolver your device asks. On most home networks that is the router itself, so a clean-looking answer there still means you have to check the router’s upstream DNS setting.
  • Compare a few answers from your network with the same lookups made outside it. AdminKit’s DNS lookup tool resolves through Cloudflare’s public resolver over DNS-over-HTTPS, so your router’s settings don’t affect it.
  • Fix in this order: admin password, DNS settings, firmware, remote management off. Factory-reset if you can’t be sure what else changed.
  • Remember filters you set up yourself: parental controls and ad blockers also change DNS, and look exactly like a hijack in a resolver check.

What does DNS hijacking actually look like?

As part of AdminKit’s DNS cluster, this guide zooms in on one specific failure mode: every device needs DNS to turn a domain name like example.com into an IP address before it can connect to anything — which makes the resolver performing that translation one of the most trusted, least-visible components of your connection. A device’s own stub resolver doesn’t resolve names itself; it just forwards every query to whichever resolver address is configured, which is exactly the setting hijacking changes. DNS hijacking is when that trust is misplaced: something has changed which resolver your traffic actually uses, redirecting lookups through a server an attacker controls instead of your ISP’s resolver or whichever one you intentionally configured.

Once an attacker controls the resolver a device uses (the component that, in the terminology of RFC 8499 — also on the IETF Datatracker — answers a client’s queries by getting information from name servers), they can return whatever answer they want for any lookup — sending you to a convincing fake banking site while the address bar still shows the real domain name, injecting ads, or quietly collecting a record of every site you visit. RFC 9499 replaced RFC 8499 in March 2024 and keeps the same definition of a resolver, quoted from RFC 1034: a program “that extract[s] information from name servers in response to client requests.” CISA’s advisory on a global DNS infrastructure hijacking campaign documented exactly this pattern at scale: actors who gained access to DNS records used that access to redirect traffic and obtain fraudulent TLS certificates for the affected organizations’ domains — a reminder that DNS hijacking isn’t a theoretical risk, it’s a documented attack pattern used against real infrastructure. BGP hijacking is a related but distinct attack one layer down the stack: instead of changing which resolver a device uses, it falsely reroutes the internet’s own traffic for an IP range, which can be used toward the same end (intercepting traffic or passing a certificate authority’s domain-validation check) without touching DNS settings at all.

On home and small-office networks, the more common version is simpler: malware or an attacker with router admin access changes the DNS server setting in the router itself, so every device on the network — not just one infected machine — gets redirected through the rogue resolver. That router is typically acting as a DNS forwarder rather than a full resolver, handing every device’s queries to whichever upstream it’s configured with instead of resolving them itself — which is exactly why one setting change reroutes the whole network at once. A different local-network attack, ARP spoofing, can achieve a similar traffic-interception effect without ever touching the router’s own configuration, by forging replies on the local segment instead. At the protocol level, DNS cookies add a narrower defense against a related threat — an off-path attacker spoofing a plain UDP DNS reply — though they don’t address a resolver that’s been outright reconfigured, which is this guide’s main concern.

AttackWhat changesWhere to look
Router DNS hijackThe router’s upstream DNS setting, or the DNS server it hands out over DHCPRouter admin page: WAN/Internet DNS and LAN/DHCP DNS
Device DNS hijackOne computer’s or phone’s own DNS settingThat device’s network settings
Domain or registrar hijackA domain’s own records at its DNS host or registrarThe domain owner’s DNS host; this is the CISA AA19-024A pattern
Cache poisoning (spoofing)A false answer inside a legitimate resolver’s cacheNot visible from settings; compare answers across resolvers
ARP spoofingWhich local device receives your trafficDuplicate MAC addresses in the router’s client list

What are the signs something might be wrong?

None of these alone proves hijacking, but any of them is worth investigating:

  • Websites you visit regularly look slightly different, show unexpected certificate warnings, or redirect somewhere unfamiliar before loading.
  • Your browser or antivirus software warns about an unusual DNS server or a certificate mismatch.
  • Devices on your network seem slower to resolve sites, or intermittently fail to load pages that work fine on mobile data.
  • You didn’t choose a custom DNS provider, but your router’s settings show one you don’t recognize.
  • You recently noticed unfamiliar admin logins, or you’ve never changed your router’s default admin password.

How do you confirm which resolver you’re actually using?

Start from a device on the network and ask it which resolver it uses. Run nslookup example.com or dig example.com from a terminal. The BIND 9 manual pages document both tools: nslookup prints the server it asked at the top of its output, and dig prints it in the SERVER: line of its footer. AdminKit’s DNS resolver / leak test page walks through reading that result. The output below is illustrative; a home router’s LAN address is shown as 192.168.1.1:

$ nslookup example.com
Server:   192.168.1.1
Address:  192.168.1.1#53

$ dig example.com
...
;; SERVER: 192.168.1.1#53(192.168.1.1) (UDP)

On most home networks the answer is the router itself, because the router forwards every query upstream. That tells you the device isn’t pointed somewhere unexpected, but it says nothing about where the router sends the queries next. A hijack can sit in either place:

What the server line showsWhat it meansNext step
Your router’s LAN addressNormal on most home networksCheck the router’s upstream DNS setting (next section)
A resolver you set on purpose (your ISP’s, or a public one you chose)NormalCompare a few answers with an outside lookup to be sure
An address you don’t recognizeThe device, or the router’s DHCP, hands out a resolver you didn’t chooseCheck the device’s own DNS setting, then the router’s DHCP DNS setting
A VPN or security app’s addressThe app is handling DNSNormal if you installed it; otherwise investigate the app

If the resolver shown isn’t one you recognize or deliberately configured (your ISP’s default, or a public resolver you intentionally set like Cloudflare or Google), treat that as a strong signal worth investigating further. A router you suspect has been tampered with also can’t be fully trusted to report its own settings accurately, which is why comparing real answers (below) matters as much as reading a settings page. Seeing which upstream resolver the router really uses needs a test that controls the authoritative answer for a unique name per visit; best free DNS leak test tools compares the services that do this.

How do you check your router directly?

  1. Log into your router’s admin page using its IP address (commonly printed on the device, or found via your computer’s network settings) — change the admin password first if you discover it’s still the factory default, since that’s one of the most common ways routers get compromised in the first place.
  2. Check the WAN/Internet DNS settings for any custom resolver that doesn’t match what you or your ISP set, and the LAN/DHCP DNS setting, which decides what resolver address your devices are given.
  3. Check for unfamiliar admin accounts or remote-management settings — some router malware adds its own persistent access rather than just changing one setting. Remote management should normally be off; RFC 6092 recommends that home routers offer no management services, and no DNS service, on their internet-facing side by default (REC-50 and REC-8).
  4. Check the firmware version against the manufacturer’s latest release — many router-hijacking campaigns specifically exploit known, patched vulnerabilities in outdated firmware.
Router settingUsually found underWhat you expect to see
WAN / Internet DNSInternet, WAN or Broadband settings“Automatic” from your ISP, or a resolver you chose
LAN / DHCP DNSLAN, DHCP server or Network settingsThe router’s own LAN address, or a resolver you chose
Admin accountsAdministration, System or UsersOnly accounts you created
Remote managementAdministration or Remote accessOff, unless you turned it on deliberately
Firmware versionSystem, Status or Firmware updateThe manufacturer’s latest release

How do you verify that a specific domain isn’t being tampered with?

If you suspect a specific site is being redirected, DNS lookup lets you see exactly what records a domain publishes — see how to read a DNS lookup result for what each record type means. AdminKit’s DNS lookup resolves names through Cloudflare’s public resolver over DNS-over-HTTPS, from AdminKit’s side rather than from your network, so a hijacked router can’t change its answers. Comparing that against what your own network returns for the same domain can reveal a discrepancy, though for a conclusive comparison you’d need to check from a network you’re confident isn’t compromised.

From a terminal, the same comparison takes two commands. The first uses whatever resolver your network gives you; the second asks a resolver you name. The address 192.0.2.53 is a documentation placeholder: replace it with a resolver you trust.

dig +short example.com                 # through your network's resolver
dig +short example.com @192.0.2.53     # through a resolver you choose

Different answers aren’t proof on their own. Large sites often return different addresses to different resolvers for load balancing or location. An answer that points to an unfamiliar network for a bank, webmail or update server, or a private address for a public site, is the pattern worth acting on. Whois on the returned address shows which network it belongs to.

How do you fix it?

  • Change the router admin password immediately, ideally from a device on a different network or one you’re confident is clean.
  • Reset DNS settings to your ISP’s default, or explicitly set a resolver you trust (your ISP’s, or a public one like Cloudflare’s 1.1.1.1 or Google’s 8.8.8.8), rather than leaving whatever was there.
  • Update the router’s firmware to the latest version from the manufacturer.
  • Factory-reset the router if you can’t be confident about what else might have changed, then reconfigure from scratch with a strong admin password.
  • Check every device individually too — some malware changes DNS settings on an individual computer or phone rather than (or in addition to) the router, so a clean router doesn’t guarantee every device is clean.
  • Check router-level parental control or ad-blocking features you may have enabled yourself in the past — these sometimes work by pointing DNS at a third-party filtering service, which can look identical to hijacking in a resolver test if you’ve forgotten you set it up.

What about public Wi-Fi and unfamiliar networks?

Everything above assumes you control the router in question. On a network you don’t control — a café, hotel or airport Wi-Fi — you can still run the same resolver check to see what you’re being handed, but you have no way to fix a suspicious result beyond disconnecting and using a trusted network or your own mobile data instead. Treat any unexpected resolver on a network you don’t manage as a reason for caution rather than something to troubleshoot on the spot, since you have no way to confirm whether it reflects normal configuration by the network operator or something worse.

Why does this matter beyond one check?

A one-time check tells you about right now; router settings can be changed again later, especially if the original vulnerability (weak password, outdated firmware) isn’t fixed. If you’re also unsure whether your connection is behind a shared IP, which changes how some of these signals should be interpreted, see our CGNAT guide. A periodic manual check (nslookup or dig, as above) is the practical habit. For a network where a hijacked device matters more — a shop, an office, a small industrial site — Netbase builds and runs Protective DNS as a custom engagement: a filtering resolver that blocks known-malicious and command-and-control domains per site or device and logs every block; talk to our team about it. If you’re technical, the Home Assistant add-on and OpenWrt package guides describe the router and dashboard pieces Netbase sets up as part of that engagement.

If a DNS change you made looks wrong rather than hijacked, rule out normal propagation delay first — see DNS propagation and TTL explained and the glossary entry for DNS propagation / TTL.

This guide is general information, not a security audit of your specific network — see our disclaimer for what AdminKit's guidance does and does not commit to.

Frequently asked questions

What's the difference between DNS hijacking and DNS spoofing?

DNS hijacking typically means an attacker has changed the resolver settings themselves (on your router, device, or at the registrar/provider level), so every lookup goes through a resolver they control. DNS spoofing (cache poisoning) means an attacker inserted a false answer into a legitimate resolver's cache, without changing which resolver you use at all. This guide focuses on hijacking, which is more common on home and small-office routers.

Can my DNS be hijacked without anyone touching my router?

Yes. Malware running on any device inside your network can change the router's DNS settings through its admin interface if it knows (or guesses) the admin password, without physically touching the device. This is a documented pattern seen in real malware campaigns.

If my resolver test shows my ISP's normal resolver, am I safe?

That's a good sign, but it only confirms your router isn't currently pointed at an unexpected resolver. It doesn't rule out other forms of compromise. Combine it with checking your router's admin credentials and firmware version for a fuller picture.

My DNS resolver check shows a public resolver like Cloudflare or Google, not my ISP. Is that bad?

Not necessarily — many people deliberately configure a public resolver like 1.1.1.1 or 8.8.8.8 for speed or privacy reasons. The concerning case is a resolver you don't recognize and didn't set yourself, especially if you're confident you never changed your router's default settings.

What should I do immediately if I confirm hijacking?

Change your router's admin password immediately (from a device you trust is clean), reset the DNS settings to your ISP's default or a resolver you trust, update the router's firmware, and consider a full factory reset if you can't be sure what else may have been changed.

Want AdminKit to watch this for you?

Free checks tell you the state today. Protective DNS and monitoring tell you when it changes.

Huy Nguyen (David), Founder and CEO of Netbase JSC

Talk to an expert

Huy Nguyen (David), Founder & CEO, Netbase JSC

Ask whether this fix applies to your setup, or get a second pair of eyes on your DNS and mail records.