Hosting · Info
WordPress DNS Settings Explained: Which Records Your Site Needs

Short answer
A self-hosted WordPress site needs an A record, and often an AAAA record, pointing your domain to your host's IP address, plus a CNAME or A record for the www version. Email needs MX records and TXT records for SPF, DKIM and DMARC. You change these records wherever your domain's nameservers point, usually your registrar, your host or Cloudflare.
Key takeaways
- WordPress itself has no DNS settings; DNS lives with your domain's DNS provider.
- A and AAAA records point the domain to your web host's server.
- A CNAME record usually points www to the main domain.
- MX and TXT records control email delivery and domain verification.
- Changes can take minutes to a day or two to reach everyone, depending on TTL and caching.
Does WordPress have DNS settings?
No. WordPress does not manage DNS; your domain's DNS records live with whichever company runs your nameservers, usually your domain registrar, your web host or a DNS service such as Cloudflare.
WordPress only needs to know its own address, set under Settings > General as the WordPress Address and Site Address. DNS is what makes that address lead to your server.
If you are not sure who controls your DNS, look up your domain's nameservers. The free ICANN Lookup tool shows the nameservers and registrar listed for any domain. Our explainer on what a nameserver is shows how to find them and what they do.
Which DNS records does a WordPress site need?
Most WordPress sites need an A record for the root domain, often an AAAA record for IPv6, a CNAME or A record for www, MX records for email, and TXT records for verification and email security.
| Record | Name | Points to | Purpose |
|---|---|---|---|
| A | @ | Host's IPv4 address | Main website |
| AAAA | @ | Host's IPv6 address | Website over IPv6 |
| CNAME | www | Your domain | www version |
| MX | @ | Mail server | Receiving email |
| TXT | @ | Text value | SPF, verification |
| TXT | _dmarc | DMARC policy | Email protection |
Your host's documentation lists the exact values. Copy them carefully, since one wrong digit in an IP address sends visitors to the wrong place.
The Cloudflare DNS record types guide explains each record type in more detail.
What does the A record do?
The A record connects your domain name to your web server's IPv4 address, so when someone types your domain, their browser knows which server to ask for your WordPress site.
The @ symbol in the name field usually means the root domain itself. Some DNS panels ask you to leave the name blank instead.
If your host also gives you an IPv6 address, add a matching AAAA record. Visitors on IPv6 networks can then reach your site directly.
When you move to a new host, the A record is usually the main thing that changes. Our guide on pointing a domain to WordPress hosting walks through that process.
How should you set up www?
Add a CNAME record named www that points to your root domain, or an A record with the same IP, then choose one version, with or without www, as your main address in WordPress.
Both addresses should work, but one must redirect to the other. Otherwise search engines may see two copies of your site.
Set your preferred version in Settings > General. Many hosts and SSL setups also add the redirect automatically once both DNS records exist.
Which records control email?
MX records tell other mail servers where to deliver email for your domain, while TXT records hold SPF, DKIM and DMARC policies that prove your emails are genuine.
If you use an email provider such as Google Workspace or Microsoft 365, it gives you the exact MX and TXT values to add. Keep these separate from your website records.
SPF lists which servers may send email for your domain. If your WordPress site sends mail through an SMTP service, add that service to your SPF record too.
Our guide on setting up SPF, DKIM and DMARC for WordPress email shows the records step by step.
What are TXT records used for besides email?
Services such as Google Search Console, Microsoft and many SaaS tools ask you to add a TXT record to prove you own the domain.
Verification records are harmless to leave in place. They contain a code that only means something to the service that issued it.
You can have many TXT records on the same name. The exception is SPF: a domain should have only one SPF record, so combine services into a single line.
What is TTL and why does it matter?
TTL, or time to live, tells other servers how long to cache a DNS record before checking again, so a lower TTL means changes spread faster and a higher TTL means fewer lookups.
Before a planned move, lower the TTL on your A record to a few minutes a day or so in advance. When you change the record, most visitors switch quickly.
After the move, you can raise the TTL again. Our guide on how long DNS propagation takes explains why some visitors see changes sooner than others.
How do you change DNS settings?
Log in to the company that runs your nameservers, open the DNS or zone editor for your domain, then add, edit or delete records and save.
The interface varies, but each record has the same parts: type, name, value and TTL. Some panels also ask for a priority, which applies to MX records.
Take a screenshot of the existing records before you change anything. If something breaks, you can put the old values back quickly.
How does Cloudflare change DNS for WordPress?
If you move your nameservers to Cloudflare, Cloudflare runs your DNS, and records set to proxied send web traffic through its network for caching, security and SSL.
Website records, such as A, AAAA and www, are usually proxied. Email records such as MX must not be proxied, since Cloudflare's proxy only handles web traffic.
Our guide to Cloudflare SSL settings for WordPress covers the encryption settings that matter once traffic flows through Cloudflare.
How do you check that DNS is set up correctly?
Use a DNS lookup tool or command-line tools like dig or nslookup to see what each record returns, then visit your site and send a test email to confirm both work.
The MDN glossary entry on DNS gives a short, plain explanation of how lookups work if you want the background.
Check from more than one location. Public lookup tools query servers around the world, which shows whether a change has spread everywhere.
If your site shows a DNS error in the browser, our guide to fixing DNS_PROBE_FINISHED_NXDOMAIN covers the usual causes.
What DNS mistakes should you avoid?
Common mistakes are pointing the A record at an old server, deleting MX records during a host move, adding two SPF records, proxying email records through Cloudflare and forgetting the www record.
Another frequent problem is editing DNS in the wrong place. If your nameservers point to Cloudflare, changes at your registrar have no effect, and the reverse is also true.
When in doubt, ask your host's support team for the exact records. They see these setups every day and can usually spot a wrong value within minutes.
Frequently asked questions
Where do I change DNS settings for my WordPress site?
Change them wherever your domain's nameservers point, usually your domain registrar, your web host or a DNS service like Cloudflare. WordPress itself has no DNS settings.
What A record should my WordPress site use?
Use the IPv4 address your web host gives you for your hosting account. Hosts list it in their dashboard or welcome email, and many also provide an IPv6 address for an AAAA record.
Will changing DNS break my email?
It can if you remove or change MX records by mistake. Website changes usually only touch A, AAAA and www records, so leave MX and email TXT records as they are.
How long do DNS changes take?
Many changes appear within minutes to a few hours, but some networks cache old records until the TTL expires, so full propagation can take up to a day or two.
Should www be a CNAME or an A record?
Either works. A CNAME pointing www to your root domain is common because it follows the root's A record automatically. Then pick one version as your main address in WordPress.
Sources
- DNS record types Cloudflare Docs
- DNS MDN Web Docs
- Changing The Site URL WordPress Developer Resources
- ICANN Lookup ICANN
Is your product missing, or something out of date?
Tell us what to add or correct. We read every note and reply when we need a source. A message does not buy a ranking.
Thanks — we review requests within 3 business days.
Related guides
About the editors
Researched from the primary sources listed above and checked against our editorial rules before publishing.


