Wildcard on Glitch subdomains

I want to forward my domain with wildcard on subdomains, I mean when I navigate to my custom domain it should be available on all subdomains. Is it possible to forward my Glitch project with wildcard?

If I understand correctly you mean that if example.com was your domain you want to be able to use *.example.com to get to your Glitch project?

1 Like

Technically, yes. This is possible. But it’d be hard to do without having to create your reverse-proxy server. I recommend having a look into Caddy or Nginx.

But using the native Glitch custom domains feature it would not work. Glitch’s reverse proxy uses the incoming request’s Host header to determine which Glitch project to direct the request to, so while you could configure multiple domains to the same project, it wouldn’t support the wildcard syntax.

If you use CloudFlare for your DNS, you can set this up by upgrading to Enterprise, but this is probably quite expensive: https://community.cloudflare.com/t/wildcard-domains/61127
It also seems to suggest in that forum topic that maybe wildcards not set to run through CloudFlare and are instead just plain DNS are free, but don’t quote me on that.

From what I know Nginx would be the best for this.

You can do * as the subdomain in your DNS, but this creates some issues.

I’m considering to actually implement wildcards into Glix, not sure yet :thinking:

3 Likes