Back

Functions domains not matching endpoint

  • 0
  • Functions
Manaberry_mac
24 Nov, 2023, 13:01

Hi,

I was wondering why the domain created with my function doesn't match my endpoint domain?

Thanks!

TL;DR
User is experiencing an issue where the domain created with their function does not match their endpoint domain. They mention using an environment variable `_APP_DOMAIN_FUNCTIONS` and having issues with SSL certificates not generating automatically for self-hosted. Another user suggests that if there is no custom domain configured, it will point to `cloud.appwrite.io` which is insecure for running functions. They recommend adding a subdomain and connecting it to the function. No solution is provided in the thread.
Meldiron
24 Nov, 2023, 13:13

Hi 👋 If you didnt have any custom domain configured, it would point to cloud.appwrite.io. It's insecure to run functions on cloud.appwrite.io domain, as that might expose some of our cookies. Thats why we decided to dedicate it to separate appwrite.global domain.

You can see similar approach taken from Vercel and Netlify.

What you can do is add your own subdomain and connect it to a function, for example payments-api.matejbaco.eu cound be added so when I visit that domain, it will execute the function

Manaberry_mac
24 Nov, 2023, 13:32

It's self hosted, and it's set on my own sub domain. I did a new CNAME redirection on the function but it failed.

Not sure what is the missing bit here :<

Meldiron
24 Nov, 2023, 13:34

CNAME records might take up to 24 hours to apply, please retry in few hours. Verification should work then, considering its set properly on domain

Manaberry_mac
24 Nov, 2023, 13:35

DNS checkers are positives, and I followed the instructions carefully. But I will try tomorrow. Thanks.

Drake
24 Nov, 2023, 14:49

Btw, the environment variable for that auto generated domain is _APP_DOMAIN_FUNCTIONS...but also, SSL certificates don't generate automatically for those in self-hosted

Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more