If you've purchased a custom domain from a registrar, you can add it to your Glitch project!
To add a custom domain:
- Open the project in the editor.
- 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.
Here are some things to remember when adding a custom domain to your Glitch project:
- 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.
- Currently, web socket connections do not work with custom domains on Glitch. If your Glitch projects use custom domains and web sockets, you will need to set them up so that the apps are connected via their glitch.me URL.
- 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" (for example,
www.website.com), you'll need to create an A Record.
- If your registrar requires an A Record to be pointed to an IP address instead of a URL, you can find the IP address by using a service like Ping.eu to ping http:// glitch.edgeapp.net.
- Here are documentation links for how to add an A record with some popular domain name registrars: