Today I’m excited to announce a feature a few of you have asked for — custom DNS names for your sockets.
Up until today, mysocket would generate a random DNS name for your socket. For example, floral-wildflower-1092.edge.mysocket.io. This was great to get started, but as more folks are interested in the zero trust features you asked us to add support for custom DNS names.
To support this on our end, we both need to make sure we accept connections for these custom DNS names and map them to the correct service. And, we’ll need to make sure we have TLS certificates for these custom names.
Watch the demo
How does it work?
To add a custom DNS name to your socket, you’ll first need to create the socket. This can be done using the same methods you’ve used before: the portal, the mysocketctl cli tool, or using the API.
Add a CNAME
Next up you’ll need to create a CNAME for the custom DNS name and point it to the mysocket DNS name for this socket. In the example below, you can see I have a CNAME for andree.toonk.io pointing to the socket bitter-meadow-5892.edge.mysocket.io
$ dig andree.toonk.io
;; ANSWER SECTION:
andree.toonk.io. 3600 IN CNAME bitter-meadow-5892.edge.mysocket.io.
bitter-meadow-5892.edge.mysocket.io. 300 IN A 22.214.171.124
Add Custom DNS name
Now that the CNAME exists, we can add the custom DNS name to the configuration for this socket. This can be done by editing the socket details using the portal (or API).
Custom DNS names work for all socket types, HTTP/HTTP(s), TLS and TCP sockets.
Multiple custom DNS names may be added for a socket. Note that our API’s will check if the CNAME exists, so it’s very important to first create the CNAME.
You’ve now completed everything you need to do. Next up, we’ll make sure the configuration for your socket is updated and distributed to all of our anycasted edge proxies. Typically this takes about two seconds. In parallel, our configuration systems will also request a TLS certificate for this custom domain and, once successful, distribute it. The TLS work may take up to a minute.
As simple as…
1) Make sure you have a CNAME for your custom DNS name pointing to the mysocket DNS name.
2) Update the socket configuration with the custom DNS name(s)
3)🚀🚀🚀 that’s it! Within a minute, you have your custom DNS names up and running.
That was pretty simple, right?
With this new feature, you get to make your apps highly available by leveraging our anycasted edge proxies. And layer on the zero-trust features, making sure only authenticated and authorized users can use your service. Best of all, it now works with DNS names that make sense for your users and customers.