IP Geolocation & DNS Lookup: Domain to Server Guide
How IP Geolocation Works
IP geolocation is not GPS — it relies on IP address allocation databases, and its accuracy depends on database quality.
| Accuracy Level | Scope | Data Source |
|---|---|---|
| Country | Country | WHOIS allocation records |
| City | City/region | ISP reports + backbone routing |
| District | 10-50km | Commercial databases (MaxMind) |
| Street | 1-5km | WiFi/cellular positioning assist |
IP geolocation cannot pinpoint an exact address — only an approximate area.
Look Up IP Information with ToolsKu
DNS Lookup
- Open the DNS Lookup tool
- Enter a domain (e.g.,
example.com) - Select a record type (A/AAAA/CNAME/MX/TXT/NS)
- Click query and review the results
Whois Lookup
- Open the Whois Lookup tool
- Enter a domain
- Review the registration information (registrar, creation date, expiration date, registrant)
DNS Record Types Explained
| Type | Name | Purpose | Example |
|---|---|---|---|
| A | Address record | Domain → IPv4 | example.com → 93.184.216.34 |
| AAAA | IPv6 address | Domain → IPv6 | example.com → 2606:2800:220:1:... |
| CNAME | Canonical name | Domain → another domain | www.example.com → example.com |
| MX | Mail exchange | Mail server | example.com → mail.example.com (priority 10) |
| TXT | Text record | SPF/DKIM/verification | "v=spf1 include:_spf.google.com" |
| NS | Name server | Domain name servers | example.com → ns1.example.com |
| SOA | Start of authority | Zone management info | Primary NS + admin email + serial |
| SRV | Service record | Service discovery | _http._tcp.example.com → target:port |
| CAA | Certificate authority | Restrict certificate issuance | 0 issue "letsencrypt.org" |
Common DNS Lookup Scenarios
Find a Website's IP
# Command line
dig example.com A
nslookup example.com
# Result
example.com. 3600 IN A 93.184.216.34
Find Mail Servers
dig example.com MX
# Result
example.com. 3600 IN MX 10 mail.example.com.
example.com. 3600 IN MX 20 mail2.example.com.
Check SPF Records (Anti-Spam)
dig example.com TXT
# Result
example.com. 3600 IN TXT "v=spf1 include:_spf.google.com ~all"
The DNS Resolution Process
User enters example.com
↓
1. Browser DNS cache → hit? return
↓
2. OS DNS cache → hit? return
↓
3. Router DNS cache → hit? return
↓
4. ISP recursive resolver → hit? return
↓
5. Root name server (.) → returns .com NS
↓
6. .com TLD server → returns example.com NS
↓
7. example.com authoritative server → returns the A record
↓
Result: 93.184.216.34
DNS Cache Duration (TTL)
dig example.com
# ANSWER SECTION:
example.com. 3600 IN A 93.184.216.34
# ↑ TTL (seconds) = 1 hour
| TTL Value | Use Case |
|---|---|
| 300 (5 minutes) | Frequently changing (CDN, blue-green deployments) |
| 3600 (1 hour) | Typical websites |
| 86400 (1 day) | Stable services (email, NS) |
Reading Whois Information
Key Fields in a Query Result
Domain Name: EXAMPLE.COM
Registrar: Google Domains LLC
Registrar URL: https://domains.google
Creation Date: 1995-08-14
Expiration Date: 2028-08-13
Name Server: NS1.GOOGLE.COM
Name Server: NS2.GOOGLE.COM
Registrant Organization: Example Inc.
DNSSEC: unsigned
| Field | Meaning | Use |
|---|---|---|
| Registrar | Registrar | Where the domain is managed |
| Creation Date | Registration date | Judge the domain's age |
| Expiration Date | Expiration date | Prevent domain expiry |
| Name Server | DNS servers | Where DNS resolution is managed |
| Registrant | Registrant | Ownership info (may be privacy-protected) |
| DNSSEC | DNS security extensions | DNS response validation |
Privacy Protection
# Without privacy protection
Registrant Name: John Doe
Registrant Email: john@example.com
# With privacy protection enabled
Registrant Name: REDACTED FOR PRIVACY
Registrant Email: Please contact registrar
Hands-On Network Troubleshooting
Scenario 1: Website Won't Load
1. DNS lookup → does the domain resolve?
❌ Doesn't resolve → DNS misconfiguration or expired domain
✅ Resolves → continue
2. Ping the IP → is the server reachable?
❌ Timeout → server down or firewall
✅ Reachable → continue
3. curl -I → what HTTP status code?
301/302 → redirect issue
403 → permission issue
500 → server-side error
200 → probably a front-end issue
Scenario 2: Email Delivery Fails
1. Check MX records → is the mail server configured correctly?
2. Check SPF records → is the sending server whitelisted in SPF?
3. Check DKIM records → is the signature correct?
4. Check DMARC records → is the email policy correct?
# Look up all email-related records at once
dig example.com MX
dig example.com TXT # SPF + DKIM + DMARC all live in TXT records
Scenario 3: Verify a CDN Configuration
1. Check CNAME → does the domain point to a CDN?
www.example.com → cdn.example.com.cdn77.org
2. Check A records → CDN edge node IPs
3. DNS lookups from multiple regions → verify CDN routes to the nearest node
Querying DNS with JavaScript
In the Browser (DoH)
// DNS over HTTPS (Cloudflare)
async function dnsLookup(domain, type = 'A') {
const url = `https://cloudflare-dns.com/dns-query?name=${domain}&type=${type}`;
const response = await fetch(url, {
headers: { 'Accept': 'application/dns-json' },
});
const data = await response.json();
return data.Answer;
}
// Usage
const records = await dnsLookup('example.com', 'A');
// [{ name: "example.com", type: 1, TTL: 3600, data: "93.184.216.34" }]
In Node.js
import { resolve } from 'node:dns/promises';
// Query A records
const addresses = await resolve('example.com', 'A');
// ["93.184.216.34"]
// Query MX records
const mxRecords = await resolve('example.com', 'MX');
// [{ exchange: "mail.example.com", priority: 10 }]
// Query all records
const anyRecords = await resolve('example.com', 'ANY');
FAQ
How Long Do DNS Changes Take to Propagate?
It depends on the TTL. If the old TTL was 3600 seconds, the worst case is 1 hour. Lower the TTL to 300 seconds before making DNS changes, wait for the old TTL to expire, then make the change.
Why Do DNS Results Differ by Location?
CDNs and Anycast return different IPs based on the user's location. This is expected behavior, not a DNS problem.
What Is DNSSEC For?
DNSSEC uses digital signatures to verify the authenticity of DNS responses, preventing DNS hijacking attacks. If DNSSEC validation fails, the browser refuses to connect.
Summary
IP geolocation and DNS lookup are fundamental network troubleshooting skills. Master DNS record types, the resolution process, and Whois interpretation, and you can pinpoint website issues quickly. ToolsKu offers two online tools — DNS Lookup and Whois Lookup — so you can troubleshoot networks right in your browser without installing command-line tools.