How to add a custom domain to a function
Each function comes with an automatically generated domain on which it is available. However it is possible to assign your own domain name to make it easier to use your functions.
- Add a CNAME record pointing to your function’s default URL from the domains dashboard.
- Click the Endpoints tab on your Function’s Overview page.
- Click + Add a New Endpoint.
- Enter your custom domain URL and validate the form.
- Connect to your function using your custom domain once you have checked the CNAME and TLS fields.
Be careful, for now Custom Domains does not support websockets. If you need to use websockets you have to configure them with the original URL.