Website Monitoring
DNS Hijacking: How It Happens and How to Detect It
8 min read · Updated 2026-11-10
Whoever controls a domain's DNS decides where its visitors and email go. A DNS hijack is when someone else takes that control and points the domain somewhere you didn't choose. Your servers keep running normally, but the traffic no longer reaches them.
Hijacks are rare compared with ordinary phishing, but they're serious when they happen: the attacker gets your real domain, can obtain a valid HTTPS certificate for it, and can read the email sent to it. This guide covers how hijacks happen, how to spot one, and how to make your domain harder to take.
How DNS gets hijacked
- Registrar account takeover. The attacker gets into the account where the domain is registered, usually with a stolen or reused password, and changes the domain's nameservers to ones they run. From then on they answer every DNS question about the domain. This is the most damaging kind, because it moves the whole domain at once.
- DNS provider account takeover. The attacker gets into the DNS hosting account, such as the CDN or DNS service, and edits individual records: the A record for the website, or the MX records for email.
- Dangling records. A CNAME still points at a cloud service you stopped using, such as a deleted storage bucket or app. Anyone who claims that name at the service takes over your subdomain. This is called a subdomain takeover.
- Attacks on the path, not the domain. Malware or a compromised router can change which DNS resolver a computer uses and give it false answers. Forged answers can also be slipped into a resolver's cache. These affect some users rather than the domain itself.
In 2017–2019 a campaign known as Sea Turtle hijacked the nameservers of government and telecom domains in this way, and in January 2019 the US Cybersecurity and Infrastructure Security Agency issued an emergency directive telling federal agencies to audit their DNS records and lock down their registrar accounts.
What an attacker does with it
- Collects logins. Visitors reach a copy of the site at the real address, so nothing looks wrong.
- Gets a valid certificate. Certificate authorities check control of a domain through DNS or the website. Once the attacker controls either, they can get a trusted HTTPS certificate, and the browser shows the padlock as usual.
- Reads your email. Changing the MX records sends incoming mail to the attacker's server, including password reset emails for other services.
- Keeps it short. Many hijacks last hours, just long enough to collect credentials, before the records are put back.
How to detect a hijack
Because a hijack is a change to records you control, the best signal is a change you didn't make.
- Watch your DNS records. Changes to NS, A, AAAA, CNAME, MX, TXT or CAA records that don't match planned work are the clearest sign. Nameserver changes are the most serious. A DNS lookup shows the current records. Monitoring records them over time and alerts you when they change.
- Watch certificates issued for your domain. Every publicly trusted certificate appears in Certificate Transparency logs, which you can search at crt.sh. A certificate you didn't request, or one from an authority you don't use, needs an explanation. A certificate lookup shows who issued the certificate your site serves today.
- Watch the WHOIS record. A change of nameservers or registrar, or lock statuses disappearing, shows up in a WHOIS lookup.
- Read your registrar's and DNS provider's notification emails about logins and changes, and send them somewhere other than the domain they're about.
Speed matters more than anything. A hijack you find in an hour does far less harm than one you find the next day.
How to make a hijack harder
- Secure the registrar and DNS accounts. Use a unique password and two-factor authentication, preferably a security key or an authenticator app rather than SMS. Remove old users. These two accounts protect everything else.
- Turn on registrar lock. The
clientTransferProhibitedstatus blocks transfers to another registrar, and most registrars set it by default. Some also offerclientUpdateProhibitedto block changes. - Use registry lock for important domains. Registry lock sets the
serverstatuses, such asserverUpdateProhibited, at the registry. A nameserver change then needs a manual, verified request, even from someone who has your registrar password. Not every registrar offers it, and it usually costs extra. - Publish CAA records that list only the certificate authorities you use. See CAA Records.
- Remove dangling records as soon as you stop using a service.
- Turn on DNSSEC. It stops forged answers from being accepted by resolvers that check signatures. It doesn't help if the attacker controls your registrar account, since they can change or remove the DNSSEC settings too. See DNSSEC.
If you think your DNS has been hijacked
- Get back into the account and change its password and second factor. Contact the registrar's support if you're locked out.
- Restore the correct records, starting with the nameservers. Keep in mind that resolvers may hold on to the attacker's records until their TTL runs out.
- Revoke any certificates you didn't request, through the authority that issued them.
- Assume email and logins were exposed for the hijack period. Reset passwords that were reset by email in that time, and tell users if they may have entered credentials.
Key takeaways
- Most DNS hijacks start with a takeover of the registrar or DNS provider account, not an attack on DNS itself.
- An attacker who controls your DNS can get a valid HTTPS certificate and receive your email.
- An unexpected change to your NS, A, MX or CAA records, or an unexpected certificate, is the clearest sign.
- Two-factor authentication, registrar lock and registry lock prevent most hijacks; DNSSEC protects against forged answers, not account takeover.
Get an alert when your DNS records change
Free DNS change monitoring for NS, MX, CNAME, CAA, A, AAAA and TXT records, plus uptime and certificate checks.
Frequently asked questions
What is DNS hijacking?▾
Taking control of a domain's DNS so that its website or email goes to a server the attacker chooses. It usually starts with a stolen login to the registrar or DNS provider.
How do I know if my DNS has been hijacked?▾
Look for records you didn't change, especially nameservers, A records and MX records, and for certificates you didn't request. who.is Website Monitoring alerts you when your DNS records change, free for one domain.
Does DNSSEC prevent DNS hijacking?▾
Only some kinds. DNSSEC stops forged answers in a resolver's cache. It doesn't stop someone who has logged in to your registrar account, because they can change the DNSSEC settings along with everything else.
What is registry lock?▾
A lock set at the registry, above your registrar. With it on, changes to the domain's nameservers or owner need a manual, verified request, so a stolen registrar password isn't enough.