Update Microsoft 365 DNS A and CNAME Records
Question details
Find a way to update a domain’s A and CNAME records, including programmatically.

- Product
- Microsoft 365 and PowerShell
- Device & OS
- not provided
- Scenario
- A Microsoft 365 domain needs DNS record changes, potentially through PowerShell or another programmatic interface.
- Observed behavior
- PowerShell cannot modify default Microsoft 365 DNS records when Microsoft manages the domain’s name servers.
Check the domain’s name servers at your registrar to identify the current DNS hosting provider. Have the host name and destination IP address or alias ready, and confirm whether the record already exists.
Manage Microsoft-hosted DNS records in the admin center
Use the Microsoft 365 admin center when Microsoft hosts the domain’s DNS and the record can be managed there.
Sign in to the Microsoft 365 admin center, open Settings > Domains, and select your domain.
Select the DNS records or DNS management option for the domain. Menu names may vary.
Choose an available A or CNAME record, enter the required host name and IP address or alias, and select Save.

Update records at your DNS hosting provider
Use this option when the domain’s name servers point to a registrar or another DNS host.
Use the DNS provider’s programmatic tools
Use the DNS host’s API or management tools when you need to automate record updates.
Document DNS Changes in WPS Office
WPS Office is a free, lightweight alternative for working with Office files in a familiar interface. Use WPS Spreadsheets to document DNS records and migrate existing worksheets easily; DNS changes must still be made with the DNS host.

Frequently Asked Questions
Can PowerShell edit default Microsoft 365 DNS records?
No. When Microsoft manages the name servers, PowerShell cannot modify default Microsoft 365 DNS records. Check the domain’s DNS management options in the Microsoft 365 admin center.
How do I know where to change my DNS records?
Check the domain’s name servers at your registrar. Then open the DNS management dashboard of the provider hosting those name servers; the DNS host is not necessarily the registrar.
Can I update DNS records programmatically?
Possibly. Check your DNS host’s documentation for a supported DNS API, CLI, or PowerShell module. Available interfaces and record permissions depend on the provider.
What is the difference between an A record and a CNAME record?
An A record points a host name to an IPv4 address. A CNAME record makes a host name an alias for another host name.
Why can’t I edit a Microsoft 365 DNS record in the admin center?
Some default records are managed by Microsoft and cannot be edited. Open Settings > Domains, select the domain, and review the available DNS management controls and guidance.




