It works now! Thank you so much for the help, everyone. It looks like Glitch / Fly.io caught up with the missing SSL cert on its own – I didn’t have to delete and re-add
molecall.com in the Glitch config.
So I believe my instructions above [now below] are correct and I’m now repeating them for two other domains…
And it worked instantly this time!
I’m now adding some edits and clarifications in the above [now below] instructions. I think it would make sense to incorporate them into the official instructions.
I believe the existing official instructions are great if you have a specific subdomain of your custom domain that you want to use. If not then you’ll surely want both the root domain and the www version to work and of course you’ll want it to work for both http and https. As far as I can tell, only those with a profound understanding of sysadminnery could infer the instructions below. (I mean, I have a PhD in computer science and it was a pretty huge frustration for me to piece it all together!)
If you have custom domain
example.com that you want to point to
example.glitch.me and want all four variants (http vs https and www vs root) to work, here’s what to do:
www.example.com as custom domains in Glitch. The order doesn’t matter.
Glitch config example screenshot
Go to Domain Settings for
example.com at your registrar. For Namecheap, choose “Namecheap BasicDNS”. Delete any existing domain redirects.
Go to Advanced DNS settings (as it’s called in Namecheap) and delete any existing records.
Add an A Record with host
@ (meaning the root aka apex domain –
example.com) and value
126.96.36.199 (the IP address for glitch.edgeapp.net – maybe double check this with any dnslookup or ping service). When testing and changing things, set the TTL to 1 minute. If you expect it to be stable, “Automatic” should be fine.
Add a CNAME record with host
www and value
example.com. Same story with the TTL. (Note that Namecheap automatically turns
example.com. with a trailing dot, which is expected.)
Registrar example config screenshot
- It normally will work now, within like a minute. If it doesn’t, check https://dnspropagation.net/A/example.com to see if the DNS records are propagating. If it doesn’t start working in 3 days then you can definitively rule out “slow DNS propagation” as the culprit.
- Is it fragile to hardcode the IP address? Is there any way to avoid doing so?
- What if I’m morally opposed to non-encrypted websites and want the http version to actively redirect to the https version?
- Which should be the canonical version of the URL? Is it important for googly/SEO reasons to pick one and have all others redirect to it?