#_
58 messages · Page 1 of 1 (latest)
To use my own domain as the endpoint for my email and password authentication
And are you using Appwrite Cloud or Self-hosted?
Self hosted
What’s the domain your website is at, and what’s the domain you’re trying to use as your Custom Domain? (Feel free to redact anything sensitive)
My website domain is and i am trying to use appwrite.betathread.com as the custom domain
Ok. What is your _APP_DOMAIN_TARGET set to?
I do not have that set
Ok - so that should be set to the same as your _APP_DOMAIN, and then appwrite.betathread.com should be a CNAME pointing to that
but what actually is the _APP_DOMAIN
_APP_DOMAIN is the domain you use to access your Appwrite Console.
where can i find it in the console
Look in your address bar
ok
i actually made a mistake it is actually appwrite cloud
Ok, so then appwrite.betathread.com should have a CNAME to cloud.appwrite.io
ok thanks but i want to know if it is possible to use a nrmal domain instead of a sub domain
No, as it’s not possible to create a CNAME on a root domain
Why do you want to use the main domain for appwrite?
You should add the domain in the appwrite dashboard/console too
i have created the sub domain but i do not know how to connect to my api end point
You should use the new subdomain as your Appwrite endpoint. So instead of .setEndpoint("https://cloud.appwrite.io/v1"), you'd use .setEndpoint("https://appwrite.betathread.com/v1").
ok
but my auth page is on the main domain betathread.com should i move it to the sub domain
because my actual sub domain is api.betathread.com
Auth page for what - for your app?
You point the subdomain (whether appwrite. or api. - whatever you want) to Appwrite. You can't control anything on there.
i mean the signup and login page they should be on the main domain
Why would they be anywhere else?
when i use my sunbomain like you i said i get this error AppwriteException: Network request failed
Sorry, I really should have asked this earlier - why?
asked what?
Why do you want to use your own domain as the endpoint, instead of cloud.appwrite.io?
Is this with the appwrite. endpoint or the api. endpoint?
because when a user tris to signup for my website it diplays an error
thats why i am trying to use a sub domain and i think the signup page should be in the sub domain so what do you think
the api endpoint
What's the error?
AppwriteException: Netwwork request failedork request failed
When you use .setEndpoint("https://cloud.appwrite.io/v1")??!
the same errotr
So using a Custom Domain is not going to solve that
Probably
let me try it one more time
Could I please see the request in Developer Tools?
Access to XMLHttpRequest at 'https://cloud.appwrite.io/v1/account' from origin 'https://www.betathread.com' has been blocked by CORS policy: The 'Access-Control-Allow-Origin' header has a value 'https://localhost' that is not equal to the supplied origin.
cloud.appwrite.io/v1/account:1
Failed to load resource: net::ERR_FAILED
Ah - have you added www.betathread.com as a Platform in your Console?
In the appwrite dashboard there is a section called platforms. There you should add the domain to prevent CORS error:
no
currently there is not place like platforms it's just projects instead and i alreafy have one with everything setup
Once you select a project, in the overview page there is an integrations section and an add platform button
You don't have that in the overview page?
Specifically it's once you select your project
i have created the platform and added my hostname
it is working now thanks a lot i really appreciate
Do you have your appwrite domain as endpoint too?
Random