How to set up a Custom Domain
Your backend endpoints are always available at
<your_canvas_name>.builtwithdark.com/*.
If you'd like, you can additionally use a custom domain like
www.myawesomedarkservice.com or api.myawesomedarkservice.com to serve your
endpoints!
We'll manage SSL for you - no need to buy your own certificate to make your site
or service available over https.
How to set it up
-
Set up a
CNAMErecord that points from your desired domain to<your_canvas_name>.darkcustomdomain.com. For example, if your canvas is calledellen-demo, point yourCNAMEatellen-demo.darkcustomdomain.com. The specifics for this step depends on how you manage your DNS settings, but here's what it might look like on Cloudflare:
Note: You cannot use an apex domain like
myawesomedarkservice.com. Usingwww.myawesomedarkservice.comis the usual way, although you can useapp,api, or another subdomain instead ofwww. This is because apexCNAMEs aren't supported by the DNS spec, andArecords remove some of our options for providing stable and resilient infrastructure. You can read this Netlify post for more information.If you wish, you can additionally set up an
Arecord pointing the apex (e.g.myawesomedarkservice.com) to35.227.208.117. We cannot currently provide an SSL cert for that, but we can redirect to your main subdomain (which is usuallywww). If your DNS provider supportsALIASrecords (likeCNAME, but permitted on an apex), that also works - though again, for redirects, not SSL certs. -
Double-check that DNS has resolved. One way to test this is with the
digtool on the command line. If everything is ready, you should see something like this:$dig api.myawesomedarkservice.com
# ...
;; ANSWER SECTION:
api.myawesomedarkservice.com. 300 IN CNAME ellen-demo.darkcustomdomain.com.
ellen-demo.darkcustomdomain.com. 300 IN A 35.197.124.122
# ...Another way to check is with a service like https://dnschecker.org/.
-
Once DNS resolves, contact us with your domain and canvas, and we'll set up an SSL cert and the appropriate redirects from
httptohttpson our end.
Troubleshooting
I've set up a CNAME but I still don't see <your_canvas_name>.darkcustomdomain.com in the results from dig!
We've seen this happen for develops using proxies like Cloudflare in front of their domains. For example, you might see:
$ dig api.myawesomedarkservice.com
# ...
;; ANSWER SECTION:
api.myawesomedarkservice.com. 300 IN A 104.24.118.127
api.myawesomedarkservice.com. 300 IN A 104.24.119.127
# ...
To resolve this, turn off the proxy. On Cloudflare, you can press this button to
switch from "Proxied" to "DNS only" mode:

My DNS is set up correctly, but I'm getting an invalid certificate warning when trying to visit my custom domain via https
If this happens we likely haven't set up an SSL certificate for you yet (see step 3 above). In any case, please contact us with your domain and canvas.