# Domain Lookup: WHOIS, DNS, SSL Certificate & Redirect Check (`solidfetch/domain-lookup`) Actor

Domain lookup in bulk: whois lookup, domain expiration date, domain expiry and age, registrar, nameservers; DNS lookup with MX records, SPF, DMARC email records; SSL certificate expiry, validity and certificate check; website status and redirect checker. Flags expiring domains. No personal data.

- **URL**: https://apify.com/solidfetch/domain-lookup.md
- **Developed by:** [Solid Fetch](https://apify.com/solidfetch) (community)
- **Categories:** Agents, Developer tools, SEO tools
- **Features:** Limited permissions
- **Stats:** 3 total users, 2 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.60 / 1,000 domain looked ups

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## Domain Lookup: WHOIS, DNS, SSL Certificate & Redirect Check

Domain lookup in bulk for IT admins, SEO and sales teams: domain whois with registrar, domain expiration date, domain expiry and domain age, plus a DNS lookup (MX records, SPF, DMARC) and the SSL certificate expiry, validity and certificate check for every domain on your list. Use it to see which domains in a portfolio expire in the next 60 days (`expiringWithinDays`), when the SSL certificates of 40 domains expire, or which vendor domains have no working MX, SPF or DMARC record (an email security check of the DNS records, not a full security audit). You get one flat row per domain. $1.00 per 1,000 domains on the free plan; rows with no data are free.

```json
{ "domains": ["apify.com", "github.com", "wikipedia.org"] }
```

One row of the result (shortened, a live check of example.com on 2026-10-28; see [What you get for each domain](#what-you-get-for-each-domain) for all fields):

```json
{ "domain": "example.com", "status": "ok", "expiresSoon": false, "registrar": "RESERVED-Internet Assigned Numbers Authority", "domainExpires": "2027-08-13", "domainDaysToExpiry": 289, "mx": [], "tlsIssuer": "SSL Corporation", "tlsValidTo": "2026-12-25", "tlsDaysToExpiry": 58, "httpStatus": 200 }
```

Give it domains or URLs. For each one you get a single flat row with the **whois (RDAP)** record, the **DNS lookup**, the **SSL certificate** and the **website status** with the redirect chain.

Typical questions it answers in one run:

- When does each domain expire, and who is the registrar? (`domainExpires`, `domainDaysToExpiry`, `registrar`)
- When does each SSL certificate expire, and is it trusted? (`tlsValidTo`, `tlsDaysToExpiry`, `tlsTrusted`)
- Which domains have no MX, SPF or DMARC record? (`noMx`, `noSpf`, `noDmarc`)
- Where does a domain redirect, and does the website answer? (`finalUrl`, `redirectChain`, `httpStatus`) Built to be called by AI agents (Apify MCP, n8n, LangChain) and by people: small input, one row per domain, a clear `error` on every row that is not complete.

No personal data. The registrant's name, e-mail, phone and address are never read or returned.

### What you get for each domain

| Group | Fields |
|---|---|
| Flags | `expiresSoon`, `noMx`, `noSpf`, `noDmarc`, `redirectsToOtherDomain` |
| Whois (RDAP, or port 43 WHOIS) | `whoisSource` (`rdap` or `whois`), `registrar`, `registrarIanaId`, `domainCreated`, `domainUpdated`, `domainExpires`, `domainAgeDays`, `domainDaysToExpiry`, `domainStatus`, `nameservers`, `dnssecSigned`, `registrantOrganization` (a company only), `rdapStatus`, `whoisError` (why the registry lookup failed) |
| DNS and mail | `a`, `aaaa`, `mx`, `emailProvider` (Google Workspace, Microsoft 365, Zoho Mail and others, read from the MX hosts), `dkimSelectorsFound`, `ns`, `spf`, `dmarc`, `dmarcPolicy`, `caa`, `txt`, `dnsStatus` |
| SSL certificate | `tlsIssuer`, `tlsSubject`, `tlsSans`, `tlsValidFrom`, `tlsValidTo`, `tlsDaysToExpiry`, `tlsTrusted`, `tlsError`, `tlsProtocol`, `tlsStatus` |
| Website status | `httpStatus`, `httpError`, `finalUrl`, `redirects`, `redirectChain`, `responseTimeMs`, `title` |
| Row | `domain`, `status`, `error`, `checksFailed`, `input`, `duplicateOf`, `checkedAt` |

Every row has every field. A value that is not known is `null` (or `[]` for lists), never missing, so a script or an agent can read the same keys from every row.

#### Example

Input:

```json
{ "domains": ["example.com", "https://www.google.com/search?q=x", "this-domain-does-not-exist-9f3k2.com"] }
```

The row for `example.com` (shortened), from a live check on 2026-10-28:

```json
{
  "domain": "example.com",
  "status": "ok",
  "error": null,
  "checksFailed": [],
  "expiresSoon": false,
  "noMx": true,
  "noSpf": false,
  "noDmarc": false,
  "redirectsToOtherDomain": false,
  "registrar": "RESERVED-Internet Assigned Numbers Authority",
  "domainCreated": "1995-08-14",
  "domainExpires": "2027-08-13",
  "domainAgeDays": 11398,
  "domainDaysToExpiry": 289,
  "mx": [],
  "tlsIssuer": "SSL Corporation",
  "tlsValidTo": "2026-12-25",
  "tlsDaysToExpiry": 58,
  "tlsTrusted": true,
  "httpStatus": 200,
  "finalUrl": "https://example.com/",
  "redirects": 0,
  "responseTimeMs": 189,
  "title": "Example Domain"
}
```

`google.com` comes out with `finalUrl: "https://www.google.com/"` and `redirects: 1`. The made-up name comes out as a free row with `status: "not-found"` and the reason in `error`.

### The flags

All flags are `true`, `false` or `null`. `null` means "could not be checked", never "no".

- `expiresSoon`: the domain registration or the SSL certificate expires in fewer than 30 days (or already has). `null` only when neither date is known.
- `noMx`: the domain takes no mail: no MX record, or a "null MX". A subdomain such as `blog.example.com` usually has none.
- `noSpf`: no `v=spf1` TXT record.
- `noDmarc`: no DMARC record at `_dmarc.<domain>`.
- `redirectsToOtherDomain`: the homepage ends on another registrable domain than the one you gave (`old-brand.com` to `new-brand.com`). A redirect from the bare domain to `www.` on the same site is `false`.

### Status and what is charged

| `status` | Meaning | Charged |
|---|---|---|
| `ok` | Every check that was made answered. | yes |
| `partial` | At least one check answered, at least one failed. `checksFailed` lists them (`rdap`, `dns`, `tls`, `http`) and `error` says why. | yes |
| `not-resolving` | The registry has a record, but the name does not exist in DNS (NXDOMAIN): no name servers, expired, or never set up. DNS, TLS and HTTP are skipped. | yes, the registry answered |
| `not-found` | The name does not exist in DNS and the registry did not return a record (or the top-level domain has no RDAP service). Probably not registered. | free |
| `failed` | Every check failed, so nothing is known. Run again later. | free |
| `invalid-domain` | The entry is not a domain (an e-mail address, a bare word, an IP address). `error` says what is wrong. | free |
| `duplicate` | The same domain appeared earlier in the list. It is looked up once. | free |

The rule is simple: **a row is charged when at least one lookup returned data. A domain that does not resolve is charged only if the registry answered. A row where every lookup failed is never charged.**

### Pricing

Pay per result, $1.00 per 1,000 domains on the free plan, $0.60 per 1,000 on the Gold plan and above. You are charged one `domain-looked-up` event for each charged row, and nothing for the free rows in the table above. Set a maximum cost per run and the actor stops there.

### Input

- `domains`: a list of domains or URLs. `https://www.example.com/path?x=1` becomes `example.com`. One entry may hold several domains separated by commas, semicolons or line breaks.
- `text`: the same, as one pasted block (a spreadsheet column, a CSV export).

Up to 10,000 entries per run. An unknown input field stops the run before anything is looked up or charged, with a hint such as `did you mean "domains"?`.

E-mail addresses are refused (the row says so and does not repeat the address).

### How it works

For each domain, at the same time:

1. **Whois**: the domain's RDAP record from the registry (the successor of WHOIS, found through the IANA bootstrap file). Requests to one registry are spaced out, and a registry that asks to slow down is left alone for a while.
2. **DNS**: A, AAAA, MX, NS, TXT, CAA and `_dmarc` TXT queries, then five DKIM selector queries for a domain that takes mail.

Then, when the name exists and points at a public address:

3. **SSL certificate**: one TLS handshake on port 443 to read the certificate. An expired, self-signed or wrong-name certificate is read and reported (`tlsTrusted: false`, `tlsError`), not treated as a failure.
4. **Website status**: one GET of `https://<domain>/` and of each redirect after it (at most 5). Only the status, the final URL, the time and the text of the `<title>` tag are kept. This is a status check of the homepage: robots.txt is not consulted, no cookies are kept, and nothing is crawled.

Eight domains are handled at the same time. A domain takes about one to three seconds.

### Registries without RDAP: port 43 WHOIS fallback

Some country-code registries (for example `.so`, `.ru`) have no RDAP service in the IANA list. For those, the actor asks IANA's WHOIS server (`whois.iana.org`) which WHOIS server the registry runs, then sends one query to that server on port 43. Only the dates, registrar, status codes, name servers and DNSSEC flag are read from the answer; every other line, where a registrant's name, address, e-mail and phone would be, is never parsed, stored or returned. Requests to one server are 1.5 seconds apart, time out after 8 seconds, a server that says it is overloaded is left alone for two minutes, and nothing is retried. `whoisSource` says `rdap` or `whois` for the row; it is `null` when no registration data came back. WHOIS answers have no common format, so a registry whose answer the parser cannot read gives `rdapStatus: "error"` and the rest of the row is still filled.

### Expiring domains only

Set `expiringWithinDays` (1 to 3650) to keep only the domains whose registration or SSL certificate expires within that many days, or has already expired. A domain without a known expiry date is not kept. Domains that do not match are looked up but not saved and not charged; the run summary counts them as `filtered`.

### Email provider and DKIM

`emailProvider` is read from the MX hosts (lowest priority first) and is `null` when there is no MX or the host is not a known provider. For a domain that takes mail the actor also asks DNS for the DKIM key at five common selectors (`google`, `selector1`, `selector2`, `default`, `k1`) and lists those that exist in `dkimSelectorsFound`. An empty list does not prove the domain has no DKIM: senders use many other selector names.

### Good to know

- The domain is checked as you give it. `www.` is dropped, other subdomains are kept. For a subdomain the registry record is that of the domain above it.
- Some country-code domains have no RDAP service in the IANA list; they use the port 43 fallback above. If the registry has no WHOIS server either, the row has `rdapStatus: "unsupported-tld"`, the DNS, SSL and website fields are still filled, and the row is `partial`.
- Most registries hide the registrant. `registrantOrganization` is filled only when the registry shows an organisation with a legal form (Inc, LLC, Ltd, GmbH, S.A., Sp. z o.o. and similar) that is not a privacy service. A person's name is never returned.
- TXT records, DMARC report addresses and the like are returned with the part of any e-mail address before the `@` replaced by `[hidden]`. CAA contact addresses are dropped.
- The actor never connects to private or local addresses, and does not follow a redirect to an IP address.
- `httpStatus` 4xx and 5xx are results, not errors: the row stays `ok` and shows the code.
- Rows come out in the order of your list. The run keeps its progress, so a restarted run does not save or charge a row twice.

### Use it from an AI agent

Through the Apify MCP server, ask for "whois lookup", "dns lookup", "ssl certificate expiry", "domain age", "website status" or "redirect checker" for a list of domains. Pass `{"domains": ["example.com"]}`. Read `status` first, then `error` and `checksFailed` when a row is `partial`.

Did this help? A review on this page, or an issue saying what is missing, helps other people find it.

# Changelog

This Actor's version history is a separate document: https://apify.com/solidfetch/domain-lookup/changelog.md

# Actor input Schema

## `domains` (type: `array`):

One domain per entry. URLs are reduced to the domain and www. is dropped. An entry may hold several domains separated by commas, semicolons or line breaks. E-mail addresses are refused. Repeats and invalid entries get a free row. Use this or the text box below, or both. Up to 10,000 entries per run.

## `text` (type: `string`):

Paste a column from a spreadsheet or a CSV export: one domain per line, or separated by commas, semicolons or tabs.

## `expiringWithinDays` (type: `integer`):

Optional filter. Keep only the domains whose registration or SSL certificate expires within this many days (or already has expired). Other domains are looked up but not saved and not charged. Leave empty to keep every domain.

## Actor input object example

```json
{
  "domains": [
    "apify.com",
    "github.com",
    "https://www.wikipedia.org/wiki/Domain"
  ],
  "text": "apify.com\ngithub.com\nwikipedia.org",
  "expiringWithinDays": 30
}
```

# Actor output Schema

## `results` (type: `string`):

Table with one row per domain: registration (registrar, created, expires, name servers), DNS (A, MX, SPF, DMARC), TLS certificate (issuer, expiry), website status (HTTP code, redirects, title) and status/error fields.

## `flags` (type: `string`):

Short table of problems per domain: expiring soon, no MX, no SPF, no DMARC, redirects to another domain, with days to expiry and HTTP status. Use it to find what needs action.

## `summary` (type: `string`):

JSON record SUMMARY in the key-value store: counts of domains by status.

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "domains": [
        "apify.com",
        "github.com",
        "wikipedia.org"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("solidfetch/domain-lookup").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = { "domains": [
        "apify.com",
        "github.com",
        "wikipedia.org",
    ] }

# Run the Actor and wait for it to finish
run = client.actor("solidfetch/domain-lookup").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "domains": [
    "apify.com",
    "github.com",
    "wikipedia.org"
  ]
}' |
apify call solidfetch/domain-lookup --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,solidfetch/domain-lookup"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/fLKQemAj73Vg2fzoH/builds/ttgnCyasnmU612KCH/openapi.json
