How do I assign a custom domain?

I have pointed a custom domain to my app url but I am getting redirected to 404, presumably it relies on the domain name to find the project?

3 Likes

Same issue here, I just opened this: http://support.hyperdev.com/t/cname-redirection-to-hyperdev/236/1

1 Like

Yes, that is correct. We hope to add support for custom domains soon, but in the meantime you should be able to use a service like CloudFront or CloudFlare.

I am currently using cloudflare but it results in 404 here is my configuration:

Hmm, I would think that a CloudFlare setup like that should work but I admit that I’m not as familiar with CloudFlare as I am with other services. I’ve used CloudFront and Route53 to set up a custom domain serving HD apps very similarly to the process detailed here: http://strd6.com/2016/02/github-pages-custom-domain-with-ssltls/. If there is a way to configure CloudFlare to proxy your-app.hyperdev.space and only handle DNS for yourcustomdomain.com then I believe that should work.

In the future when we add better support for custom domains this should become a lot easier :smile_cat:

1 Like

So I have configured mycustomdomain.com to use the cloudflare nameservers and the CNAME DNS record I pasted above is configured to be a DNS mapping and a HTTP proxy (CDN). Is there any other config that I should do?

Can you confirm you were able to setup a hyperdev url when you configured using cloudfront and Route53?

Configuring a subdomain like so:

gives me a 503 error…

{
status: "Error",
statusCode: 503,
statusDetail: "Unable to route to backend for www.mfbx9da4.com: getBackendUrlForDomain: GetContainerInfo: project id cannot be empty"
}
1 Like

I was able to set up CloudFront and Route53 to serve a HyperDev app on a custom domain today. Here’s the setup:

And the Route53 record set:

It’s probably possible to tweak some of the settings, but CloudFront has been finnicky for me at times (the 15 minute deploying step doesn’t make it easy to quickly test :stuck_out_tongue:), this is just what worked for me.

Again, we plan to have better cname support at some point in the future, but hopefully this info will help people who really want custom domains get them.

https://flicker-swoop.hyperdev.space
https://lsystems.danielx.net

3 Likes

Thanks for the help DanielX! I wrote a tutorial detailing these steps, including linking the DNS Namespace Servers to a domain purchased from Namecheap. Hope this will help other who may find it :slightly_smiling_face:
https://pretzel.bike/gomix-custom-domains/

2 Likes

@mfbx9da4 I think the issue in your original screenshot is that you created a CNAME but didn’t turn the proxying on (the grey cloud icon on the right). This means the request goes straight to Glitch and they don’t recognise the hostname. If you turn on the proxying, then it should work as expected.

lol, I just saw the dates on this thread… It was at the top of the recent list because of the most recent reply. Doh!

1 Like

With https://fly.io we can use custom domains. More info in this article https://fly.io/articles/fly-glitch/

3 Likes

After having used cloudfront to front glitch.me instances for over a year, I had to check this thread again after running into some HTTP header caching issues.

The fly.io method works!

2 Likes

When you are inside your project, click the down arrow beside your project name. Then click advanced and the click on custom domains. If this healped please thank me.