Multiple Custom Domains (MCD) support in a single tenant is currently available in Early Access (EA). This capability is available only for Enterprise customers. If you are interested in using this feature, please reach out to your Sales exec/Technical Account Manager or open a support ticket through the Auth0 Support Center.To learn more about Auth0’s product release cycle, review Product Release Stages.
Prerequisites
Before getting started with MCD, review the requirements below:- Your tenant is on an Enterprise plan (Public Cloud or Private Cloud deployments). For more information, see Manage Subscriptions.
- Your Enterprise plan will provide a base entitlement of up to 20 custom domains per tenant in the MCD General Availability (GA) release.
- EA allows up to 1,000 custom domains per tenant for experimentation and validation. Once MCD GA launches, the base entitlement of up to 20 custom domains will apply. Any domains beyond the base entitlement will require an additional add-on SKU.
- You must be able to prove ownership of the configured custom domains.
Configure Multiple Custom Domains
Auth0 will enable the MCD feature on tenants requested by EA participants. You can then add MCD to a tenant with the or in the .To create a custom domain in the Auth0 Dashboard:
- Navigate to Auth0 Dashboard > Branding > Custom Domains.
- Select +Add custom domain.
-
In the configuration form, provide the following information:
- Domain: A fully-qualified domain name that you own. For example:
my.custom-domain.com
. - Certificate type: Choose Auth0-managed certificates or Self-managed certificates.
- Metadata (Key/Value): Add optional metadata like
region
,client_name
, orclient_id
, to help organize and filter your domains.
- Domain: A fully-qualified domain name that you own. For example:
- Once you have configured the custom domain details, select Save.
pending
until verification is complete.MCD features
MCD offers many key features and functionalities to more effectively manage your Auth0 implementation and improve user experience. You are responsible for owning and registering your desired custom domains with a domain name registrar. The Auth0 Management API provides comprehensive support for Create, Read, Update, Delete, and Verify operations for these custom domains, offering full programmatic control over their lifecycle. MCD EA supports the following Auth0 SDKs: Node.js and Go.Domain verification
The method for verifying domain name ownership depends on your chosen management type:Domain Type | Verification Method | Details |
---|---|---|
Auth0-Managed | CNAME DNS record | Configure this record to confirm domain ownership and activate your domain. |
Self-Managed | TXT DNS record | Specific TXT record details are provided in the Create API response. |
Metadata for enhanced management
You can provision up to 10 metadata fields per custom domain for easier organization and future customization. In upcoming releases, these metadata fields will enable advanced customization of email templates, , and authentication logic.Customize email templates
Leverage your custom domain information to personalize and brand your email templates, ensuring a consistent user experience. To facilitate this, MCD provides thecustom_domain.domain
variable for use in Liquid Syntax.
For example, you could set the From Address of your email template to support@{{ custom_domain.domain }}
, which would render as support@my.custom-domain.com
. This variable is available through Liquid Syntax in the From Address, Subject, and Message fields. To learn more, read Customize Email Templates.
Customize email handling using the Management API
If you configured Multiple Custom Domains and enabled Use Custom Domains in Emails, theauth0-custom-domain
HTTP header is available when using the Auth0 Management API. The header is passed as the value for the domain object
in email templates.
The
auth0-custom-domain
HTTP header is required if MCD is configured with at least 1 domain in ready
state.
If you are moving from a single custom domain to MCD, you must update your existing Management API email requests to include the auth0-custom-domain
HTTP header .auth0-custom-domain
HTTP header:
- Send an email address verification email
- Create an email verification ticket
- Create invitations to an organization
- Create a user
- Create a multi-factor authentication enrollment ticket
- Create a password change ticket
Response messages
When you provide theauth0-custom-domain
HTTP header, the following additional response types are possible:
HTTP status code | Message |
---|---|
409 | The tenant has multiple verified custom domains. |
400 | The custom domain does not exist for the tenant. |
400 | The auth0-custom-domain HTTP header has an invalid format. |
If you enable MCD and use the Auth0 Dashboard to configure Email templates, the Try feature will not allow you to test with a custom domain.
Multiple Custom Domains with Actions
Auth0 Actions allows you to create custom logic handling of your different transactions based on the custom domain. For example, you could create an Action that directs a user to an associated Organization, or enforce a specific access control policy. To facilitate this, post-login Actions features the objectevent.request.hostname
, which provides the hostname being used for the authentication flow.
Use case: Restrict user access to an Organization based on custom domain
Store a domain allowlist and denylist (for example,allow_domains
and deny_domains
) in your Organization’s metadata.
Create an Action that:
- Gets the user’s domain through the
event.request.hostname
property - Compares that domain with both lists
- Allows or denies the user access accordingly
MCD GA will introduce a new custom domain Action object, which will include custom domain metadata. Your Action code will need to be updated at GA if you use the new object.
Custom domain attributes
The MCD EA release introduces the following attributes related to custom domain verification and SSL/TLS certificate management. These additions provide granular insights into the provisioning and operational status of custom domains. Please be aware that the attributes and their descriptions outlined in this document are subject to change in future releases.Updated attributes
Attribute | Description |
---|---|
status | A new enumeration value, failed , has been added to the status attribute. This value indicates that the custom domain verification process has encountered an error and was unsuccessful. This is in addition to the existing supported values pending and ready . |
New attributes
The following attributes are supported for Auth0-managed domains only:Attribute | Description |
---|---|
verification.status | Status of the DNS record verification process. Possible values are: verified , pending , and failed . |
verification.error_msg | In the event that verification.status indicates a failure, this string attribute will contain a human-readable error message providing context for the verification failure. |
verification.last_verified_at | This timestamp attribute records the date and time of the last successful verification of the custom domain. The format of this timestamp will adhere to ISO 8601. |
certificate | This object encapsulates information related to the SSL/TLS certificate associated with the custom domain. |
certificate.status | This attribute indicates the current provisioning status of the SSL/TLS certificate. Possible values will include states such as provisioning , provisioned , provisioning_failed , and renewing_failed . |
certificate.error_msg | If the certificate.status is provisioning_failed or renewing_failed , this string attribute will provide a user-friendly error message detailing the reason for the failure. |
certificate.certificate_authority | This string attribute specifies the Certificate Authority that issued the SSL/TLS certificate for the custom domain. |
certificate.renews_before | For Auth0-managed custom domains, this new timestamp attribute indicates the date and time before which the SSL/TLS certificate must be renewed. The format of this timestamp will adhere to ISO 8601. |