Configure domains and DNS
Connect a custom hostname and configure the application's HTTP target.
The Domain & DNS page shows default and custom domains for a container. External requests use HTTPS; routing to the application uses HTTP. All domains on the resource use the same HTTP target.
Before you begin
Deploy an HTTP application and identify its internal listening port. To add a custom domain, you must be able to edit DNS records for that hostname.
Configure the HTTP target
- Open Domain & DNS on the container.
- Under HTTP target, set Internal HTTP port to the application's listening port.
- Select Save target.
For an application listening on port 3000, use 3000 here. This setting controls routing; it does not make the application start listening on a new port.
Connect a custom domain
- Under Add custom domain, enter a hostname such as
app.example.comand select Add domain. - Copy the CNAME target displayed for that domain.
- In your DNS provider, create a CNAME record for the custom hostname pointing to that target. Use the exact target from the Console, not a guessed server address.
- Allow the DNS change to propagate, then select Verify connection.
- Confirm that the domain shows Connected, and open its HTTPS URL.
The default domain is read-only. For a custom hostname, choose a DNS name on which your provider allows a CNAME record.
Import existing domains
For an imported application, choose Import existing domains to review domains already connected to it. Select the eligible domains, including one default domain when required, and select Import selected domains.
Imported domains can show Routing migration pending, Port verification required, or CNAME verification required. Configure the HTTP target and verify custom-domain DNS as indicated. Importing domains does not redeploy the container.
Remove a custom domain
Select Delete for the domain and confirm. Remove its CNAME record from your DNS provider separately.
If verification or routing fails, follow Troubleshoot containers.