DNS Setup Guide
DNS configuration from scratch - nameservers, A records, CNAME, MX, and TXT records explained clearly.
Start with nameservers
Before you can configure individual DNS records, you need to point your domain to a DNS provider. This is done by setting nameservers at your registrar.
Nameservers tell the internet which DNS provider is authoritative for your domain. Your DNS provider is where you'll manage all your records.
How to change nameservers
- Log into your registrar (Namecheap, GoDaddy, etc.)
- Find the domain in your account
- Look for "Nameservers" or "DNS" settings
- Replace the default nameservers with your DNS provider's nameservers
- Save. Propagation takes 1–48 hours.
Recommended DNS providers: Cloudflare (free, fast, secure), AWS Route 53 (good for AWS-hosted sites), or your hosting provider's nameservers if they offer DNS management.
Setting up an A record
An A record points your domain to an IP address. This is how browsers find your website.
Example A record:
The "@" symbol represents the root domain (example.com). Add both "@" and "www" records pointing to the same IP to ensure both versions work.
Setting up a CNAME record
CNAME records point one domain name to another. Use them for subdomains - never on the root domain.
Example CNAME records:
Setting up MX records for email
MX records tell email servers where to deliver mail for your domain. Your email provider (Google Workspace, Microsoft 365, etc.) will give you the exact records to add.
Example MX records (Google Workspace):
Lower priority numbers are tried first. Always add at least two MX records for redundancy.
TXT records for verification and email security
TXT records store text data. They're used for domain verification, SPF (prevents email spoofing), DKIM (email authentication), and DMARC (email policy).
- SPF: Specifies which servers can send email on behalf of your domain. Example:
v=spf1 include:_spf.google.com ~all - DKIM: Adds a cryptographic signature to outgoing emails. Your email provider generates this for you.
- DMARC: Tells receiving servers what to do with emails that fail SPF or DKIM checks. Example:
v=DMARC1; p=quarantine - Domain verification: Services like Google Search Console and various SaaS tools ask you to add a TXT record to prove domain ownership.
Testing your DNS setup
- MXToolbox: Check MX records and test email deliverability.
- DNSChecker.org: Verify propagation across global DNS servers.
- dig (command line):
dig example.com A- queries DNS records directly. - Google Admin Toolbox: Check DNS records and diagnose issues for Google Workspace setups.
Ready to put this into practice?
Use our free tools to research, value, and find domains.