Custom Domain in Data Service
TiDB Cloud Data Service provides a default domain <region>.data.tidbcloud.com
to access each Data App's endpoints. For enhanced personalization and flexibility, you can configure a custom domain for your Data App instead of using the default domain.
This document describes how to manage custom domains in your Data App.
Before you begin
Before configuring a custom domain for your Data App, note the following:
- Custom domain requests exclusively support HTTPS for security. Once you successfully configure a custom domain, a "Let's Encrypt" certificate is automatically applied.
- Your custom domain must be unique within the TiDB Cloud Data Service.
- You can configure only one custom domain for each default domain, which is determined by the region of your cluster.
Manage custom domains
The following sections describe how to create, edit, and remove a custom domain for a Data App.
Create a custom domain
To create a custom domain for a Data App, perform the following steps:
- Navigate to the Data Service page of your project.
- In the left pane, click the name of your target Data App to view its details.
- In the Manage Custom Domain area, click Add Custom Domain.
- In the Add Custom Domain dialog box, do the following:
- Select the default domain you want to replace.
- Enter your desired custom domain name.
- Optional: configure a custom path as the prefix for your endpoints. If Custom Path is left empty, the default path is used.
- Preview your Base URL to ensure it meets your expectations. If it looks correct, click Save.
- Follow the instructions in the DNS Settings dialog to add a
CNAME
record for the default domain in your DNS provider.
The custom domain is in a Pending status initially while the system validates your DNS settings. Once the DNS validation is successful, the status of your custom domain will update to Success.
After your custom domain status is set to Success, you can use it to access your endpoint. The code example provided by TiDB Cloud Data Service is automatically updated to your custom domain and path. For more information, see Call an endpoint.
Edit a custom domain
To edit a custom domain for a Data App, perform the following steps:
- Navigate to the Data Service page of your project.
- In the left pane, click the name of your target Data App to view its details.
- In the Manage Custom Domain area, locate the Action column, and then click Edit in the custom domain row that you want to edit.
- In the displayed dialog box, update the custom domain or custom path.
- Preview your Base URL to ensure it meets your expectations. If it looks correct, click Save.
- If you have changed the custom domain, follow the instructions in the DNS Settings dialog to add a
CNAME
record for the default domain in your DNS provider.
Remove a custom domain
To remove a custom domain for a Data App, perform the following steps:
- Navigate to the Data Service page of your project.
- In the left pane, click the name of your target Data App to view its details.
- In the Manage Custom Domain area, locate the Action column, and then click Delete in the custom domain row that you want to delete.
- In the displayed dialog box, confirm the deletion.