Configure a Wildcard DNS Record for an Office 365 Domain
Question details
The user wants to configure a wildcard DNS record for subdomains of an Office 365 domain.

- Product
- Microsoft Office 365 domain DNS
- Device & OS
- not provided
- Scenario
- The user wants wildcard subdomains to route to a website while using a domain associated with Office 365.
- Observed behavior
- The Office 365 portal does not support creating wildcard hostnames for general website routing.
Identify the provider that hosts your domain's authoritative DNS and obtain the IP address or hostname required by your website host. Check whether the DNS provider and website host support wildcard subdomains.
Create a Wildcard Record with Your DNS Provider
Use your authoritative DNS provider to route eligible subdomains to a supported website host.
Sign in to the domain registrar or DNS hosting provider that manages your authoritative nameservers, and open the domain's DNS management page.
Select Add record and enter * in the host or name field if your provider uses that format. Choose an A record for the IP address or a CNAME for the hostname supplied by your website host.
Save the record, allow time for DNS changes to propagate, and use a DNS lookup tool to check an example subdomain. Test the address in a browser after your website host and TLS certificate are configured for it.

Check Microsoft Support for a SharePoint Online Domain
Use this approach if the intended website is hosted on SharePoint Online, where wildcard subdomains may not be supported.
Use WPS Office as an Alternative to Microsoft Office
WPS Office is a free, lightweight, easy-to-use Office alternative with a familiar interface and compatibility with common Microsoft Office formats for an easier transition. Wildcard DNS records must still be managed through your DNS provider.

Frequently Asked Questions
Where do I add a wildcard DNS record for an Office 365 domain?
Add it in the DNS management page of the provider hosting your domain's authoritative DNS. If you are unsure which provider that is, check the domain's nameservers or contact your registrar.
Should I use an A record or a CNAME for a wildcard subdomain?
Use an A record if your website host supplies an IP address, or a CNAME if it supplies a destination hostname. Confirm that your DNS provider and website host support the chosen configuration.
Will a wildcard record route every subdomain to my website?
Not necessarily. Existing DNS names can affect wildcard matching, and the website host must also accept requests for the subdomains. HTTPS requires a certificate valid for the requested names.
Can I use a wildcard record with a SharePoint Online site?
Wildcard subdomains may not be supported for your SharePoint configuration. Check Microsoft's current custom-domain documentation or contact Microsoft support before creating the DNS record.




