![](https://cdn.discordapp.com/avatars/237017098344202240/885fc8f3f438edf2b08c4c0be4aa5d31.webp)
I can see that the root _APP_DOMAIN_FUNCTIONS
is blocked from being used for functions on the below file line
https://github.com/appwrite/appwrite/blob/c076dfe6f14ddacc4f658fdff85fbdbe31e05636/app/controllers/general.php#L63
For my current implementation, that means that the domain root cannot be used? I was originally interested in using an Appwrite function to host a site at the root, as well as sites on subdomains, but currently that seems impossible.
![](https://cdn.discordapp.com/avatars/237017098344202240/885fc8f3f438edf2b08c4c0be4aa5d31.webp)
I guess this is mostly just a request for confirmation 🙂
![](https://cdn.discordapp.com/avatars/462046107556511744/504fd808296728e8e89d82b8ea1e77a9.webp)
I would suggest using a dedicated domain for your appwrite instance like appwrite.mycompany.com
because your appwrite instance can have multiple projects. For 1 of your sites (which I'm assuming is 1 function in one of your projects), you could create a custom function domain with whatever domain you want (myapp.com
)
![](https://cdn.discordapp.com/avatars/237017098344202240/885fc8f3f438edf2b08c4c0be4aa5d31.webp)
so that is what I am doing, for appwrite itself, but with the goal of hosting sites on *.mycompany.com
I had set the _APP_DOMAIN_FUNCTIONS
env var to mycompany.com
This is largely due to my current implementation with Cloudflare proxy, and a nginx reverse proxy handling LetsEncrypt certificates.
I suspect that I would need to adjust my proxy implementation a bit for this to work properly
![](https://cdn.discordapp.com/avatars/462046107556511744/504fd808296728e8e89d82b8ea1e77a9.webp)
with the _APP_DOMAIN_FUNCTIONS
, appwrite generates a custom unique subdomain for each function like:
asjidojriweoj.domain.com
so it doesn't make sense to use that for a website URL/domain.
![](https://cdn.discordapp.com/avatars/237017098344202240/885fc8f3f438edf2b08c4c0be4aa5d31.webp)
I was manually assigning the subdomains I wanted to specific functions Like this one right here: https://test.plygrnd.org
![](https://cdn.discordapp.com/avatars/237017098344202240/885fc8f3f438edf2b08c4c0be4aa5d31.webp)
I'm reading through your medium nginx post right now
![](https://cdn.discordapp.com/avatars/462046107556511744/504fd808296728e8e89d82b8ea1e77a9.webp)
maybe you can do:
_APP_DOMAIN=appwrite.mycompany.com
_APP_DOMAIN_FUNCTIONS=functions.appwrite.mycompany.com
And then if you want a site at test.mycompany.com
, create a custom function domain for that in the function
![](https://cdn.discordapp.com/avatars/237017098344202240/885fc8f3f438edf2b08c4c0be4aa5d31.webp)
Cloudflare wont do this with the free plan functions.appwrite.mycompany.com
And from what I have seen, if I dont set _APP_DOMAIN_FUNCTIONS
to the root domain, then the domain verification pops up with the CNAME prompt, which never works
![](https://cdn.discordapp.com/avatars/237017098344202240/885fc8f3f438edf2b08c4c0be4aa5d31.webp)
with _APP_DOMAIN_FUNCTIONS
as the domain root, the domains are validated automatically it seems
![](https://cdn.discordapp.com/avatars/462046107556511744/504fd808296728e8e89d82b8ea1e77a9.webp)
in nginx you'd have multiple domains for the same proxy host:
- appwrite.mycompany.com
- *.functions.appwrite.mycompany.com
- test.mycompany.com
![](https://cdn.discordapp.com/avatars/237017098344202240/885fc8f3f438edf2b08c4c0be4aa5d31.webp)
I was just doing *.mycompany.com
with a cloudflare DNS challenge
![](https://cdn.discordapp.com/avatars/462046107556511744/504fd808296728e8e89d82b8ea1e77a9.webp)
if that works on the cloudflare side, sure.
on the nginx side...i think *.mycompany.com
only goes 1 level so you'd need another entry for *.functions.appwrite.mycompany.com
. maybe, im not sure
![](https://cdn.discordapp.com/avatars/237017098344202240/885fc8f3f438edf2b08c4c0be4aa5d31.webp)
I'll give it a shot, thank you!
![](https://cdn.discordapp.com/avatars/237017098344202240/885fc8f3f438edf2b08c4c0be4aa5d31.webp)
![](https://cdn.discordapp.com/avatars/237017098344202240/885fc8f3f438edf2b08c4c0be4aa5d31.webp)
it just refuses to verify
![](https://cdn.discordapp.com/avatars/237017098344202240/885fc8f3f438edf2b08c4c0be4aa5d31.webp)
even though if I navigate to plygrnd.org I get the appwrite login page
![](https://cdn.discordapp.com/avatars/237017098344202240/885fc8f3f438edf2b08c4c0be4aa5d31.webp)
WAIT! even better, verification fails, but the function is working!
![](https://cdn.discordapp.com/avatars/237017098344202240/885fc8f3f438edf2b08c4c0be4aa5d31.webp)
thats a riot
Recommended threads
- How would a migration handle storage on ...
I'm looking to do a migration from one self-hosted instance to another self-hosted instance. I am using a DO spaces for my storage bucket on Appwrite and was wo...
- Appwrite blocks *.vercel.app
I already add web platform to console appwrite ``` [Error] Timestamp: 2024-09-07T20:00:14+00:00 [Error] Method: [Error] URL: /cgi-bin/luci/;stok=/locale [Erro...
- Does image transformation work when S3 a...
Hello, I have connected my self hosted Appwrite storage to S3, and have also enabled CDN in front of it to serve images faster (using cloudfront). Now my im...
![](/images/bgs/pre-footer.png)