In this guide · 8 sections
- 01Before you start: what can break and how to avoid it
- 02Step 1: Add and verify the domain in Microsoft 365
- 03Step 2: Create users and mailboxes before switching email
- 04Step 3: Add the Microsoft 365 DNS records manually
- 05Step 4: Get SPF right if other services send email
- 06Step 5: Turn on DKIM for your domain
- 07Do it yourself or get help?
- 08Frequently asked questions
Short answer
In the Microsoft 365 admin centre, add the domain and verify it with a TXT record. Create all mailboxes before changing the MX record. Then add MX, autodiscover CNAME and SPF at your current DNS host, leaving the website's A and CNAME records untouched, and enable DKIM last.
Before you start: what can break and how to avoid it
Your domain's DNS holds separate records for separate jobs. The A or CNAME records for yourdomain.sg and www point to your website host. The MX records decide where email is delivered. Microsoft 365 only needs to change email-related records. Your website records should not be touched at all.
Problems usually come from three places: moving the domain's nameservers to a new provider without copying every existing record, deleting 'old' records the wizard did not mention, or switching MX before mailboxes exist. Our guide to connecting a domain to a website without breaking email covers the same risk from the other direction.
Before you add the domain
Step 1: Add and verify the domain in Microsoft 365
Microsoft's add a domain guide offers two routes: Domain Connect, where Microsoft adds records at a supported registrar for you, and Manual. Choose Manual unless you are certain the automated changes will not overwrite anything. Microsoft itself warns that incorrect DNS records can cause email and service outages.
Open Settings, Domains, Add domain
In the Microsoft 365 admin centre, go to Settings, then Domains, then + Add domain, and enter yourdomain.sg.
Choose to verify with a TXT record
Microsoft shows a TXT value that starts with MS=. Avoid the MX verification option unless TXT is impossible.
Add the TXT record at your DNS host
Create a TXT record on the root of the domain (@) with Microsoft's value. It does not affect your website or email.
Select Verify
Microsoft says verification usually takes up to 10 minutes, and up to 48 hours with some registrars.
Choose to add your own DNS records
When asked how to connect the domain, pick the option to add DNS records yourself rather than letting Microsoft manage DNS.
Step 2: Create users and mailboxes before switching email
This is the step that prevents lost email. Microsoft's guidance is to add users and set up mailboxes for everyone who receives email on the domain after adding the domain but before changing the MX record.
Change each user's primary address to the new domain, add aliases such as info@ and accounts@, and set up shared mailboxes for team addresses. If you are moving from another provider, start copying old email now; our guide to migrating between Google Workspace and Microsoft 365 covers the migration itself.
Step 3: Add the Microsoft 365 DNS records manually
The admin centre's Add DNS records page shows the exact values for your tenant. Copy them from there rather than from any guide, because the MX value is specific to your domain.
| Record | Name | Purpose | Notes |
|---|---|---|---|
| MX | @ | Delivers email to Microsoft 365 | Copy the value shown for your domain. Remove or lower the priority of the old provider's MX when you switch. |
| CNAME | autodiscover | Lets Outlook set itself up | Optional but recommended by Microsoft. |
| TXT (SPF) | @ | Lists who may send for your domain | Must include include:spf.protection.outlook.com. Only one SPF record per domain. |
| TXT | @ | Domain verification | Can stay; it does no harm. |
| A / CNAME for @ and www | @, www | Your website | Leave exactly as they are. |
Microsoft's record guide for any DNS host notes that Exchange Online supports TTL values under 6 hours. A short TTL such as 3600 seconds lets you roll back quickly. For background on each record type, see our DNS records explainer.
Step 4: Get SPF right if other services send email
Your website's contact form, your invoicing software or a newsletter tool may already send email as your domain. They usually have their own include in an existing SPF record. Microsoft's SPF set-up guide is clear that only one SPF record is allowed per domain, so you must merge rather than add a second one.
- Only Microsoft 365 sends: v=spf1 include:spf.protection.outlook.com -all
- Microsoft 365 plus another service: v=spf1 include:spf.protection.outlook.com include:otherservice.example -all (use the include the other service documents).
- Keep under 10 DNS lookups: each include counts, and SPF fails if the total is too high.
Use -all (fail) or ~all (soft fail) as you prefer, but start with ~all if you are unsure every sender is listed, then tighten it once DMARC reports show nothing legitimate failing.
Step 5: Turn on DKIM for your domain
DKIM signs outgoing email so receivers can confirm it really came from your tenant. Microsoft 365 does not sign with your custom domain until you set it up. Microsoft's DKIM configuration guide explains the two CNAME records.
Open the DKIM page in the Defender portal
Go to Email & collaboration, Policies & rules, Threat policies, Email authentication settings, DKIM, and select your domain.
Copy the two CNAME values Microsoft shows
The host names are always selector1._domainkey and selector2._domainkey. The targets are specific to your tenant.
Create both CNAMEs at your DNS host
Copy the targets exactly. Some DNS hosts add your domain to the end of the host name automatically, so enter only selector1._domainkey if so.
Enable signing
Back in the Defender portal, switch on 'Sign messages for this domain with DKIM signatures'. If it reports the records are missing, wait for DNS to update and try again.
Finish with a DMARC record, starting at p=none to collect reports. Our guide to SPF, DKIM and DMARC explains how to move to quarantine and reject safely.
Do it yourself or get help?
If you are comfortable in your DNS host's control panel and have a list of every address, a small team can do this in an afternoon. After switching MX, send test emails to and from Gmail and Outlook.com, check the website still loads, and confirm DKIM shows as signing.
Our Business Email Setup (S$249) adds your domain to Microsoft 365, creates mailboxes and sets SPF, DKIM and DMARC without touching your website records. If your DNS is messy or spread across providers, Domain & DNS Setup (S$99) tidies it first. Setting up Google Workspace instead? See our guide to adding a domain to Google Workspace.
Frequently asked questions
Not if you add records manually and leave your website's A and CNAME records untouched. Microsoft 365 only needs a verification TXT, MX, autodiscover and SPF records, plus DKIM CNAMEs. Websites usually go offline when nameservers are moved without copying records, or when existing records are deleted.
Microsoft says it can take up to 10 minutes after you add the TXT record, and up to 48 hours with some registrars. If it fails, check that the record is on the root of the domain and that the value matches exactly, then try Verify again later.
For most small businesses, no. Keeping DNS with your current registrar or DNS host and adding Microsoft's records manually keeps your website, other services and future changes in one place you control. Moving DNS hosting means recreating every existing record correctly.
No. Microsoft's guidance says only one SPF record is allowed per domain. Combine them into a single TXT record with both include statements, and keep the total under 10 DNS lookups so SPF checks do not fail.
It signs mail for the initial onmicrosoft.com domain automatically, but not for your custom domain. You need to publish the two selector CNAME records Microsoft gives you, then enable DKIM signing for the domain in the Microsoft Defender portal.