tr Skip to content
Black Friday FlowMattic for life, 12 payments of $33.25 Or $399 once. Nothing added for splitting Ends in --Days --Hrs --Min --Sec See the deal

DNS lookup automation for WordPress: MX, SSL, headers and ports

FlowMattic DNS / Domain Tools: a form submission's email domain is verified and the lead is routed to the CRM based on the result.

DNS lookup automation means your workflows check domains for you: whether an email domain can receive mail, when a certificate expires, which server a domain points to, whether a port is open. FlowMattic, the automation plugin for WordPress, does this with its built-in DNS / Domain Tools app, seven actions that run in plain PHP on your own server with no API key and no external service.

It is a small app that earns its place quickly: lead forms that weed out dead domains, agencies watching client certificates, SaaS teams verifying custom domains. Below you will find what each action returns, how to wire it into a workflow, and the edge cases to plan for.

What is DNS / Domain Tools?

DNS / Domain Tools is a core app in the workflow builder. It has no trigger and needs no Connect. You add it as a step, pick one of its actions, and map a domain, email address, URL, IP address or host from earlier data. Every answer comes from your own server: DNS queries go through its resolver, and SSL, header and port checks are made from it directly.

The seven actions are DNS Lookup, Reverse DNS Lookup, MX Lookup, Verify Email Domain, SSL Certificate Info, HTTP Headers and Check Port.

How DNS lookup automation works

  1. Start with a trigger that brings in a domain or address: a form, a WooCommerce order, a WP Tables row or a schedule.
  2. Add a step, choose DNS / Domain Tools and the action you need.
  3. Map the input. Domain fields accept a full URL too; the protocol, any path and any port are stripped before the lookup.
  4. Test the step to see the fields it returns.
  5. Branch on the result with a Router or stop the run with a Filter, for example on can_receive_email or days_remaining.
FlowMattic builder showing DNS / Domain Tools Verify Email Domain action settings
The Verify Email Domain action in the builder, with the Email Address or Domain field.

Actions, inputs and outputs

ActionInputKey outputs
DNS LookupDomain; Record Type: All Records, A, AAAA, MX, NS, TXT, CNAME, SOA or SRVrecord_count, records, ipv4_addresses
Reverse DNS LookupIP Address (IPv4 or IPv6)hostname, resolved, ip_version, ptr_records
MX LookupDomainhas_mx, mx_count, mx_records (host, priority, ip), sorted by priority
Verify Email DomainEmail Address or Domaincan_receive_email, has_mx_records, has_a_record, has_aaaa_record, is_free_provider, mx_records, and is_valid_format for an email
SSL Certificate InfoDomain; Port (Optional, default 443)subject, issuer, valid_from, valid_to, is_valid, days_remaining, serial_number, signature_algorithm, san
HTTP HeadersURL; Method: HEAD or GETstatus_code, status_message, content_type, server, headers
Check PortHost; Port (1 to 65535); Timeout (seconds), 1 to 30, default 5is_open, service, response_time_ms, error_message

Verify Email Domain follows the mail rule that a domain with no MX record can still take mail at its A record, so can_receive_email is true when either exists. is_free_provider is true for a fixed list of twelve consumer domains, including gmail.com, yahoo.com, outlook.com and icloud.com. Check Port names common ports in service, such as 22 as SSH/SFTP, 443 as HTTPS and 3306 as MySQL.

Use cases

Keep fake leads out of the CRM

A lead form checks the email domain before anything is saved. Domains that cannot receive mail are tagged for review, free-mail addresses go to a nurture list, and company domains go straight to sales.

Flow: Form submission → Verify Email Domain → Router (can_receive_email / is_free_provider) → CRM

Watch client SSL certificates

An agency keeps its client domains in a WP Tables table. Every morning each one is checked, and any certificate with two weeks or less left is posted to the team channel with the issuer and expiry date.

Flow: Schedule (Every Day) → WP Tables Get Rows → Iterator → SSL Certificate Info → Filter (days_remaining ≤ 14) → Slack

Simple service checks

Internal ops checks that a database, mail or SFTP port on a partner server is still reachable, and emails the on-call person when it is not, with the connection error.

Flow: Schedule (Every X Minutes) → Check Port → Filter (is_open is false) → Send Email

Verify a customer’s custom domain

A SaaS product lets customers point their own domain at it. After a customer submits their domain, the workflow looks up the CNAME record and either confirms the setup or emails the exact record they still need to add.

Flow: Webhooks by FlowMattic → DNS Lookup (CNAME) → Router → Send Email

Flag risky orders

A store checks the billing email on every new order. An order from a domain with no mail records is flagged to the team before it is fulfilled.

Flow: WooCommerce order → Verify Email Domain → Filter (can_receive_email is false) → Slack

Audit security headers with AI

Once a week the workflow fetches the response headers of each site you manage and asks an AI Agent which common security headers are missing, then emails the summary.

Flow: Schedule (Every Week) → HTTP Headers → AI Agent → Send Email

Tips and gotchas

  • Answers come from your server’s resolver. A DNS change you made minutes ago may not show until cached records expire.
  • All Records is several lookups. It queries A, AAAA, MX, NS, TXT, CNAME, SOA and SRV one at a time and merges them, because a single “all” query fails on some systems. Pick one type when that is all you need.
  • A broken certificate can return an error, not details. SSL Certificate Info verifies the certificate as it connects, so a certificate that is expired or does not match the domain may come back as an error carrying the connection message. Treat an error from this step as a warning in itself.
  • cURL is required for SSL Certificate Info and Check Port. Most hosts have it; the step says so if yours does not.
  • A closed port is not always the target’s fault. Many hosts block outgoing connections on some ports, so test a known-open port first to see what your server can reach.
  • Verify Email Domain checks DNS only. It does not contact the mail server or confirm that a mailbox exists, so it cannot tell a typo in the name part of an address.
  • HTTP Headers follows up to five redirects with a 15-second timeout and adds https:// when the URL has no protocol. Use GET when a server does not answer HEAD.

More modules that shape and check data inside a workflow are on the data tools page.

Related features

  • Router: send each run down a different path based on a lookup result.
  • Scheduler: run certificate and port checks on a fixed timetable.
  • Iterator: check a whole list of domains, one per loop.

FAQ

Do I need an API key for DNS lookups in FlowMattic?

No. DNS / Domain Tools uses PHP’s own DNS functions and cURL on your server. There is no Connect to set up and nothing is sent to a third-party lookup service.

How can I check if an email domain is valid in WordPress?

Add Verify Email Domain after your form trigger and map the email field. It reports whether the domain has MX, A or AAAA records, whether it can receive email, whether the address format is valid, and whether it is a common free provider.

How do I get alerted before an SSL certificate expires?

Run SSL Certificate Info on a daily schedule and follow it with a Filter on days_remaining. Pass the run on to an email or Slack step only when the number drops below your threshold.

Can it do WHOIS lookups?

No. The app covers DNS records, reverse DNS, MX, email domain checks, SSL certificates, HTTP headers and ports. For registrar data, call a WHOIS or RDAP service with the API step.

Add DNS lookup automation to your next workflow. See FlowMattic plans to get started.

More from the blog