Configure custom domain
This page describes how to configure a custom domain for public access to the service.
By default, cloud hosting allocates a default domain name to each cloud hosting service. However, this domain name is only for development and testing purposes and lacks any authentication strategy. If the service itself implements no authentication strategy, exposing it to the public network can be relatively dangerous. Therefore, for services requiring public exposure, we recommend configuring a custom domain name and enabling authentication access.
Preparation
- Domain name and SSL certificate. You can also purchase them at Tencent Cloud SSL Certificate. A single-domain certificate is sufficient.
- Or upload your existing certificate on Tencent Cloud SSL Certificate.
Configure domain
- Go to Tencent Cloud Hosting Environment Configuration
- Select section, select
- Fill in the prepared domain name and certificate, then click Confirm to complete domain configuration.
Domain Association Resource
Select section, click the
Fill in the configuration information:
- Associated Resource: Cloud Hosting
- Resource Instance: Select the cloud hosting service that requires access.
- Domain Name: Select the custom domain name you just added.
- Trigger Path: defaults to /, can be configured based on actual needs to expose the required path
- Authentication Switch: defaults to off. If you need to use CloudBase Authentication
- Base Layer Passthrough: defaults to off, we set it to on
After filling in the configuration information, click Confirm Creation and wait for the creation to complete.
Once created, you can access the CloudBase Hosting service through the custom domain name.