If you've purchased a custom domain from a registrar, you can add it to your Glitch project!
To add a custom domain:
- Within the Project Editor view, click Tools located on the lower-left side of the page.
- Click Custom Domains.
- Enter your custom domain URL (www.website.com) and then click Add Domain.
- Now, go to your domain name registrar's website and create a CNAME entry, adding glitch.edgeapp.net as the target.
Some things to remember when adding a custom domain:
- Visiting the url, http://glitch.edgeapp.net directly in your browser will not display your app. It’s not intended to be used directly, only as part of a CNAME.
- While you can connect a number of custom domains to your app, only the first five will appear in the custom domain menu after they have been added.
- Most popular domain name registrars provide documentation on how to configure your dns for CNAMES. Here are links to a few of them:
Using an A Record when your domain name registrar requires an IP address:
- If you want to use the "bare domain" you purchased for your custom domain (for example,
website.com
instead ofwww.website.com
) most registrars won't allow that because it would break the internet (see this article for a slightly geeky but pretty understandable explanation of why). - In this case, it's possible your registrar supports a custom DNS record type like ALIAS or A Record which will serve the same purpose.
- If not, and your registrar doesn't allow you to use a URL but instead needs an IP address, then you can get the IP address needed by pinging http:// glitch.edgeapp.net. You can use a service like Ping.eu to do so. You can then create an A record for it on your domain registrar's website.
- Here are documentation links for how to add an A record with some popular domain name registrars: