Fix a Website After Changing Name Servers for Microsoft 365
Question details
Restore access to a hosted website after changing the domain's name servers while keeping email on 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.
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.
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.
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.
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.
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.
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.
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.

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.

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.




