Facebook tracking pixel
new.website
← Back to blog

Building the DNS Lookup Tool: A Developer's Journey

August 6, 2024

Maya Kyler

When we set out to build new.website's DNS lookup tool, we had a simple goal: make DNS queries as easy as typing in a search box. What started as a basic CNAME checker evolved into a comprehensive DNS analysis tool supporting 8 different record types. Here's the story of how we built it, the challenges we faced, and the lessons we learned along the way.

The Problem: DNS is Intimidating

DNS (Domain Name System) is the phonebook of the internet, but for most people, it might as well be written in hieroglyphics. Traditional DNS lookup tools are either:

  • Too technical: Command-line tools like dig and nslookup require knowledge of syntax
  • Too limited: Simple web tools only show basic A records
  • Too ugly: Enterprise tools prioritize function over form
  • Too slow: Many require multiple queries for different record types

We wanted to build something different: a tool that was powerful enough for network administrators but intuitive enough for anyone curious about how domains work.

From CNAME to Full DNS Suite

Our journey began with a focused goal: build the best CNAME lookup tool on the web. CNAME records are crucial for understanding how domains redirect and resolve, but they're often buried in technical interfaces.

Initial Feature Set:

  • ✓ CNAME chain visualization
  • ✓ Real-time DNS resolution
  • ✓ Clean, modern interface
  • ✓ Mobile-responsive design

But as we built the foundation, we realized we could do so much more. Why limit ourselves to CNAME when users need to query A, MX, TXT, and other record types? That's when we decided to expand into a full DNS lookup suite.

Technical Architecture: DNS-over-HTTPS

The biggest technical challenge was performing DNS queries from a web browser. Traditional DNS operates on port 53 using UDP/TCP protocols that browsers can't access directly. Enter DNS-over-HTTPS (DoH).

We chose Cloudflare's DNS-over-HTTPS API for several reasons:

  • • JSON response format (easy to parse)
  • • Excellent global performance
  • • Support for all standard record types
  • • CORS-enabled for browser requests
  • • 99.9% uptime reliability

The API endpoint structure is beautifully simple:

https://cloudflare-dns.com/dns-query?name=new.website&type=A

Supporting 8 DNS Record Types

Each DNS record type has its own quirks and formatting requirements. Here's how we handled the complexity:

A & AAAA Records

Straightforward IPv4 and IPv6 addresses. No special parsing needed.

CNAME Records

Required building a chain tracer to follow redirects up to 10 levels deep, preventing infinite loops.

MX Records

Needed priority parsing: 10 mail.new.website becomes priority + server.

TXT Records

Simple text values, but important for SPF, DKIM, and domain verification.

NS Records

Name server records that show DNS delegation - crucial for troubleshooting.

SOA Records

Start of Authority records with complex formatting including serial numbers and timing values.

SRV Records

Service records with priority, weight, port, and target - the most complex format we handle.

User Experience Design Decisions

Building a tool that works for both beginners and experts required careful UX consideration:

1. Progressive Disclosure

We start with simple defaults (A records) but provide easy access to advanced options through a dropdown selector. Each record type includes a helpful description so users understand what they're querying.

2. Visual Hierarchy

Different record types get distinct color coding, making it easy to scan results at a glance. Priority information for MX and SRV records is prominently displayed with badges.

3. CNAME Chain Visualization

When users query CNAME records, we show the complete resolution chain with arrows connecting each step. This visual representation makes it clear how domain redirection works.

4. Copy-Friendly Results

Every record includes a one-click copy button. Network administrators often need to paste DNS results into documentation or support tickets, so we made this effortless.

Performance Optimizations

DNS lookups need to be fast to feel responsive. Here's how we achieved sub-second query times:

Speed Improvements:

  • Debounced Input: Wait 300ms after user stops typing before querying
  • 🎯Smart Caching: Browser caches DNS responses to avoid duplicate queries
  • 🚀Parallel Processing: CNAME chain resolution happens concurrently where possible
  • 10-Second Timeout: Prevents hanging on unresponsive domains

Error Handling and Edge Cases

DNS is messy in the real world. We encountered numerous edge cases during development:

  • Non-existent domains: Clean error messages instead of technical jargon
  • Malformed records: Graceful handling of invalid DNS responses
  • Network timeouts: Clear indicators when queries take too long
  • CNAME loops: Detection and prevention of infinite redirections
  • Mixed case domains: Automatic normalization to lowercase
  • Trailing dots: Proper handling of FQDN formatting

Mobile-First Development

Network troubleshooting doesn't always happen at a desktop. We built the tool mobile-first, ensuring it works perfectly on phones and tablets:

  • Touch-friendly interface with appropriately sized buttons
  • Responsive grid layouts that adapt to screen size
  • Horizontal scrolling for long CNAME chains on small screens
  • Optimized typography for mobile readability

Integration with new.website Ecosystem

The DNS lookup tool isn't standalone - it's part of our growing suite of web development utilities:

  • Consistent design: Matches our Open Graph checker and QR generator
  • Shared components: Uses the same UI library for maintainability
  • Brand integration: Defaults to new.website for examples
  • Footer placement: Easy discovery alongside other tools

What's Next

The DNS lookup tool is live and being used by thousands of developers, but we're not done innovating. On our roadmap:

  • Batch Queries: Look up multiple domains simultaneously
  • Historical Tracking: See how DNS records change over time
  • DNS Health Checker: Automated validation of common DNS configurations
  • Export Options: Download results in CSV or JSON format
  • API Access: Programmatic access for automated workflows

Try It Yourself

The DNS lookup tool is available now at new.website/dns-lookup. Whether you're troubleshooting a domain issue, learning how DNS works, or just curious about how your favorite websites are configured, give it a try.

Building developer tools is incredibly rewarding because you're solving real problems that you've experienced yourself. Every feature in our DNS tool came from a genuine need we encountered while building and managing websites.

🔍 Ready to explore DNS records? Head to new.website/dns-lookup and discover what makes the internet tick. From A records to CNAME chains, it's all just a query away.