Back

Multiple Hostnames(CORS) Possible?

  • 0
  • Self Hosted
  • Tools
  • Web
ORIZON
4 Apr, 2023, 19:21

I have 2 Websites which would have same Appwrite backend. Is it possible to use Multiple Hostname for Connecting both to Appwrite?

TL;DR
The user wants to know if it's possible to use multiple hostnames for connecting two websites to the same Appwrite backend. The solution is to use custom domains in Appwrite, which can be achieved by following the instructions provided in the link: <https://appwrite.io/docs/custom-domains>.
Drake
4 Apr, 2023, 19:30

sorry, you mean multiple hostnames for appwrite? If so, that's what custom domains are for: https://appwrite.io/docs/custom-domains

ORIZON
4 Apr, 2023, 19:51

I have a Main website Eg: main.test.com and boss.test.com.

ORIZON
4 Apr, 2023, 19:52

I can only use one Hostname in Appwrite. For Ex: If I type main.test.com in Hostname in Appwrite. Then There are no CORS error for this Subdomain. But other has that problem.

ORIZON
4 Apr, 2023, 19:53

I used *.test.com

ORIZON
4 Apr, 2023, 19:53

But Its not Working

Drake
4 Apr, 2023, 20:01

wildcard should work for CORS

ORIZON
4 Apr, 2023, 20:06

I'm using google Oauth for the main.test.com and Normal auth for example.test.com.

Drake
4 Apr, 2023, 20:06

that is different. you have a separate thread open for oauth

ORIZON
4 Apr, 2023, 20:06

And only when I put main.test.com as hostname, I get redirected to google login

ORIZON
4 Apr, 2023, 20:07

No the thing is. It was working Yesterday

ORIZON
4 Apr, 2023, 20:08

Can I use different websites for this Instead of Subdomain?

ORIZON
4 Apr, 2023, 20:09

Like test.test.com & Example.example.com

ORIZON
4 Apr, 2023, 20:09

to access the same Appwrite ?

Drake
4 Apr, 2023, 20:09

you can put your front end app wherever you want

ORIZON
4 Apr, 2023, 20:09

But How do I get accross CORS from different websites?

Drake
4 Apr, 2023, 20:10

add a web platform for that website

ORIZON
4 Apr, 2023, 20:12

Both can access the Same DB too?

ORIZON
4 Apr, 2023, 20:12

And all the files?

Drake
4 Apr, 2023, 20:29

yes, of course

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