Others

Fix a Website After Changing Name Servers for Microsoft 365

Adam DavisAdam Davis Nov 27, 2026 868 views

Question details

Restore access to a hosted website after changing the domain's name servers while keeping email on Microsoft 365.

Fix a Website After Changing Name Servers for Microsoft 365
Product
Microsoft 365 and domain DNS
Device & OS
not provided
Scenario
A domain uses Microsoft 365 for email and a separate provider to host its website.
Observed behavior
The website stopped working after the name server change because its hosting DNS records may be missing from the active DNS zone.
Before you start

Check your domain registrar or DNS lookup tool to identify the current authoritative name servers and the provider where you must edit DNS records. Ask your website host for the correct A record IP address and any required www CNAME target.

Solution 1Recommended

Restore Website DNS Records and Keep Microsoft 365 Email

Add the website records at the active DNS provider without replacing the Microsoft 365 MX record.

1
Find the active DNS zone

Sign in to the provider identified by your domain's current name servers and open the domain's DNS management page. Changes at a different provider will not affect the active zone.

2
Check the Microsoft 365 MX value

In the Microsoft 365 admin center, go to Settings > Domains, select your domain, and review its DNS records or DNS setup information. Note the MX destination shown for your domain.

3
Add the website A record

In the active DNS management page, add or update the A record for the root domain, commonly shown as @, using the static IP address supplied by your website host.

4
Configure www

If your host requires a CNAME for www, add or update the www CNAME with the target hostname it provides. Check for an existing conflicting www record before saving.

5
Preserve email records and test

Keep the Microsoft 365 MX record and other required email records in the active DNS zone. After saving, allow time for DNS propagation, then visit the root domain and www address and send a test email.

Restore Website DNS Records and Keep Microsoft 365 Email
Web and email records have different jobs: The A and CNAME records direct website traffic; the MX record directs incoming email. Changing an MX record alone will not restore the website.
Free Microsoft Office alternative

Use WPS Office as an Alternative for Everyday Office Work

WPS Office is a free, lightweight alternative with a familiar interface and Microsoft Office format compatibility for an easier transition. It does not manage DNS or fix Microsoft 365 email or website routing.

Create documents to track DNS settings and hosting detailsOpen and edit Microsoft Word, Excel, and PowerPoint formatsWork in a familiar, easy-to-use office interfaceUse a lightweight office suite for everyday tasks
QA img-9

Frequently Asked Questions

Where can I find my Microsoft 365 MX record?

In the Microsoft 365 admin center, go to Settings > Domains, select your domain, and review the DNS records or DNS setup information. Use the MX destination shown for your specific domain.

Can my website and Microsoft 365 email use different providers?

Yes. At the active DNS provider, point the website's A and, if needed, www CNAME records to the hosting provider while keeping the Microsoft 365 MX and other required email records.

Why did the website stop working after I changed name servers?

Changing name servers changes the authoritative DNS zone. If the website's hosting records were not recreated in that zone, visitors may no longer be directed to the hosting server.

How long will it take for the website to work again?

DNS changes can take time to propagate, depending on cached records and their TTL values. After saving the records, test both the root domain and the www address again later.