My project splitit-ml, is a URL shortener, and when I add a custom domain after a while of setting the CNAME, it states “splitit.ml is already registered for glitch”, why is this happening?
My express glitch custom domain says "splitit.ml is already registered for glitch" even after I set the CNAME record
Hi @Stanlyhalo, welcome to the Glitch forum!
You’re seeing that message because the custom domain you’re working with is already associated with that project. Custom Domains are still in beta, so it’s not complete, and among the things that are missing is a way to view or manage already-assigned domains. Sorry for the bother!
Hope this helps!
Btw, I meant express, but I did associate it, but when I go to splitit.ml, it won’t load I get “splitit.ml’s server IP address could not be found.”
*Edit: this is my DNS CNAME
*Edit 2: also my project says “Starting”, but it won’t start.
Hey @Stanlyhalo, I think you’ve hit a couple of pretty confusing parts of Glitch’s Custom Domains and of DNS generally:
- I think the way you have things configured in that screenshot would mean that you’re adding a CNAME for a subdomain of your
splitit.mldomain (a subdomain being the
www.splitit.mlfor instance). In this configuration screen the “Name” field would normally contain the “www” part of a URL. If you don’t want to use a subdomain then you’ll most likely need to use an A record pointing to the IP address of your target instead of a CNAME an you would leave the “Name” field empty - this is discussed in the help article I linked to.
- This is further complicated by the fact that
glitch.edgeapp.net(which I suspect you saw in other forum topics) is completely interchangeable with the
shw.iodomain you were provided, as are the different IP addresses of each (in the A record case).
Here’s a screenshot of my Freenom configuration for Custom Domains for
cori.glitch.me which means that both
www.hyperdev.tk are pointed to that same project:
If you follow that pattern with your configuration it should start working (once the TTL period has passed, so by default in about an hour).
Regarding your project not starting, that’s because you’re overriding the PORT variable in your
.env file. Glitch only allows certain ports (typically 3000, but it can change under certain circumstances) and watches for something listening on one of those ports before it will consider the project successfully started. Best Glitch practice is to let Glitch manage that PORT for you, so removing that line in your
.env file will likely make your project work as you expect.
Hope this helps!