# DNS lookup

> Query A, AAAA, MX, TXT, CNAME, and CAA over DNS-over-HTTPS.

Free DNS lookup. Ask Cloudflare or Google for A, AAAA, MX, TXT, CNAME, and CAA records, and read SPF and DMARC from the TXT answers. Queries run on the server. Private names are refused.

- Page: https://benchline.fabwaseem.com/t/dns-lookup
- Runs: in the browser, plus one server fetch of the public URL you give it.
- Price: free, no account
- Input: A public hostname, record types, and a resolver.
- Output: DNS records, response codes, and parsed SPF and DMARC.
- Keywords: dns lookup, mx lookup, dmarc lookup, spf check
- Updated: 2026-10-18
- Built by: Waseem Anjum (https://fabwaseem.com)

## How to use it

1. **Enter a hostname.** Use a name such as example.com. A bare label or a URL is not a DNS query.
2. **Pick records and a resolver.** Choose the types you need and Cloudflare or Google.
3. **Read the answers.** Each row is type, name, TTL, and data. SPF and DMARC are parsed beside the raw TXT.

## Use it from an AI agent

MCP tool name: `lookup_dns`
MCP endpoint: https://benchline.fabwaseem.com/mcp (Streamable HTTP, no key)
HTTP: POST https://benchline.fabwaseem.com/api/v1/tools/dns-lookup with the input as the JSON body
This call fetches a public URL on the server. Private addresses are refused.

Query A, AAAA, MX, TXT, CNAME, and CAA for a public hostname over DNS-over-HTTPS, and parse SPF and DMARC. Private names are refused. The resolver is Cloudflare or Google.

### Input schema

```json
{
  "type": "object",
  "properties": {
    "name": {
      "type": "string",
      "description": "Public hostname, such as example.com. Private names are refused."
    },
    "types": {
      "default": [
        "A",
        "AAAA",
        "MX",
        "TXT",
        "CNAME",
        "CAA"
      ],
      "type": "array",
      "items": {
        "type": "string",
        "enum": [
          "A",
          "AAAA",
          "MX",
          "TXT",
          "CNAME",
          "CAA"
        ]
      }
    },
    "resolver": {
      "default": "cloudflare",
      "type": "string",
      "enum": [
        "cloudflare",
        "google"
      ]
    },
    "mail": {
      "default": true,
      "description": "Also fetch the _dmarc TXT record and parse SPF.",
      "type": "boolean"
    }
  },
  "required": [
    "name",
    "types",
    "resolver",
    "mail"
  ],
  "additionalProperties": false
}
```

### Example tools/call

```json
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "lookup_dns",
    "arguments": {
      "name": "example",
      "types": [
        "A",
        "AAAA",
        "MX",
        "TXT",
        "CNAME",
        "CAA"
      ],
      "resolver": "cloudflare",
      "mail": true
    }
  }
}
```

Setup for Claude, Cursor, and VS Code: https://benchline.fabwaseem.com/mcp/guide

## Questions

### Which resolvers are used?

Cloudflare (1.1.1.1) or Google (8.8.8.8), over HTTPS. The hostname is not contacted directly.

### Does this look up private names?

No. localhost, .local, and .internal are refused. A public resolver would not see those names anyway.

### Where do SPF and DMARC come from?

SPF is the TXT record that starts with v=spf1. DMARC is the TXT record at _dmarc.your domain.

## Related tools

- [HTTP headers](https://benchline.fabwaseem.com/t/http-headers-checker): Follow redirects and grade the security headers on a public URL.
- [SSL checker](https://benchline.fabwaseem.com/t/ssl-checker): Expiry, names, and the chain for a certificate on port 443.
- [CIDR calculator](https://benchline.fabwaseem.com/t/ip-cidr-calculator): Network, broadcast, host range, and membership for IPv4 and IPv6.
- [URL encoder and parser](https://benchline.fabwaseem.com/t/url-codec): Encode or decode a URL, then break the query string into parameters.
