Back

Domain verification failed Domain hosted on CloudFlare

  • 0
  • General
  • Flutter
  • Web
  • Cloud
omiorop
28 May, 2024, 16:45

i am using Cloudflare to add custom domain in appwrite console i got 3 issue.

  1. Domain Verification failed message
  2. after domain verification failed when i hot the custom domain url its working actully but it redirect to the AppWrite console after login i can see all my projects.
  3. after deploye flutter web added custom domain and all the configuration but got error like this when i logged in in my flutter web project "Access to XMLHttpRequest at 'https://quoteheaven.life/v1/account/sessions/email' from origin 'https://quote-heaven.pages.dev' 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."
TL;DR
Developers are experiencing domain verification issues when using Cloudflare with Appwrite. To resolve this, they can disable proxy, verify the domain, and then re-enable the proxy in Cloudflare's DNS tab. The redirection to the AppWrite console post-login is expected behavior. To address the CORS policy issue, developers should ensure that the web platform matches the hostname of the app and that the project ID is set correctly. Additionally, using a custom domain helps align the base domain, allowing the Appwrite session cookie to be considered a 1st party cookie.
omiorop
28 May, 2024, 16:46

Domain verification failed Domain hosted on CloudFlare

Steven
28 May, 2024, 16:51

Domain Verification failed message

Yes, this is expected because the IP address doesn't match appwrite cloud. It's fine, though because Cloudflare will be generating your certificate and not Appwrite.

it redirect to the AppWrite console after login i can see all my projects.

This is expected and fine.

CORS policy: The 'Access-Control-Allow-Origin' header has a value

Double check you've added a web platform that matches the hostname of your app. Also double check your project ID is set and correct.

'https://quoteheaven.life/v1/account/sessions/email'

One of the biggest reasons why you use a custom domain is so that your app and appwrite will have the same base domain and the appwrite session cookie will be considered a 1st party cookie. so, make sure your prod app will be on the same base domain

D5
28 May, 2024, 16:56

For the domain verification issue you can disable proxy, do verification and enable proxy in cloudflare DNS tab

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