Add Custom Domain API

Hello!

Just a small question.
When I add a custom domain using UI - Render automatically creates a redirect (www → apex && vice versa).

Is it assumed that is if I add a custom domain using API - all redirects should be handled outside Render (@ cloudflare for example)?

Best Regards,
Vasily

For comments and questions about Render’s REST API early access. If you’re interested in early access, please reach out to us at support@render.com

Hi @Vas, I’ve just tested and the API behavior should be the same as when adding a custom domain via the UI, adding the www → apex redirect and vice versa.

Let me know if you have any other questions!

Hello Jade!
I can this works.
Another question I have is the following:

  1. When I use the API to add a custom domain - we get the www → apex redirect and vice versa.
    (Two domain instances added in the UI - www.test.com and test.com)
  1. Now when I use the API to delete a custom domain - Only one of these instances (with www) gets deleted.

I think it should be more consistent to keep the same behavior as with adding the custom domain:
use delete api => 2 instance get deleted (www && non www).

Does it make sense?

Best Regards,
Vasily

Hi @Vas, you bring up a good point! I will raise this with the team!

Yep. I agree. This drives me crazy. I’d prefer it if the api only added the exact domain we requested and didnt automatically add the www or vice versa