How to Check Hundreds of Domain Names in 5 Minutes

Aske Denning

Automation Expert

At Leapwork, we are always looking for smarter ways to solve tasks, and we often use our own tool to help us do that. This post is a real-life example of how we in our marketing department built a simple automation case with significant efficiency gains. Specifically, we designed an automated test case for checking hundreds of domain names from a list with mock contact data.

Here's what we did to improve efficiency in our marketing department. If you want to do the same, all you need is a free trial of Leapwork.

Why mock data creation?

Whether it is for trying out a new email integration in your CRM system or demonstrating how something works in your Marketing Automation application, mock contacts are useful test data.

For enhancing understanding, it helps if the mock data resembles real contacts. To achieve this, you need to make the contact properties (name, company, and email address) look like real entries. This gets a little tricky when it comes to email addresses and website URLs as you want to avoid listing domain names that actually exist.

To check if they exist you can of course type the domain entries from your contact list into your web browser one by one. But what if your contact list includes hundreds of domain names?

How to build the test case for domain checks

The marketing department at Leapwork was tasked with creating a list of hundreds of mock contacts for an app that was to be launched and used in product demonstrations of a mock CRM system.

To enhance the app’s usefulness for training purposes, we wanted the contact list to be relatable and thematic, rather than just relying on placeholder data.

This meant that we had to create hundreds of mock email addresses. These could potentially include domain names owned by someone, which we of course wanted to avoid.

thematic list of fake contacts An excerpt of the thematic list of fake contacts.


We used the Leapwork automation platform to build a simple automation case for testing whether the domain names exist.

Below is a screenshot of how the case was designed in Leapwork Studio.

domain checking flow in LEAPWORK How the automation case looks like in Leapwork Studio.


To set up this case, we followed the following steps:

1. Start web browser

We wanted a web browser to be opened automatically, so that the website URLs could be checked. In this example, we used the Chrome browser.

2. Read Excel

The list of mock contacts lived in an Excel sheet with a column called ‘Domain’. The sheet was uploaded to the ‘Read Excel’ building block, and then the property ‘Domain’ was mapped as the data input for the next step in the flow.

3. Navigate web

We wanted our web browser to navigate to the URLs provided in the Excel sheet. Instead of typing in the URLs in the Web address field, the ‘Domain’ property served as a dynamic input to this building block.

4. Get web text

Next, we defined a value used for validation. We set up the case to pass if the URL returned an error message stating that the given domain does not exist, because we did not want the domains in our list of mock contacts to be owned by anyone.

To indicate whether a domain existed, we asked Leapwork Studio to look for a web page header (H1, specifically) with the text: “This site can’t be reached” as that is the Chrome browser’s default error message for domains that don’t exist.

validate a test case in LEAPWORK Defining the validating value.

5. Log web screenshot

If the web text defined in step four was not found on a given web page (meaning that the given domain does exist), then Leapwork Studio was set to log a screenshot of that page.

6. Iteration

This case was set to test all the hundreds of URLs listed in the Excel sheet. We did this by choosing the ‘Iterate’ method in the ‘Read Excel’ building block.

Iterate method in LEAPWORK building block Using the Iterate method in the Read Excel building block.


When Leapwork Studio had run through all the domains to be checked, the case was done. Because of the ‘Log web screenshot’ action, we now had a list of screenshots with all the domains which did in fact return a website, and which could not be used in a mock contact list. We could also quickly scan the screenshots for whether the URLs were host domain-vendors, in which case they were fit for use.

LEAPWORK Studio after case execution Leapwork Studio after case execution. The case run has been recorded as a short video, and the automatically logged screenshots are easy to go through for validation.

What did we achieve with this method?

The efficiency gains achieved in this case were clear:

Approximate time needed for checking 200 domain names manually one at the time:

30 minutes

Approximate time needed for designing and running the automation case with Leapwork:

5 minutes

What’s more, if the contact list consisted of a thousand contacts, it would still only take around 5 minutes to build the automation case with Leapwork. The time needed for doing this task manually, on the other hand, would keep increasing with the number of contacts.

Additional ways you can use this method

This case can also be used inversely for real contact data. For example, if you have an offline list of contacts of sales leads, and, before uploading the contacts into your CRM system, you want to check the quality of the contacts by testing the validity of their email domains. You would just need to redefine how the test passes, and then log any domains that return an error message.

Finally, If you are looking for a web domain for your business, and you have a long list of suggested domain names, you could also use this case for easily checking which ones of them are available.

Are you interested in learning more about how you can use Leapwork's automation platform to increase efficiency and reduce the amount of repetitive work in your team? Then join our webinars on no-code automation, or start your trial below.