[Tutorial] Get your project on a custom domain!

There are 2 options that you can do to get your project webpage shown with a custom domain.
I would recommend option 2 if you would like upgraded HTTP connection to have secured https!
You will need 2 thanks on glitch to be able to go through with option 1 so option 2 will have to be the method you use!
Option 1:

  • Go to your project and go to the bottom left “Tools section”
  • Click “Custom Domains”
  • Enter in your url you would like to link.
  • Go to your domain control panel. Go to the DNS configuration.
  • Use @ if the url you used is an apex link (yourwebsite.com) or the subdomain if you used one (www.yourwebsite.com).
  • Have the DNS configuration point to “glitch.edgeapp.net” or else the shw.io link you were provided with on glitch!
  • All done! (Test and see if it works).

Option 2:

  • Go to the website: https://fly.io
  • Create an account (Or login if you already have one).
  • Go to the following page => https://fly.io/sites (Only shows page when logged in**)
  • Click the “New site” option.
  • Select “Hosting service” and glitch “Glitch”
  • Enter the URL of your glitch project.
  • Enter the domain you are using.
  • Go to your dns configuration and set the host pointing to the shw.io link you are given!
  • All done! (Go to the middleware and add https upgrader to use https instead of http)
1 Like

What is the shw.io domain, what does it mean, and who registered it?

When adding a custom domain via Glitch (Tools > Custom Domains) you get issued with a shw.io url via Fly that relates to your specific project. You should copy it for use later as you follow the rest of the instructions.

If this is for the fly.io method, when adding the website it will come up during the setup with your shw.io link!

You can also use glitch.edgeapp.net instead of the shw.io link - that CNAME destination should work for any Glitch Custom Domain.

2 Likes

I dont understand, couldnt anyone assign your project a domain?

Yup, if you use the fly.io method and use a project url that is not yours, and is not already linked, then you can link that to any domain.

isnt that a bit of a security concern and if someone links a domain to your project what could you do about it

1 Like

@anon43649539 Glitch is a friendly community. Nobody will do that.

There is no actual security risk, the project owner just might now allow it!

When I go to fly.io/sites I it shows me a 404 page. I have verified that I am logged in. @Callum-OKane

This is discussed in detail here:

The specification of fly.io has changed and it cannot be used in the new app.

this is all I get when I go there image

Small mistake in your 2nd option, nice tutorial though!

Make sure you’re logged in via here

I have verified that I am indeed logged in

1 Like

https://fly.io/sites doesn’t work - can it still be used to connect my custom domain ?

Fastly provides this service now.

3 Likes

This works !
Used 2nd method : ACME HTTP/CNAME challenge for my BlueHost Domain …


Then deleted and added new record with Value dualstack.t.sni.global.fastly.net and domain connected
Thanks

1 Like