Send & Receive Issues

Fix Microsoft 365 Custom Domain Email After DNS Changes

Huma Ashraf ChHuma Ashraf Ch Nov 14, 2026 868 views

Question details

Restore custom domain email delivery after changing name servers or DNS records during a website hosting move.

Fix Microsoft 365 Custom Domain Email After DNS Changes
Product
Microsoft 365 and Exchange Online
Device & OS
not provided
Scenario
A custom domain is used for both a website and Microsoft 365 email, and the website hosting or DNS configuration has changed.
Observed behavior
Email delivery may stop after DNS changes, and a website or application may report SMTP relay errors if it still uses outdated mail settings.
Before you start

Identify the domain's current authoritative DNS provider and confirm that you can edit its records. Have access to the Microsoft 365 admin center, the website or application mail settings, and any bounce messages.

Solution 1Recommended

Restore the Microsoft 365 DNS records without disrupting the website

Use this solution when email stopped after changing name servers or moving website hosting.

1
Find the required records

In the Microsoft 365 admin center, go to Settings > Domains, select the affected domain, and review its DNS records and status.

2
Check the active DNS zone

Sign in to the provider hosting the domain's current name servers and open its DNS management page. Compare the MX record, SPF TXT record, autodiscover record, and any other records required by Microsoft 365 with the values shown in the admin center.

3
Correct email and website records

Add or update the required records in the active DNS zone. Keep the website's A or CNAME records pointing to the web host; the MX record controls email routing, not website traffic. If other services send mail for the domain, include their authorized senders in the existing SPF record rather than creating a second SPF record.

4
Verify and test

Return to Settings > Domains in the Microsoft 365 admin center and run the DNS check. After the changes propagate, send a test message to the custom domain from an external account and open the domain in a browser to check the website.

Restore the Microsoft 365 DNS records without disrupting the website
Allow time for DNS changes: DNS updates may take time to propagate. Records added at a previous DNS provider will not be used if that provider no longer hosts the authoritative name servers.
Free Microsoft Office alternative

Work with Office documents in WPS Office

WPS Office is a free, lightweight alternative for everyday document work, with a familiar interface and compatibility that makes moving existing Office files straightforward. It does not repair Microsoft 365 DNS or SMTP settings.

Open and edit Microsoft Word, Excel, and PowerPoint formats, including DOCX, XLSX, and PPTXUse familiar document, spreadsheet, and presentation toolsKeep working with Office files while troubleshooting a Microsoft 365 email configurationGet started with a free, lightweight office suite
QA img-9

Frequently Asked Questions

Can my domain point to my website and use Microsoft 365 for email?

Yes. In your authoritative DNS zone, use the web host's A or CNAME records for the website and the Microsoft 365 MX record for incoming email. Add the other Microsoft 365 records required for your domain as well.

Where can I find the correct Microsoft 365 DNS records?

In the Microsoft 365 admin center, go to Settings > Domains and select your domain. Review the DNS records and status shown there, then compare them with the records at your current DNS provider.

Why does my website still get SMTP relay errors after I fix the MX record?

The MX record routes incoming mail; it does not configure how a website sends mail. Check the website's SMTP server, port, sender, and authentication settings for references to the previous provider.

How can I tell whether Microsoft 365 received a failed message?

In the Exchange admin center, go to Mail flow > Message trace and search by sender, recipient, and time. If no matching message appears, investigate the sending application or service as well as the bounce message.