Set Up Email for Your Domain
Configure DNS records to use your YWT domain with an external email provider like Google Workspace, Microsoft 365, or ProtonMail.
Set Up Email for Your Domain
YWT does not provide email hosting, but you can use your YWT domain with any external email provider. This guide shows you how to configure the DNS records needed for email delivery with the most popular providers.
SPF, DKIM, and DMARC matter. Without proper email authentication records, messages sent from your domain are far more likely to end up in spam folders or be rejected entirely. Every provider section below includes the authentication records you need. Do not skip them.
Email providers can change DNS targets or generate account-specific records. Use your provider's admin console as the source of truth; the values in this guide are common examples.
Before you begin
- Your domain must be using YWT nameservers so you can manage DNS records in your YWT account. If you use external nameservers, add the records at your DNS provider instead.
- You should have already signed up for your chosen email provider and completed their initial setup. The provider will give you the specific record values to use.
- Familiarize yourself with the DNS manager if you have not used it before.
Provider-specific setup
Google Workspace (formerly G Suite) requires MX records for mail delivery plus TXT records for SPF and DKIM authentication.
MX records
Add the following MX records in the YWT DNS manager. Set the Name to @ (root domain) for all of them:
| Priority | Value |
|---|---|
| 1 | ASPMX.L.GOOGLE.COM |
| 5 | ALT1.ASPMX.L.GOOGLE.COM |
| 5 | ALT2.ASPMX.L.GOOGLE.COM |
| 10 | ALT3.ASPMX.L.GOOGLE.COM |
| 10 | ALT4.ASPMX.L.GOOGLE.COM |
SPF record
Add a TXT record on the root domain (@):
v=spf1 include:_spf.google.com ~allDKIM record
Google Workspace generates a unique DKIM key for your domain. To find it:
- Go to the Google Admin console.
- Navigate to Apps > Google Workspace > Gmail > Authenticate email.
- Select your domain and click Generate new record.
- Copy the TXT record value provided.
Add a TXT record with the name google._domainkey and the value Google gave you. The value will look something like:
v=DKIM1; k=rsa; p=MIIBIjANBgkqhki...DMARC record (recommended)
Add a TXT record with the name _dmarc and a policy value. A good starting point:
v=DMARC1; p=none; rua=mailto:dmarc-reports@yourdomain.chYou can tighten the policy to quarantine or reject once you have confirmed everything works.
Microsoft 365 (Exchange Online) uses a single MX record along with SPF, DKIM, and an autodiscover CNAME.
MX record
Add an MX record on the root domain (@):
| Priority | Value |
|---|---|
| 0 | yourdomain-ch.mail.protection.outlook.com |
Replace yourdomain-ch with the value Microsoft provides in your admin center (it is usually your domain with dots replaced by hyphens).
SPF record
Add a TXT record on the root domain (@):
v=spf1 include:spf.protection.outlook.com ~allDKIM records
Microsoft 365 uses two CNAME records for DKIM:
| Name | Value |
|---|---|
selector1._domainkey | selector1-yourdomain-ch._domainkey.yourtenant.onmicrosoft.com |
selector2._domainkey | selector2-yourdomain-ch._domainkey.yourtenant.onmicrosoft.com |
The exact values are shown in the Microsoft 365 admin center under Settings > Domains > DNS records.
Autodiscover CNAME
Add a CNAME record so Outlook clients can auto-configure:
| Name | Value |
|---|---|
autodiscover | autodiscover.outlook.com |
DMARC record (recommended)
Add a TXT record with the name _dmarc:
v=DMARC1; p=none; rua=mailto:dmarc-reports@yourdomain.chProtonMail provides simple DNS setup with one MX record and TXT records for verification, SPF, and DKIM.
Domain verification
ProtonMail requires you to add a TXT record on the root domain (@) to verify ownership. The value is provided in the ProtonMail dashboard and looks like:
protonmail-verification=abc123...MX records
Add the following MX records on the root domain (@):
| Priority | Value |
|---|---|
| 10 | mail.protonmail.ch |
| 20 | mailsec.protonmail.ch |
SPF record
Add a TXT record on the root domain (@):
v=spf1 include:_spf.protonmail.ch ~allDKIM records
ProtonMail generates three CNAME records for DKIM. You will find the exact values in your ProtonMail custom domain settings. They follow this pattern:
| Name | Type | Value |
|---|---|---|
protonmail._domainkey | CNAME | protonmail.domainkey.abc123.domains.proton.ch |
protonmail2._domainkey | CNAME | protonmail2.domainkey.abc123.domains.proton.ch |
protonmail3._domainkey | CNAME | protonmail3.domainkey.abc123.domains.proton.ch |
DMARC record (recommended)
Add a TXT record with the name _dmarc:
v=DMARC1; p=none; rua=mailto:dmarc-reports@yourdomain.chThe general process for any email provider is the same. You will need to add the following types of DNS records:
MX records
Your email provider will give you one or more MX records with specific priority values. Add them as MX records on the root domain (@) in the YWT DNS manager.
SPF record
Add a single TXT record on the root domain (@) that authorizes your email provider to send on your behalf. The format is:
v=spf1 include:mail.yourprovider.com ~allReplace mail.yourprovider.com with the SPF include domain your provider specifies.
Only one SPF record per domain. If you already have an SPF record (for example from a website verification service), merge them into a single record with multiple include: statements rather than adding a second TXT record starting with v=spf1.
DKIM record
Your provider will give you a TXT or CNAME record to add for DKIM signing. The record name usually follows the pattern selector._domainkey where selector is a string your provider chooses.
DMARC record (recommended)
Add a TXT record with the name _dmarc:
v=DMARC1; p=none; rua=mailto:dmarc-reports@yourdomain.chStart with p=none (monitoring only) and move to p=quarantine or p=reject once you are confident your setup is correct.
Verifying your setup
After adding all the records, most email providers have a verification step in their admin console that checks whether your DNS is configured correctly. Run that check and fix any issues it reports.
You can also use external tools to verify:
- MX records: Use
dig yourdomain.ch MXor an online MX lookup tool to confirm your mail servers are listed. - SPF: Use an SPF checker tool to validate your SPF record syntax.
- DKIM: Send a test email and check the headers for
dkim=pass. - DMARC: Use a DMARC record checker to verify syntax and policy.
DNS changes can take up to 48 hours to propagate globally, though they typically complete within a few minutes when using YWT nameservers. If verification fails immediately after adding records, wait 15-30 minutes and try again.
Common issues
Email going to spam. This almost always means SPF, DKIM, or DMARC records are missing or misconfigured. Verify all three are in place and passing checks.
Multiple SPF records causing failures.
You can only have one SPF TXT record per domain. If you need to authorize multiple senders, combine them: v=spf1 include:_spf.google.com include:spf.protection.outlook.com ~all.
MX records not resolving.
Make sure the MX record values end with a period (.) if your provider's documentation shows them that way. In the YWT DNS manager, trailing dots are handled automatically, so you can usually omit them.
Next steps
- Learn more about managing DNS records at YWT.
- See common DNS setups for other popular configurations.
- Review the DNS record types reference for a full list of supported record types.
Connect a Domain to YWT Hosting
End-to-end guide for connecting a YWT-registered domain to a site hosted on YWT's static hosting platform.
Use a YWT Domain with an External Host
Configure DNS records to point your YWT-registered domain to an external hosting provider like Vercel, Netlify, or GitHub Pages.