- Vendor-Supplied: Tensor9 automatically assigns subdomains of the app’s root vanity domain to customers (e.g.,
customer-a.ai-chat.playground.tensor9.app). - Customer-Supplied: Your customer brings their own domain (e.g.,
app.internal.customer.com) and delegates it to the appliance.
Enable Vanity Domains for Your Customers
To enable vanity domains, create your app with the-vanityDomain flag:
1
Specify a vanity domain during app creation
Specify the root domain:This triggers the Tensor9 Vendor Controller to create a hosted zone for this domain in your Tensor9 account.
2
One-time manual delegation
You must perform a one-time manual delegation from your DNS provider to the nameservers of the hosted zone created by Tensor9. This allows Tensor9 to manage subdomains on your behalf.
Vanity Domain Assignment
Once the app is created with a vanity domain, your customers can choose to use either the vendor-supplied or customer-supplied vanity domain option during appliance setup.Vendor-Supplied Domains
In this model, Tensor9 automatically manages the assignment and delegation of a subdomain of your app’s root vanity domain to an appliance. When a customer installs your app, Tensor9 automatically:1
Assigns a unique subdomain
Tensor9 assigns a unique subdomain to the appliance (e.g.,
customer-a.ai-chat.playground.tensor9.app).2
Creates a hosted zone
The appliance setup process automatically creates a hosted zone for this subdomain within the customer’s cloud account.
3
Delegates the subdomain
Tensor9 automatically delegates the subdomain from your root hosted zone to the appliance hosted zone.
Customer-Supplied Domains
In this model, your customer brings their own domain name.1
Customer provides domain
During appliance installation, the customer specifies their desired domain (e.g.,
portal.corp.com).2
Zone Creation
The appliance setup process automatically creates a hosted zone for this domain within the customer’s cloud account.
3
Customer Delegation
The customer manually adds an NS record to their DNS provider to delegate the domain to their appliance hosted zone.
Origin Stack
To support both workflows, your Terraform code should be written to consume a hosted zone rather than create one.1. Receive the Domain Name
Use the@vanity_domain_root() annotation on a variable. Tensor9 will inject the appliance’s assigned fully qualified domain name (FQDN) at deploy time.
2. Look Up the Hosted Zone
Reference the hosted zone using a Terraform data source instead of a resource. The zone will already exist (created by the appliance setup) by the time your stack is deployed.3. SSL Certificates
Since the domain is properly delegated to the appliance’s account, you can use automatic DNS validation for SSL certificates.Optional Annotations
@vanity_domain_provided()
Best Practice: We recommend defining your hosted zone in a separate infrastructure stack or allowing Tensor9 to manage it during appliance setup. This keeps your application origin stack focused on application resources. However, if you need to keep the hosted zone definition inside your origin stack (e.g., for self-contained single-file stacks or legacy architectures), you can use@vanity_domain_provided() to handle this conditionally.
Annotate a boolean variable with @vanity_domain_provided(). Set it to true to allow the hosted zone to be created when you deploy the stack.
During compiling of your deployment stack, Tensor9 will set the variable to false to skip hosted zone creation (since it was created during appliance setup) and allow the deployment stack to look up the zone.
Best Practices
Please note the following best practices when defining a root vanity domain for your customers:Purchase a separate root domain
Purchase a separate root domain
If your app is present at
saas.com pick an alternative like
saas-customers.com or saas.app. This ensures that the cookie space for your
hosted offering is entirely separate from your customer’s installs. Your
customers will have control over the appliance vanity domain hosted zone since
they are created inside their environment.Keep the root domain as brief as possible
Keep the root domain as brief as possible
The maximum length of the Common Name in a certificate is 64 characters. Vanity
domains assigned to customers will include the appliance ID as well as any
endpoints you have defined in your origin stack. The total length of the
subdomain for which a certificate is requested cannot exceed the limit.