
By simply entering a domain or URL, wouldn't it be useful to automatically detect the email servers, hosting providers, and marketing tools a site is using? This is incredibly valuable for competitive research and technical proposals. This article explains how to use a Google Apps Script (GAS) library to analyze DNS records and visualize the services behind any domain.


The goal of this script is to analyze DNS records (MX, TXT, CNAME, etc.) associated with a domain to "uncover" the underlying infrastructure and third-party tools.
dig commands or use web-based DNS checkers one by one.Paste the following code into your Code.gs file. This will create a custom menu in your spreadsheet.
/**
* Add custom menu when the spreadsheet opens
*/
function onOpen() {
DNSChecker.addMenu();
}
/**
* Check all domains in Column A (Detailed Mode)
*/
function checkAllDomains() {
DNSChecker.checkSheet({ detailed: true });
}example.com) or URLs in Column A of your sheet.Note: You can also use the custom formula =DETECTSERVICES(A1) directly in a cell.
It matches patterns found in specific DNS records. For example, if an MX record contains "https://www.google.com/search?q=google.com," it identifies the service as Google Workspace. If a TXT record contains the string "hubspot," it flags HubSpot as a connected service.
Yes. The library automatically extracts the domain part (e.g., example.com) from a full URL before performing the DNS lookup, so pasting raw URLs is perfectly fine.
"Simple Check" only outputs the names of the identified services. "Detailed Check" provides a deeper analysis, including the actual content of MX records and the specific status of security settings like SPF and DMARC.
We can customize this sample to match your specific business requirements.
Book Free ConsultationPut it on Trello!Need a fix for HubSpot, CMS, or GAS? Post it on Trello.
Development Requests Here