The Startup Guide to DNS Setup: Configuring A, MX, and TXT Records

When launching a new product or landing page, configuring your DNS settings is one of the final technical hurdles. A misconfigured DNS record can prevent users from accessing your website, cause emails to bounce, or send your outbound communication straight to the spam folder.

This guide walks you through the critical DNS records every founder should understand, how to set them up, and common pitfalls to avoid.


1. The Core DNS Records Defined

DNS (Domain Name System) acts as the phonebook of the internet, translating human-readable hostnames into computer-readable IP addresses and server routes. Here are the records you will need to configure:

A and AAAA Records

These point your domain or subdomain to the physical server hosting your site.

  • A Record: Maps your domain to an IPv4 address (e.g. 192.0.2.1).
  • AAAA Record: Maps your domain to an IPv6 address.
  • Example: If you host your Next.js app on Vercel or Netlify, they will ask you to create an A record pointing to their specific IP addresses.

CNAME Records

A Canonical Name (CNAME) record acts as an alias, pointing one subdomain to another domain name instead of an IP address.

  • Example: Pointing blog.yourdomain.com to hashnode.network or www.yourdomain.com to your root domain.
  • Note: You cannot place a CNAME record at the root domain level (e.g. yourdomain.com) as it conflicts with other records. Use an ALIAS record if your registrar supports it.

MX Records

Mail Exchanger (MX) records tell the internet which mail servers handle incoming emails for your domain.

  • Example: Setting up Google Workspace requires adding multiple MX records with different priority levels pointing to Google’s mail servers.
  • Tip: Always double-check priority numbers. The lowest number gets the highest priority.

TXT Records

Text records hold machine-readable text information for services outside your domain. They are primarily used for domain ownership validation and email authentication:

  • SPF (Sender Policy Framework): Lists which mail servers are authorized to send email on behalf of your domain.
  • DKIM (DomainKeys Identified Mail): Adds a cryptographic signature to your emails, verifying they were not altered in transit.
  • DMARC (Domain-based Message Authentication, Reporting, and Conformance): Tells receiving mail servers what to do if an email fails SPF or DKIM checks.

2. Common Naming and Launch Pitfalls

Many founders make simple configuration errors that lead to launch downtime or poor email reputation:

  1. Conflicting Wildcards: Creating duplicate A records for the same subdomain can cause traffic to split randomly between two different hosts.
  2. Missing www Redirects: Forgetting to configure CNAME records or redirects for the www subdomain causes the site to fail for users who type www.yourdomain.com.
  3. Bad SPF Syntax: Having multiple SPF records in your DNS is invalid. If you use multiple services (e.g. Google Workspace and Resend), you must merge them into a single TXT record: v=spf1 include:_spf.google.com include:sendgrid.net ~all.
  4. Ignoring Propagation Times: DNS changes do not happen instantly. Depending on the TTL (Time to Live) settings, propagation can take anywhere from a few minutes to 48 hours.

3. Auditing Your Live DNS Records

Once you update your DNS records in your domain registrar (GoDaddy, Namecheap, Cloudflare, etc.), you need to verify that they are propagating correctly.

Instead of waiting blindly, you can inspect the resolver status directly using the DNS Lookup Tool. This tool queries global DNS resolvers and structured tables for A, AAAA, MX, TXT, NS, CNAME, and SOA records to ensure your configuration matches your hosting requirements.

Related Articles

Are you building a tool or platform in the GEO, AI marketing, or customer discovery space? Learn more about our editorial collaborations and sponsorship opportunities →

Find your next perfect customers

Turn this article's ideas into real conversations across 10+ communities.