Guide · Domains & email
How to connect your domain to a new website without breaking your email
Your website and your email are controlled by different DNS records on the same domain. To move only the website, change just the web records (usually the A record for the root domain and the CNAME or A record for www) at your current DNS provider, and leave the MX, SPF (TXT), DKIM and DMARC records untouched. Avoid changing nameservers unless you first copy every existing record to the new provider, because switching nameservers replaces all your records at once, including the ones that deliver your email.
Moving to a new website is exciting until someone says, "Since yesterday, nobody's emails are reaching us." It happens more often than it should, and it is almost always avoidable. The website and email on your domain are run by different settings. Once you know which is which, you can change one without touching the other.
How a domain points to things
When someone types yourschool.org or emails office@yourschool.org, their computer asks the Domain Name System (DNS) where to go. The answers come from DNS records stored with your DNS provider. That is often the company where you bought the domain, such as GoDaddy, Hostinger, Namecheap or BigRock, but it can be another service such as Cloudflare.
The records that matter here are:
| Record | What it does | Website or email? |
|---|---|---|
| A (and AAAA) | Points a name to a server's IP address (IPv4, or IPv6 for AAAA) | Website |
| CNAME | Points one name to another name, often used for www | Usually website |
| MX | Says which servers receive email for the domain | |
| TXT (SPF) | Lists the services allowed to send email as your domain | |
| TXT or CNAME (DKIM) | Publishes the keys that prove your emails weren't forged | |
| TXT (DMARC) | Tells receivers what to do with mail that fails SPF or DKIM | |
| TXT (verification) | Proves domain ownership to services such as Google Search Console | Neither, but keep them |
| NS | Names the provider that holds all the records above | Both |
The key point: a new website needs changes only to the A and www records. Everything about email lives in MX and TXT records, which should stay exactly as they are.
Why "just change your nameservers" is risky
Some web hosts ask you to point your domain's nameservers to them. That moves the whole DNS zone, every record, to the new company. If the new zone doesn't contain copies of your MX, SPF, DKIM and DMARC records, email delivery stops or messages start landing in spam the moment the change takes effect.
Changing nameservers isn't wrong, and sometimes it is useful, but it should be a deliberate migration where every record is copied first. For simply launching a new website, editing two records at your existing provider is safer and quicker.
Step by step: switching your website safely
Step 1. Find out where your DNS is managed
Look up your domain's nameservers with any free DNS lookup tool, such as Google's Dig tool (choose NS). The names usually reveal the provider, for example ns1.domaincontrol.com for GoDaddy or *.ns.cloudflare.com for Cloudflare. Log in there.
Step 2. Save a copy of every record
Before you change anything, export the DNS zone if your provider allows it, or take screenshots of the whole record list. This is your undo button. Pay special attention to the MX records, any TXT records that start with v=spf1 or v=DMARC1, and anything containing _domainkey.
Step 3. Lower the TTL (optional, a day ahead)
If the A and www records have a long TTL, such as 86400 seconds (24 hours), change it to 300 seconds a day before the switch. Other servers will then pick up the new address within minutes instead of a day, and you can roll back quickly if needed.
Step 4. Change only the web records
Your new website provider will give you the values. A typical setup looks like this:
- A record for
@(the root domain) pointing to the new server's IP address. Edit the existing A record rather than adding a second one, because two A records for the same name split visitors between the old and new sites. - CNAME for
wwwpointing to the hostname your provider gives you, or an A record with the same IP. - Remove any AAAA record on
@orwwwthat points to the old host, unless your new host gives you one. Otherwise some visitors will keep reaching the old site over IPv6.
Don't touch the MX, SPF, DKIM, DMARC or verification records.
If you use Cloudflare, check whether your new host expects the record to be "DNS only" (grey cloud) or "Proxied" (orange cloud). Some hosts can only issue the security certificate when the record is DNS only.
Step 5. Wait for the certificate, then test
Most modern hosts issue a free HTTPS certificate automatically once the domain points to them. That usually takes minutes. Then test:
- Open
https://yourdomainandhttps://www.yourdomainon your phone using mobile data, not office Wi-Fi, which may be cached. - Check that the padlock shows and that one version redirects to the other.
- Send an email to your domain from a personal account and reply to it. Both directions should work.
Step 6. Check your email records once more
Use the Dig tool to look up MX and TXT for your domain and compare them with the copy from step 2. If they match, email is unaffected. You can raise the TTL back to an hour or more once everything is stable.
A quick word on email authentication
Since 2024, Google and Yahoo have required bulk senders to authenticate their email with SPF and DKIM and to publish a DMARC policy, and Google's sender guidelines ask all senders to set up SPF or DKIM. If your domain has no SPF, DKIM or DMARC records today, your messages are more likely to land in spam regardless of the website. A website change is a good moment to check:
- SPF: one TXT record starting
v=spf1that lists every service sending as your domain, such as your email provider and newsletter tool. Only one SPF record is allowed per domain. - DKIM: set up from inside your email provider's admin panel, which gives you the record to add.
- DMARC: a TXT record at
_dmarc.yourdomain. Starting withv=DMARC1; p=noneplus a reporting address lets you monitor before you enforce.
If you don't have email on your domain yet
Using a Gmail or Yahoo address for official work looks less trustworthy to donors, parents and patients. Options include Google Workspace and Microsoft 365, which are paid per user, and Zoho Mail, which has offered a free plan for small teams in supported regions. Eligible registered nonprofits may get Google Workspace free through Google for Nonprofits. Each provider gives you the MX, SPF and DKIM records to add, which is the same kind of change as above.
The most common mistakes
- Changing nameservers to a web host without copying the email records.
- Deleting "unknown" TXT records that were actually SPF, DKIM or verification records.
- Adding a second A record instead of replacing the old one.
- Forgetting the
wwwversion, so half of visitors see the old site. - Leaving an old AAAA record in place.
- Creating a second SPF record when a new email tool is added, instead of merging them into one.
- Letting a supplier register the domain in their own account.
How PageKo handles it
When a PageKo client goes live, we never ask them to change nameservers. They add two records, an A record for the root domain and a CNAME for www, and we check their existing MX and email records before and after the change. Our connect your domain guide has screen-by-screen steps for GoDaddy, Hostinger, Namecheap, BigRock and Cloudflare. If you are still deciding on a new site, start with a free preview.
Frequently asked questions
Will changing my website break my email?
Not if you only change the website records. Email is delivered according to your MX records and authenticated by SPF, DKIM and DMARC records. If you change only the A and www records and leave those alone, email keeps working. Problems usually come from changing nameservers without copying the email records first.
What is the difference between nameservers and DNS records?
Nameservers decide which company answers questions about your domain. DNS records are the individual answers, such as where the website is (A, CNAME) and where email goes (MX). Changing nameservers moves all the answers to a new company at once, while editing a record changes just one answer.
How long does a DNS change take?
Often minutes, sometimes a few hours. Each record has a time to live (TTL) that tells other servers how long they may cache the old answer. Lowering the TTL a day before the switch makes the change take effect faster.
Do I need to change my MX records when I change my website?
No. MX records only matter if you are changing email providers. When you move your website, leave MX records exactly as they are.
What should I do if my email stops working after a DNS change?
Compare the current records with the copy you saved before the change, and restore any MX, SPF, DKIM or DMARC records that are missing or different. If you changed nameservers, the quickest fix is often to add the missing email records at the new provider.
Sources
- Google Workspace Admin Help, Email sender guidelines.
- Google Admin Toolbox, Dig.
- IETF RFC 7208 (SPF), RFC 6376 (DKIM) and RFC 7489 (DMARC).
- Cloudflare Docs, Proxy status.