[Custom domain] Can I point to cname.myapp.com instead of myapp.onrender.com?

Hey team,

I know I can add a custom domain, say for admin · myapp · com. I need to add a CNAME and point admin to myapp · onrender · com.

But the thing is, I want to point the admin subdomain to something like cname · myapp · com. So I added an ALIAS record and made cname · myapp · com an alias of myapp · onrender · com.

But it didn’t seem to work correcrly, the certs can never be issued. But once I point admin to myapp · onrender · com, everything starts to work again.

Can anyone give me some hint one how to make cname · myapp · com work?

Thanks,
Damon

Hey Damon, if I understand correctly,

  1. You have myapp.onrender.com
  2. You have a CNAME record for cname.myapp.com targeting myapp.onrender.com
  3. You have a ANAME or CNAME record for admin.myapp.com targeting cname.myapp.com

Is that correct?

For 2, I actually set an ALIAS record for cname·myapp·com targeting to myapp·onrender·com

For 3, not only I want my own subdomain like admin·myapp·com targeting to cname·myapp·com, but also I would like to have my clients target their own website to cname·myapp·com, like let my client have a CNAME record for myapp·client-web·com targeting to cname·myapp·com

Thanks for taking a look!

That setup should work. However, it looks like you have the wildcard custom domain *.myapp.com set up already for your service. You should be all set to use admin.myapp.com on that service without adding it as a separate domain.

There should be no issue having your clients use a CNAME for myapp.client.web.com targets cname.myapp.com, so long as cname.myapp.com ultimately targets myapp.onrender.com and you’ve added myapp.client.web.com to your service as a custom domain.

There should be no issue having your clients use a CNAME for myapp.client.web.com targets cname.myapp.com , so long as cname.myapp.com ultimately targets myapp.onrender.com and you’ve added myapp.client.web.com to your service as a custom domain.

Is there a Render API to programmatically add myapp.client.web.com as a custom domain to a web service? Ideally could allow us to provide a “custom domains” feature for our own product without having jump into the Render dashboard.

Hi Nick,

There is unofficial GraphQL API to create custom domain Using the API | Render · Cloud Hosting for Developers.
We will roll out official public API soon Render API | Feature Requests | Render

Hao-Ji

Thanks, this is awesome!