Subdomains and no 'www'

html
#1

Hey, I am wondering how I could add a subdomain. Like this https://test.site/info.

Also, I am wondering how I could remove the ‘www’ off my site domain.

#2

You can do this with these steps!

  • Go to your project and go to the bottom left “Tools section”
  • Click “Custom Domains”
  • Enter in your url you would like to link. (In this case, it would just be your.site)
  • 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! (If you are using a apex domain (https://site.com instead of https://www.site.com or https://something.site.com) Then choose cname and have the target by set to your domain (your.site) wthout https:// ot anything else.)
  • All done! (Go to the middleware and add https upgrader to use https instead of http)
1 Like
#3

@Callum-OKane, when I try to add the hostname is says “Hostname is already taken. If you control that hostname, please contact support@fly.io” even though I own it. What should I do?

#4

Hey @Ipex can you provide the project and hostname you’re working with?

My guess is that you’re attempting to re-register a hostname that’s already been registered. The Glitch Custom Domains feature doesn’t currently display existing hostnames, so this is a fairly common problem.

#5

I’m trying to add the hostname on fly.io.

Project Name: ipexs-site
Hostname: ipex.ml

#6

Wait, now my project is saying that it’s already been used. Could you remove it?

#8

Ok, I’ve removed that domain.

#9

Okay thanks, but how can I add my hostname to fly.io? Everytime I do so it says domain taken.

#10

Are you adding it to your project before fly, because if you want to use fly.io, you do not add it to your project at all, and do it all through fly.io

1 Like
#11

@Callum-OKane, okay so I am now on the DNS part. And I’m tryna add a CNAME because I’m using Freenom, but I can’t go past it unless I add a name and I don’t wanna have a www. What should I do?

#12

You will have to use cloudflare for your DNS to get an apex domain like that.
When you switch to cloudflare, you will have to switch your nameservers on freenom, but that is not a hard job, then on dns settings on cloudflare. Create a cname pointing to glitch.edgeapp.net and have the name be @ which will automatically change it for an apex domain.

#13

While I agree with @Callum-OKane that CloudFlare can be useful, in many cases it’s not necessary, and to say that you’ll have to use it is inaccurate.

Freenom doesn’t have a way to use a CNAME record for an “apex” domain (one without a subdomain like “www”); this is pretty typical and you can read more about it in our custom domains help doc and the linked articles there. If you want to use an apex domain with Freenom you’ll need to use an A record and the IP address for glitch.edgeapp.net. In Freenom’s DNS interface, the “Name” field is optional for an A record.

1 Like
#14

I’m really confused on what to do, I tried add the DNS to Freenom but it didn’t work.

#15

Can you show us what your current Freenom configuration looks like?