YourWebTech documentation

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:

PriorityValue
1ASPMX.L.GOOGLE.COM
5ALT1.ASPMX.L.GOOGLE.COM
5ALT2.ASPMX.L.GOOGLE.COM
10ALT3.ASPMX.L.GOOGLE.COM
10ALT4.ASPMX.L.GOOGLE.COM

SPF record

Add a TXT record on the root domain (@):

v=spf1 include:_spf.google.com ~all

DKIM record

Google Workspace generates a unique DKIM key for your domain. To find it:

  1. Go to the Google Admin console.
  2. Navigate to Apps > Google Workspace > Gmail > Authenticate email.
  3. Select your domain and click Generate new record.
  4. 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...

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.ch

You 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 (@):

PriorityValue
0yourdomain-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 ~all

DKIM records

Microsoft 365 uses two CNAME records for DKIM:

NameValue
selector1._domainkeyselector1-yourdomain-ch._domainkey.yourtenant.onmicrosoft.com
selector2._domainkeyselector2-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:

NameValue
autodiscoverautodiscover.outlook.com

Add a TXT record with the name _dmarc:

v=DMARC1; p=none; rua=mailto:dmarc-reports@yourdomain.ch

ProtonMail 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 (@):

PriorityValue
10mail.protonmail.ch
20mailsec.protonmail.ch

SPF record

Add a TXT record on the root domain (@):

v=spf1 include:_spf.protonmail.ch ~all

DKIM records

ProtonMail generates three CNAME records for DKIM. You will find the exact values in your ProtonMail custom domain settings. They follow this pattern:

NameTypeValue
protonmail._domainkeyCNAMEprotonmail.domainkey.abc123.domains.proton.ch
protonmail2._domainkeyCNAMEprotonmail2.domainkey.abc123.domains.proton.ch
protonmail3._domainkeyCNAMEprotonmail3.domainkey.abc123.domains.proton.ch

Add a TXT record with the name _dmarc:

v=DMARC1; p=none; rua=mailto:dmarc-reports@yourdomain.ch

The 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 ~all

Replace 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.

Add a TXT record with the name _dmarc:

v=DMARC1; p=none; rua=mailto:dmarc-reports@yourdomain.ch

Start 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 MX or 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

On this page