<?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: Mouhamed Wade</title>
    <description>The latest articles on DEV Community by Mouhamed Wade (@laudedignus).</description>
    <link>https://dev.to/laudedignus</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.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4283244%2F40f9bb17-cb19-4feb-b745-570445497637.jpg</url>
      <title>DEV Community: Mouhamed Wade</title>
      <link>https://dev.to/laudedignus</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/laudedignus"/>
    <language>en</language>
    <item>
      <title>WHOIS is being replaced by RDAP: how to read domain expiry dates in bulk</title>
      <dc:creator>Mouhamed Wade</dc:creator>
      <pubDate>Sat, 05 Dec 2026 17:31:54 +0000</pubDate>
      <link>https://dev.to/laudedignus/whois-is-being-replaced-by-rdap-how-to-read-domain-expiry-dates-in-bulk-4321</link>
      <guid>https://dev.to/laudedignus/whois-is-being-replaced-by-rdap-how-to-read-domain-expiry-dates-in-bulk-4321</guid>
      <description>&lt;p&gt;If you still parse WHOIS text with regular expressions to watch domain expiry dates, there is a better way for most domains: RDAP, the Registration Data Access Protocol. It returns JSON over HTTPS, straight from the registry. Since 28 January 2025, ICANN no longer requires gTLD registries and registrars to provide WHOIS (with a few exceptions such as .com), and RDAP is the definitive source for gTLD registration data (&lt;a href="https://www.icann.org/en/announcements/details/icann-update-launching-rdap-sunsetting-whois-27-01-2025-en" rel="noopener noreferrer"&gt;ICANN announcement&lt;/a&gt;).&lt;/p&gt;

&lt;h2&gt;
  
  
  One domain, by hand
&lt;/h2&gt;

&lt;p&gt;The quickest test goes through the public redirector &lt;code&gt;rdap.org&lt;/code&gt;, which sends you to the right registry:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;curl -sL https://rdap.org/domain/wikipedia.org
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In the JSON, look at &lt;code&gt;events&lt;/code&gt;: the entry with &lt;code&gt;"eventAction": "expiration"&lt;/code&gt; holds the expiry date, and &lt;code&gt;"registration"&lt;/code&gt; the creation date. &lt;code&gt;status&lt;/code&gt; lists the EPP statuses, and the registrar is the entity with the role &lt;code&gt;registrar&lt;/code&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Finding the right server yourself
&lt;/h2&gt;

&lt;p&gt;For volume, do not send everything through a redirector. IANA publishes the list of RDAP servers per extension as a JSON file:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;https://data.iana.org/rdap/dns.json
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Load it once, map each TLD to its base URL, and query &lt;code&gt;{base}domain/{name}&lt;/code&gt;. A 404 means the registry has no such domain.&lt;/p&gt;

&lt;h2&gt;
  
  
  The three traps
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Many country-code registries have no RDAP.&lt;/strong&gt; In my tests that included .de, .io, .it and .jp. For those you still need WHOIS on port 43, and each registry has its own text format and its own "not found" sentence.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Rate limits.&lt;/strong&gt; Registries throttle. Keep one or two requests at a time per server and back off on 429.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;"Available" is easy to get wrong.&lt;/strong&gt; A 404 or a "no match" answer is not always proof. I only report a name as available when the registry has no record &lt;em&gt;and&lt;/em&gt; the DNS shows no delegation.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Doing it for thousands of domains
&lt;/h2&gt;

&lt;p&gt;I packaged all of this (RDAP first, WHOIS fallback per registry, DNS as a last check) into a tool: &lt;strong&gt;&lt;a href="https://apify.com/laudedignus/domain-rdap-lookup" rel="noopener noreferrer"&gt;Bulk WHOIS Lookup (RDAP)&lt;/a&gt;&lt;/strong&gt; (I am the author). One row per domain, for example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;"domain"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"wikipedia.org"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nl"&gt;"status"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"registered"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nl"&gt;"source"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"rdap"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nl"&gt;"registrar"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"MarkMonitor Inc."&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nl"&gt;"createdAt"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"2001-01-13T00:12:14.754Z"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nl"&gt;"expiresAt"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"2027-01-13T00:12:14.000Z"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nl"&gt;"daysUntilExpiry"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;41&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nl"&gt;"transferLocked"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nl"&gt;"nameservers"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"ns0.wikimedia.org"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;"ns1.wikimedia.org"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;"ns2.wikimedia.org"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;No personal data is copied: only the registrar, its abuse contact, and the registrant's organisation and country when the registry publishes them. It costs $1 per 1,000 domains answered by a registry; answers that could only come from DNS, and unknown results, are free.&lt;/p&gt;

&lt;p&gt;Two ready-to-run examples: &lt;a href="https://apify.com/laudedignus/domain-rdap-lookup/examples/monitor-domain-expiry-dates" rel="noopener noreferrer"&gt;monitor the expiry dates of a domain portfolio&lt;/a&gt; and &lt;a href="https://apify.com/laudedignus/domain-rdap-lookup/examples/check-domain-name-availability-in-bulk" rel="noopener noreferrer"&gt;check domain name availability in bulk&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;If a registry answers badly for you, leave the extension in the comments: each registry has its quirks and I fix them as they are reported.&lt;/p&gt;

</description>
      <category>dns</category>
      <category>domains</category>
      <category>api</category>
      <category>webdev</category>
    </item>
    <item>
      <title>How to check SPF, DKIM and DMARC for a whole list of domains</title>
      <dc:creator>Mouhamed Wade</dc:creator>
      <pubDate>Fri, 04 Dec 2026 17:25:55 +0000</pubDate>
      <link>https://dev.to/laudedignus/how-to-check-spf-dkim-and-dmarc-for-a-whole-list-of-domains-4iah</link>
      <guid>https://dev.to/laudedignus/how-to-check-spf-dkim-and-dmarc-for-a-whole-list-of-domains-4iah</guid>
      <description>&lt;p&gt;If you manage more than a handful of domains, sooner or later someone asks: "which of our domains can be spoofed?" Here is how to answer by hand, and how I automated it.&lt;/p&gt;

&lt;h2&gt;
  
  
  The three lookups, by hand
&lt;/h2&gt;

&lt;p&gt;Everything lives in public DNS, so &lt;code&gt;dig&lt;/code&gt; is enough.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;DMARC&lt;/strong&gt; is a TXT record on the &lt;code&gt;_dmarc&lt;/code&gt; subdomain:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;dig +short TXT _dmarc.example.com
&lt;span class="c"&gt;# "v=DMARC1; p=none; rua=mailto:dmarc@example.com"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The part that matters is &lt;code&gt;p=&lt;/code&gt;. With &lt;code&gt;p=none&lt;/code&gt; forged mail is reported but still delivered. Only &lt;code&gt;p=quarantine&lt;/code&gt; and &lt;code&gt;p=reject&lt;/code&gt; actually protect the domain. No record at all means no protection.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;SPF&lt;/strong&gt; is a TXT record on the domain itself, starting with &lt;code&gt;v=spf1&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;dig +short TXT example.com &lt;span class="o"&gt;|&lt;/span&gt; grep spf1
&lt;span class="c"&gt;# "v=spf1 include:_spf.google.com ~all"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Look at the last mechanism: &lt;code&gt;-all&lt;/code&gt; rejects other senders, &lt;code&gt;~all&lt;/code&gt; only marks them, &lt;code&gt;+all&lt;/code&gt; allows anyone. Also count the &lt;code&gt;include&lt;/code&gt;, &lt;code&gt;a&lt;/code&gt;, &lt;code&gt;mx&lt;/code&gt; and &lt;code&gt;redirect&lt;/code&gt; terms, followed recursively: SPF allows at most 10 DNS lookups (RFC 7208, section 4.6.4), and a record that goes over fails for everyone.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;DKIM&lt;/strong&gt; is harder, because the record sits under a selector you have to know:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;dig +short TXT google._domainkey.example.com
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;There is no way to list selectors. You try the usual ones for the provider (&lt;code&gt;google&lt;/code&gt;, &lt;code&gt;selector1&lt;/code&gt; and &lt;code&gt;selector2&lt;/code&gt; for Microsoft 365, &lt;code&gt;k1&lt;/code&gt; for Mailchimp, and so on).&lt;/p&gt;

&lt;h2&gt;
  
  
  Domains that send no mail
&lt;/h2&gt;

&lt;p&gt;They are the easiest to forget and the easiest to spoof. A parked domain should publish &lt;code&gt;v=spf1 -all&lt;/code&gt; and a DMARC record with &lt;code&gt;p=reject&lt;/code&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Doing it for hundreds of domains
&lt;/h2&gt;

&lt;p&gt;A shell loop around &lt;code&gt;dig&lt;/code&gt; works until you need the SPF lookup count, the DKIM selector guessing and a readable verdict per domain. I turned those checks into a small tool: &lt;strong&gt;&lt;a href="https://apify.com/laudedignus/email-security-audit" rel="noopener noreferrer"&gt;SPF, DKIM &amp;amp; DMARC Checker&lt;/a&gt;&lt;/strong&gt; (I am the author).&lt;/p&gt;

&lt;p&gt;You paste domains, and each one comes back as one row: a grade, whether it can be spoofed, the email provider, the records found, and for every problem the DNS record to publish. A shortened example of a row:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;"domain"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"example.org"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nl"&gt;"grade"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"C"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nl"&gt;"spoofable"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nl"&gt;"summary"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"Not protected: DMARC only monitors, forged mail is still delivered."&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nl"&gt;"emailProvider"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"Google Workspace"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nl"&gt;"spfAll"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"softfail (~all)"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nl"&gt;"spfLookupCount"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;4&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nl"&gt;"dmarcPolicy"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"none"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nl"&gt;"dkimSelectorsFound"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"google"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nl"&gt;"issues"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nl"&gt;"code"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"DMARC_POLICY_NONE"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="nl"&gt;"fix"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"Move to p=quarantine, then p=reject, once reports show legitimate mail passes."&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;It only reads public DNS. It costs $0.80 per 1,000 domains, and invalid or non-existent domains are not charged. There is a ready-to-run example here: &lt;a href="https://apify.com/laudedignus/email-security-audit/examples/check-dmarc-records-for-a-list-of-domains" rel="noopener noreferrer"&gt;Check DMARC, SPF and DKIM for a list of domains&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;If you prefer to keep your own script, the three &lt;code&gt;dig&lt;/code&gt; commands above are all you need to start. If a domain is graded wrongly by the tool, tell me in the comments with the domain name and I will look at it.&lt;/p&gt;

</description>
      <category>email</category>
      <category>security</category>
      <category>dns</category>
      <category>devops</category>
    </item>
  </channel>
</rss>
