dns.enhost.uk is a free DNS lookup tool for checking DNS records of any domain. Query A, AAAA, MX, TXT, NS, CNAME, and other record types. Results are compared across multiple DNS providers to ensure accuracy and highlight any discrepancies.
DNS lookups powered by Google Public DNS, Cloudflare DNS, and NextDNS.
Query DNS records via HTTP API:
https://dns.enhost.uk/?domain=example.com&type=A
Parameters:
• domain - Domain name to query (required)
• type - Record type: A, AAAA, CNAME, MX, TXT, NS, SOA, CAA, SRV (default: A)
Example response:
{
"Status": 0,
"Question": [...],
"Answer": [
{
"name": "example.com.",
"type": 1,
"TTL": 3600,
"data": "93.184.216.34"
}
]
}
Using cURL:
curl "https://dns.enhost.uk/?domain=enhost.uk&type=A"
Check MX records:
curl "https://dns.enhost.uk/?domain=enhost.uk&type=MX"
Pretty print with jq:
curl -s "https://dns.enhost.uk/?domain=enhost.uk&type=A" | jq '.'
Bash script example:
#!/bin/bash
DOMAIN="enhost.uk"
TYPE="A"
# Query DNS
RESULT=$(curl -s "https://dns.enhost.uk/?domain=$DOMAIN&type=$TYPE")
# Check if successful
if echo "$RESULT" | jq -e '.Answer' > /dev/null; then
echo "DNS Records for $DOMAIN ($TYPE):"
echo "$RESULT" | jq -r '.Answer[] | .data'
else
echo "No records found"
fi
Python example:
import requests
domain = "enhost.uk"
record_type = "A"
response = requests.get(
"https://dns.enhost.uk/",
params={"domain": domain, "type": record_type}
)
data = response.json()
if "Answer" in data:
for record in data["Answer"]:
print(f"{record['name']} -> {record['data']} (TTL: {record['TTL']})")
else:
print("No records found")
JavaScript example:
const domain = 'enhost.uk';
const recordType = 'A';
fetch(`https://dns.enhost.uk/?domain=${domain}&type=${recordType}`)
.then(res => res.json())
.then(data => {
if (data.Answer) {
data.Answer.forEach(record => {
console.log(`${record.name} -> ${record.data}`);
});
} else {
console.log('No records found');
}
});
PHP example:
<?php
$domain = 'enhost.uk';
$type = 'A';
$url = "https://dns.enhost.uk/?domain=" . urlencode($domain) .
"&type=" . urlencode($type);
$response = file_get_contents($url);
$data = json_decode($response, true);
if (isset($data['Answer'])) {
foreach ($data['Answer'] as $record) {
echo "{$record['name']} -> {$record['data']}\n";
}
} else {
echo "No records found\n";
}
?>