Skip to main content

Custom Domain

CloudBase HTTP access service provides automatically generated domains by default. You can also bind custom domains to the CloudBase HTTP access service.

Important Note

Default domain is recommended for testing environments only. For production environments, it's recommended to bind custom domains to ensure business security and stability.

Prerequisites

Before starting to configure custom domains, please ensure the following preparations are complete:

  1. Domain Filing: Prepare custom domain and complete ICP filing. For details, refer to ICP Filing Page. For cloud resources required for filing, refer to Filing Cloud Resources. You can also complete filing directly with your CloudBase environment in CloudBase Console - Filing Management
  2. SSL Certificate: Prepare SSL certificate, which can be uploaded or applied for in SSL Certificate Console

Add Custom Domain

info

When a domain connects to the CloudBase gateway for the first time, domain ownership verification is required.

  1. Go to CloudBase Console/HTTP Access Service
  2. Click "Add Domain"
  3. Fill in custom domain and configure SSL certificate
  4. Select access method

Add Custom Domain Entry

Tip

In addition to managing domains centrally in the HTTP access service, you can also add a custom domain directly from the detail page of a specific cloud function / cloud run / static hosting application. The two entry points are equivalent — all added domains are listed and managed in the HTTP access service.

Access Method

Custom domains support the following two access methods:

  • CloudBase Access: Domain access is managed centrally by the CloudBase platform, and you can choose to enable or disable edge acceleration
  • Custom Access: Access using your own CDN or WAF service
Note

This CDN is used for HTTP associated resource calls. If you want to add CDN for cloud storage, please refer to Cloud Storage Custom CDN

CloudBase Access

CloudBase Access supports two modes: "Enable Edge Acceleration" and "Disable Edge Acceleration".

Enable Edge Acceleration

When edge acceleration is enabled, CloudBase routes user requests to the nearest EdgeOne edge nodes, where requests are processed close to the user. This effectively reduces access latency, improves access speed, and provides edge-layer security protection.

Next Steps

  1. Complete EdgeOne domain ownership verification: When edge acceleration is enabled for the first time, EdgeOne domain ownership verification is required. Add the corresponding DNS TXT record as guided.
  2. Configure CNAME resolution: After the domain access status returns to normal, go to the DNS Console to configure CNAME resolution. The CNAME value will be provided on the page.
Note

Because Edge Acceleration is powered by EdgeOne, it takes some time for EdgeOne to distribute configuration during actual access. After EdgeOne ownership verification, the processing status takes about 10-20 minutes. Please wait patiently.

Disable Edge Acceleration

When edge acceleration is disabled, requests go directly through the CloudBase gateway.

Step 1: Add Custom Domain in CloudBase Console

Add custom domain in CloudBase Console/HTTP Access Service and select CloudBase Access (disable edge acceleration)

Step 2: Wait for Domain Association to Complete

After adding custom domain in CloudBase console, you need to wait for domain association to complete. It usually takes 3-5 minutes. After successful domain association, copy the CNAME value.

Step 3: Go to DNS Console and Add CNAME Resolution

Using the CNAME value copied in step 2, go to your domain DNS service provider to add CNAME record. Request will be routed to CDN only after adding CNAME record and the domain will take effect. Go to DNS Console to add domain resolution record.

Step 4: Complete CloudBase Access

Return to CloudBase console and check custom domain access status

Note

If custom domain access status is not updated, you can refresh the page and check again.

Migrate Existing CloudBase CDN to Enable Edge Acceleration

The previous "CloudBase CDN" access method is no longer supported. If your domain was previously configured with the CloudBase CDN access method, it is recommended to migrate to CloudBase Access (enable Edge Acceleration) to leverage EdgeOne capabilities for a better access experience.

Migration Steps
  1. On the Domain Management page, find the original domain, click "Edit", change the access method to CloudBase Access, and enable Edge Acceleration, then save.
  2. The first time Edge Acceleration is enabled, EdgeOne domain ownership verification is required. During the process, add the corresponding DNS TXT record as guided.
  3. After the access method is changed and the status returns to normal, go to the DNS resolution console and point the domain CNAME to the newly created CNAME value.

Custom Access

CDN Access

Step 1: Add Custom Domain in CloudBase Console

Add custom domain in CloudBase Console/HTTP Access Service, select Custom CDN, and copy the origin domain

Step 2: Add CDN Domain

Go to CDN Console and click "Add Domain".

Step 3: CDN Domain Configuration

1. Configure Origin Domain: Add domain configuration, paste the origin domain copied in step 1 into the origin domain address.

Note

Please independently select acceleration region and acceleration type based on business type.

2. Fill in Recommended Configuration: Improve acceleration performance.

Note

If no additional configuration is needed, this step can be skipped.

3. Add CNAME Resolution: Copy the CNAME value in CDN console, go to DNS console to add CNAME type resolution.

Note

DNS resolution needs to be added in the corresponding domain service provider console as CNAME resolution record.

4. Complete Configuration: Complete custom CDN configuration

Step 4: Verify CDN Domain Access

After adding CNAME record, it usually takes 5-30 minutes for DNS resolution to take effect. Return to CloudBase console to check custom CDN access status. You can check whether domain resolution has taken effect using the following command:

nslookup Your Custom Domain

If the result shows the CNAME domain provided by CloudBase, then the resolution has taken effect.

WAF Access

The WAF (Web Application Firewall) access flow is similar to custom CDN access. The key difference is: after configuring the origin server in the WAF console, you need to fill the WAF-assigned CNAME back to the CloudBase console, and then add a CNAME record at your DNS service provider.

Step 1: Add Custom Domain in CloudBase Console

Add custom domain in HTTP access service, select Custom CDN, and copy the origin domain.

Step 2: Add WAF Domain

Go to the Web Application Firewall console and click "Add Domain" in the "Access Management" section.

Step 3: Configure WAF Origin Server

Click "Edit" in the newly added domain row, set the "Origin Address" type to "Domain", and paste the CloudBase origin domain copied in Step 1 into the origin address field.

Note

Origin domain example: xxxxxx-1234567890.ap-shanghai.service.tcloudbase.com, please refer to the value shown in the console.

Step 4: Get WAF CNAME and Fill Back to CloudBase

  1. In the WAF domain list, copy the CNAME value from the "CNAME" column.
  1. Return to HTTP access service, paste the WAF-assigned CNAME value into the "CNAME" field of the corresponding domain and save.

Step 5: Add CNAME Resolution in DNS Console

Point your domain's CNAME to the WAF-assigned CNAME value. Go to DNS Console to add a CNAME record.

Note

DNS resolution needs to be added in your domain's actual DNS service provider console as a CNAME record. For Tencent Cloud DNS, refer to the "Tencent Cloud DNS Setup Method" section at the end of this document.

Step 6: Verify WAF Domain Access

After adding the CNAME record, it usually takes 5-30 minutes for DNS resolution to take effect. Return to the CloudBase console to check the WAF domain access status. You can check whether domain resolution has taken effect using the following command:

nslookup Your Custom Domain

If the result shows the WAF-assigned CNAME domain, then the resolution has taken effect.

Domain Ownership Verification

When a domain connects to the CloudBase gateway for the first time, domain ownership verification is required to confirm that you actually own the domain. This prevents the domain from being misused or hijacked by others and protects your business security.

The verification is done by adding a TXT resolution record at your DNS provider. The specific record value will be provided during the domain access operation - simply follow the on-page instructions.

Ownership Verification for Edge Acceleration

If Edge Acceleration is enabled, EdgeOne domain ownership verification is additionally required the first time it is enabled. This is a requirement of the EdgeOne platform itself and is not shared with CloudBase's first-time domain ownership verification. Follow the EdgeOne instructions to add the corresponding DNS TXT record to complete the verification.

Tencent Cloud DNS Setup Method

If your DNS service provider is Tencent Cloud, you can add CNAME records following these steps:

1. Enter Domain Resolution

Log in to Domain Service Console, find the target domain in the domain list, and click "Resolution" in the operation column.

2. Add Resolution Record

On the resolution page, click "Add Record".

3. Configure Resolution Record

Configure resolution record parameters:

  • Host Record: Fill in domain prefix (e.g.: @)
  • Record Type: Select CNAME
  • Record Value: Fill in CNAME value
  • Click "Save" to complete configuration
Tip

There are priority differences between different record types for domain resolution. When the host record is the same, different record types on the same line cannot coexist, otherwise conflicts will be prompted. CNAME records conflict with any record type except CNAME records, and other records need to be deleted before configuration. For details, please refer to Why does it prompt "record conflict" when adding resolution records.

Usage Restrictions

  • Each CloudBase environment can bind up to 5 custom domains
  • Custom domains must have completed ICP filing
  • Domain resolution takes time to take effect, please be patient