Hi @Benjamin Abt ,
Thanks for the question and using MS Q&A platform.
To implement custom domains for a multi-tenant SaaS platform on Azure, you can consider using Azure Front Door. Azure Front Door allows you to manage custom domains and supports various domain types, including subdomains, apex domains, and wildcard domains.
- You can add custom domains to your Azure Front Door profile. Each domain requires a DNS TXT record for validation and a CNAME record to route traffic to Azure Front Door. This setup allows you to manage traffic effectively while providing your customers with their own domains.
- If you anticipate a large number of customers, using wildcard domains (e.g.,
*.yourdomain.com
) can simplify the configuration. This way, you can route traffic for any subdomain without needing to configure each one individually. - Azure Front Door can manage TLS certificates for your custom domains, which can streamline the onboarding process for new customers. You can either use Azure Front Door to issue and manage certificates or allow tenants to provide their own certificates.
- While Azure App Service has a limit on the number of custom domains, Azure Front Door can help mitigate some of these limitations by allowing a single instance to route traffic to multiple domains.
- You can add a domain name to your Azure Front Door profile before making DNS changes, which can help avoid downtime during migration or onboarding.
While Azure does not provide a service that accepts all CNAME requests without validation, using Azure Front Door with wildcard domains and proper DNS configuration can help you achieve a scalable solution for your multi-tenant SaaS platform.
ref:
Use Azure Front Door in a multitenant solution
Wildcard domains in Azure Front Door (front-door-standard-premium)
Let me know if you have any assistances.
If the answer is helpful, please click Accept Answer and kindly upvote it so that other people who faces similar issue may get benefitted from it.