Allow users to add their own domain in app to access profile page

I have an app on render and want to allow users to add their own custom domain so they can view their profile using their own domain.

For this I added a CNAME record in my DNS which will eventually return user profile based on the host name.

To test this, I used another domain, added a CNAME record in its DNS (cloudflare)
@ - cname.myapp.com

When I visit my test domain which should return my user profile based on the host name/ custom domain I saved in my account, instead it throws Error 1000 from cloudflare.

Hi,

Custom domains must be listed on the service to be routed correctly. Adding a CNAME to a domain that isn’t listed on the service wouldn’t work, as you’ve found.

Maybe you could use the API to add the custom domains to your service on your users’ behalf: https://api-docs.render.com/reference/get-custom-domains

Alan

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.