Instead of using the default domain assigned to your gateway, you can add your own custom domains.
You can use domains you already own, or register new ones (e.g. via the Scaleway Domains and DNS service).
Configuring your domain
Configuring domains is done via a Serverless Container custom domain.
To add a domain to your gateway:
Add a CNAME record from your domain that points to your gateway endpoint
Run the CLI command
scwgw domain add <hostname of CNAME record>
Start by getting the default endpoint for your gateway (this will be the target of the CNAME):
scwgw infra endpoint
This gives an output of the form
If your domain is
my-domain.com, you can add a new CNAME record in your DNS provider that points to your gateway, e.g.
CNAME gateway.my-domain.com scwslsgwiaytodoc-scw-sls-gw.functions.fnc.fr-par.scw.cloud
Once this has been propagated, you can add the domain to your gateway with:
scwgw domain add gateway.my-domain.com
You can then check the status of your gateway domains with:
scwgw domain ls
Once the status of the domain is
ready, all routes on your gateway will be accessible via