Moving DNS from Cloudflare to AWS: Microsoft 365 Authentication Guide
Question details
The user needs to know whether transferring their domain's DNS hosting from Cloudflare to AWS will require users to reauthenticate in Microsoft 365 or affect Outlook integrations.

- Product
- Microsoft 365
- Device & OS
- not provided
- Scenario
- Migrating a domain's DNS provider from Cloudflare to AWS Route 53 while using Microsoft 365 services.
- Observed behavior
- Seeking confirmation on whether Microsoft 365 services require configuration updates or reauthentication after completing the DNS transfer.
Before changing your nameservers, ensure you have completely exported your current DNS zone file from Cloudflare, taking special note of all Microsoft 365-related MX, TXT, and CNAME records.
Replicate DNS Records in AWS Route 53
As long as the essential Microsoft 365 DNS records are accurately copied to AWS, reauthentication is not required.
Microsoft 365 relies on specific DNS records to route email and authenticate services. If these records remain identical in your new AWS environment, the migration will be seamless to end users, and no reauthentication will be prompted.
Log into your Cloudflare account, navigate to your domain's DNS settings, and note down or export all existing MX, TXT (especially SPF records), and CNAME records associated with Microsoft 365.
Open the AWS Management Console, navigate to Route 53, and create a Hosted Zone for your domain. Manually recreate the Microsoft 365 MX, TXT, and CNAME records exactly as they appeared in Cloudflare.
Go to your domain registrar's portal and change your domain's nameservers from Cloudflare to the new AWS Route 53 nameservers.
Log into the Microsoft 365 Admin Center, go to Settings > Domains, select your domain, and click 'Check health' to confirm the new DNS records are routing correctly.

Switch to Microsoft 365 Managed DNS
If you prefer not to manage DNS settings manually in AWS, you can transfer DNS management directly to Microsoft 365.
Maintain Productivity During IT Migrations with WPS Office
While handling complex IT tasks like DNS migrations and domain management, ensure your team's day-to-day productivity is uninterrupted. WPS Office offers a free, lightweight, and highly compatible alternative to Microsoft Office, supporting all major document formats with a familiar user interface.
- 1. Download the installer: Visit the official WPS Office website and download the free installer for your operating system.
- 2. Install WPS Office: Run the setup file and follow the quick on-screen instructions to complete the installation.
- 3. Open existing Office files: Launch WPS Office and directly open your existing Microsoft Office documents without worrying about formatting issues.

Frequently Asked Questions
Will my Outlook emails stop working during the DNS migration to AWS?
Emails will continue to work without interruption as long as you have accurately replicated your MX and TXT (SPF) records from Cloudflare to AWS Route 53 before switching the domain's nameservers.
Do my users need to sign back into Microsoft 365 after changing the DNS host?
No, changing DNS providers does not affect active session tokens or user authentication status, provided the domain remains verified and active in the Microsoft 365 admin center.
What should I do if Microsoft 365 shows a domain error after moving to AWS?
Log into the Microsoft 365 Admin Center, go to Settings > Domains, and run the DNS health check. It will highlight specifically which CNAME, TXT, or MX records are missing or incorrect in your AWS Route 53 Hosted Zone so you can fix them.
How can I contact Microsoft support if my DNS setup fails?
You can request technical support directly in the Microsoft 365 admin center by navigating to Help & support > Contact Support and describing your DNS setup issue.




