HomeServerlessContainersHow to
Add a custom domain to a container

Update content

How to add a custom domain to a container

Published on 21 February 2022

Each container comes with an automatically generated domain on which it is available. However it is possible to use your own domain name to address your containers to facilitate their use.

Identity and Access Management (IAM):

If you have activated IAM, you may need certain IAM permissions to carry out some actions described on this page. This means:

  • you are the Owner of the Scaleway Organization in which the actions will be carried out, or
  • you are an IAM user of the Organization, with a policy granting you the necessary permission sets
  • You have an account and are logged into the Scaleway console
  • A running Serverless Container
  • You have registered a domain name with the provider of your choice and have access to the domain name’s DNS zone file
  1. On your domain provider’s platform (for example Scaleway’s domains), add a CNAME record pointing to your container default URL in the domains DNS zone file.

    • All domains are supported.
    • CNAME flattening is supported. CNAME flattening speeds up CNAME resolution and allows you to use a CNAME record at your root/apex domain.
    • If your DNS provider does not support CNAME flattening, you need to create an ALIAS on your root domain (named @ or with an empty name) instead of a CNAME.
  2. Click the Endpoints tab on your containers’ page.

  3. Click on + Add a New Endpoint.

  4. Enter your custom domain name and validate the form.

  5. The console runs checks on the CNAME and TLS configuration of the custom domain name. Connect to your container using your custom domain once all checks have completed.


Be careful, for now Custom Domains does not support websockets. If you need to use websockets you must configure them with the original URL.

See Also