Twilio serverless function URL, custom domain?

Viewed 379

So I deployed a serverless app to the beta Twilio function area. It works fine, but I was wondering how/where I could replace the twil.io URL with our company's domain. I can publish a CNAME entry in public DNS, I have a SSL cert to apply, etc. I just don't see where in the Twilio web console I would add the custom domain.

I tried opening a ticket with Twilio support, but since this is a beta area they punted to the engineering team. And I haven't heard back yet...

2 Answers

There is no CNAME support with Functions at the moment; you’d have to use a proxy service to take care of that like one of my teammates used Cloudflare Workers for an important app for our SIGNAL conference: here's an example too github.com/adamchasetaylor/cf-worker-proxy – lizziepika 18 mins ago

This is the workaround that should serve our purposes. Thanks lizziepika for the quick assist!

Twilio developer evangelist here.

You can use the Twilio Serverless Toolkit for this when you deploy a Function!

For example, I have this Twilio Video app. In my package.json, enter image description here the name is "tfvideo".

Then when I deploy using twilio serverless:deploy, the twil.io URL becomes tfvideo-1829-dev.twil.io...deployment details

because those are the default settings: that command will create a new environment for you with the following properties:deploy default settings

You can change the environment it deploys to by passing the domain suffix of the environment into the deploy command using the --environment flag. More info here.

Let me know if this helps at all!

Related