I’m helping someone with a domain registered with GoDaddy and I would like to get a simple recap of the steps needed to link to a static site on Glitch.
I did read the instructions so I’m just trying to rephrase things a bit so I understand it. I don’t actually like instructions that suggest “you can do this… or you can do that” and prefer “just do this and then do that”.
The site was working BTW but it got broken recently by someone trying to “fix” it.
The Glitch custom domain has been set to www.testdomain.org (not the actual domain). I assume the only thing required on GoDaddy would be a CNAME record that directs www to glitch.edgeapp.net. So first question is am I correct in that assumption?
If so, this would only redirect www.testdomain.org requests. To get testdomain.org to work as well I assume I get GoDaddy to add the www and leave Glitch with the single www.testdomain set, correct?
And now I believe I have to add an A record with the IP address of glitch.edgeapp.net and then I can change the CNAME record with www to have an @ symbol rather than edgeapp url.
often this results in them taking over the @ name with something that is logically neither an A record nor a CNAME record
if your domain seller does not offer an HTTP redirect service, set up a server of your own that does the HTTP redirection from testdomain.org in the same way. set up an A record for the IP address of that server. it may be possible to use Glitch to set up this server as well
Here’s what I ended up having to do in order to get all of the variants (http vs https, www vs root) to work:
Say you have custom domain example.com that you want to point to example.glitch.me.
Add example.com and 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 184.108.40.206 (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 into example.com. with a trailing dot, which is expected.)
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.
For SEO reasons you want search engines to know which of the URL variants is the canonical one. This is called URL canonicalization aka “rel canonical”. Namely, pick a variant – let’s say https://www.example.com – as the canonical version of the URL and specify it in the header of the HTML like so:
That way search engines will not be confused and penalize you for having seemingly the same content duplicated across 4 (actually 6, counting http://example.glitch.me and https://example.glitch.me) different URLs.
PS: The canonical version of these instructions are now here:
Thank you. I wasn’t too far off. Nothing in the Glitch notes indicates that two variants of the custom domain should be entered. It won’t hurt obviously but I would guess (given the redirect) that the URL was www.example com by the time it got to Glitch. I’m going to try setting both of course.
And thanks for the canonical example. I would love to see more “documentation for dummies”. It isn’t that people are dummies but without examples and warnings and such there is so much that can go astray.
People are (for instance) generally not realizing that the prefix on the DNS record isn’t an identifier but that it is used. So someone entered “glitch” trying I suppose to remember this was entered for glitch and not realizing that glitch became a subdomain which the actual glitch project knew nothing about.
Yes they should read more and figure these things out but if a simple sentence or two can inform someone it is the better alternative.
I wanted to thank you as well. I don’t use GoDaddy but if something is for sale I imagine they offer it HTTP redirect can be step 2 once I get step 1 corrected. I rarely get involved prior to a problem manifesting itself and usually hear about it after it happened.
Setting DNS to CloudFlare is a possibility as well.