Skip to main content

Wildcard Domain Access

Providing an independent external access domain for each user's CloudBase environment is a key step for the platform to deliver accessible applications to users.

Platform Edition supports the package-level wildcard domain solution: after the platform configures a wildcard domain on the package and provides a wildcard certificate, each environment only needs to add a subdomain to serve traffic externally, without uploading certificates repeatedly. Individual environments can also bind independent domains with custom certificates.

Wildcard Domain Configuration​

Wildcard domain configuration is a one-time operation completed by the platform at the package level:

  • Configure a wildcard domain (for example, *.example.com), covering all subdomains under it
  • Provide a wildcard certificate (covering all subdomains); subdomains added later inherit it directly, with no per-environment upload

After configuring the wildcard domain, CloudBase returns the target domain. You need to go to the corresponding domain registrar console to add a CNAME record to resolve the wildcard domain to the target domain. After that, subdomains under the wildcard domain can be accessed externally.

Once configured, the platform can add subdomains for each environment on demand (for example, env1.example.com, env2.example.com). All subdomains share the wildcard certificate to serve HTTPS traffic.

Environment Subdomain Access​

When a user requests an environment, your system completes environment creation and domain access with the following flow:

There are three steps: configure the wildcard domain on the Platform Edition (one-off) → connect a subdomain for the environment (optionally inheriting the wildcard domain's access settings) → add an access route for the subdomain.

Step 1: Configure the Wildcard Domain on the Platform Edition (One-off)​

Configure the wildcard domain and its certificate at the package level, then add a CNAME record at your DNS provider for the target domain CloudBase returns. After that, any subdomain under the wildcard domain is ready to use without separate onboarding.

See Wildcard Domain Access - Configuration Steps (Platform).

Step 2: Connect a Subdomain for the Environment​

When a user requests an environment, call Create environment to get the environment ID, then call CreateHTTPServiceRoute to connect a subdomain for that environment.

The key is to set AccessType to NONE, so that the certificate, CNAME, and other access settings are inherited from the platform wildcard domain — no per-environment certificate upload and no repeated ownership verification. See the API documentation for required parameters and values.

Inheritance is optional. The wildcard certificate covers all subdomains, so most environments need no extra configuration; to bind an independent domain (not limited to the package wildcard domain) or use your own certificate for a specific environment, pass a regular access type such as DIRECT with that domain's own certificate, then follow Custom domain - Get started to complete ownership verification, certificate configuration, and CNAME resolution.

This step only connects the domain; requests are not yet pointed at any business resource.

Step 3: Add an Access Route for the Subdomain​

After the subdomain is connected, you must configure routes that decide which path forwards to which resource; otherwise requests match no upstream.

Routes can be passed together with the domain, or the domain can be connected first and routes added later through ModifyHTTPServiceRoute. For matching priority and configuration, see Route matching rules. Pick the guide for your upstream resource:

Upstream resourceGuide
Cloud functionAccess cloud functions over HTTP
Static hostingAccess static hosting over HTTP
CloudBase RunAccess CloudBase Run over HTTP
Cloud storageAccess cloud storage over HTTP

After the route is applied, call DescribeHTTPServiceRoute and check that Status and DNSStatus are both SUCCESS, then access the subdomain once to confirm.

Related APIs​

Note: For the specific configuration of the wildcard domain and certificate, refer to the CloudBase console and API documentation.

Next Steps​

After completing wildcard domain access, you can issue access credentials for each environment:

→ API Key Management