<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Mika</title>
    <description>The latest articles on DEV Community by Mika (@mikaww1).</description>
    <link>https://dev.to/mikaww1</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3887366%2F596a03dc-6eb6-435b-b923-469278970244.png</url>
      <title>DEV Community: Mika</title>
      <link>https://dev.to/mikaww1</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/mikaww1"/>
    <language>en</language>
    <item>
      <title>Subdomain takeovers are still embarrassingly common...</title>
      <dc:creator>Mika</dc:creator>
      <pubDate>Sun, 19 Apr 2026 13:04:44 +0000</pubDate>
      <link>https://dev.to/mikaww1/subdomain-takeovers-are-still-embarrassingly-common-3ck7</link>
      <guid>https://dev.to/mikaww1/subdomain-takeovers-are-still-embarrassingly-common-3ck7</guid>
      <description>&lt;p&gt;You've probably heard of domain hijacking — but subdomain takeovers are sneakier, more common, and surprisingly easy to miss.&lt;/p&gt;

&lt;h2&gt;
  
  
  What is a subdomain takeover?
&lt;/h2&gt;

&lt;p&gt;When a company sets up a service like a blog, a shop, or a staging environment, they often point a subdomain at an external platform using a DNS record called a CNAME.&lt;/p&gt;

&lt;p&gt;For example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;shop.example.com → CNAME → example.myshopify.com
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This tells the internet: "when someone visits shop.example.com, send them to our Shopify store."&lt;/p&gt;

&lt;p&gt;Now imagine the company shuts down that Shopify store — but forgets to delete the DNS record. The CNAME is still there, pointing at a Shopify address that no longer exists.&lt;/p&gt;

&lt;p&gt;An attacker can register that Shopify store and suddenly controls &lt;code&gt;shop.example.com&lt;/code&gt;. They can serve phishing pages, steal cookies, or damage the brand — all from what looks like a legitimate company subdomain.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why does this keep happening?
&lt;/h2&gt;

&lt;p&gt;Because DNS cleanup is boring and easy to forget. Teams spin up new services all the time — staging environments, marketing landing pages, support portals — and when those services get decommissioned, the DNS records are often left behind.&lt;/p&gt;

&lt;p&gt;It's not a sophisticated attack. It just requires patience and a good eye for dangling CNAMEs.&lt;/p&gt;

&lt;h2&gt;
  
  
  How do you detect it?
&lt;/h2&gt;

&lt;p&gt;Detection comes down to two steps:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 1 — Follow the CNAME chain&lt;/strong&gt;&lt;br&gt;
Resolve the subdomain and follow every CNAME until you reach the final destination. If the final target returns NXDOMAIN (the domain doesn't exist in DNS), that's a strong signal of a dangling CNAME.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 2 — Check for service fingerprints&lt;/strong&gt;&lt;br&gt;
If the target resolves but the service isn't configured, most platforms return a recognizable error page. For example, an unclaimed GitHub Pages site returns &lt;em&gt;"There isn't a GitHub Pages site here"&lt;/em&gt;. Checking for these fingerprints confirms whether a takeover is possible.&lt;/p&gt;

&lt;p&gt;One important caveat: wildcard DNS can cause false positives. If a parent domain resolves any random subdomain (like &lt;code&gt;random123.example.com&lt;/code&gt;), you need to account for that before flagging something as vulnerable.&lt;/p&gt;

&lt;h2&gt;
  
  
  Checking your own subdomains
&lt;/h2&gt;

&lt;p&gt;If you're a developer or sysadmin, it's worth periodically auditing your DNS records — especially for subdomains pointing at third-party services you may have stopped using.&lt;/p&gt;

&lt;p&gt;I built a free API that automates this entire process. It follows CNAME chains, checks fingerprints against 80+ services (AWS S3, Azure, Heroku, Vercel, Netlify, GitHub Pages, Shopify, Zendesk and more), handles wildcard detection, and returns a confidence level with each result.&lt;/p&gt;

&lt;p&gt;There's also a bulk endpoint that checks up to 25 subdomains at once — useful if you have a large number of subdomains to audit.&lt;/p&gt;

&lt;p&gt;You can try it here: &lt;a href="https://rapidapi.com/mikaww1/api/subdomain-takeover-checker" rel="noopener noreferrer"&gt;Subdomain Takeover Checker API&lt;/a&gt; — free tier available, no credit card needed.&lt;/p&gt;

&lt;p&gt;Or check out the website: &lt;a href="https://www.subdomainchecker.com" rel="noopener noreferrer"&gt;subdomainchecker.com&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  TL;DR
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Subdomain takeovers happen when a CNAME points to an unclaimed external service&lt;/li&gt;
&lt;li&gt;They're common because DNS records are rarely cleaned up when services are decommissioned&lt;/li&gt;
&lt;li&gt;Detection involves checking for NXDOMAIN and known service fingerprints&lt;/li&gt;
&lt;li&gt;Audit your subdomains regularly — especially after decommissioning any third-party service&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>cybersecurity</category>
      <category>webdev</category>
      <category>security</category>
      <category>testing</category>
    </item>
  </channel>
</rss>
