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
CNAME
record that points from your desired domain to<your_canvas_name>.darkcustomdomain.com
. For example, if your canvas is calledellen-demo
, point yourCNAME
atellen-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.com
is the usual way, although you can useapp
,api
, or another subdomain instead ofwww
. This is because apexCNAME
s aren't supported by the DNS spec, andA
records 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
A
record 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 supportsALIAS
records (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
dig
tool 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
http
tohttps
on 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.