Back

[SOLVED] Too many redirect on custom domain self hosted Appwrite.

  • 0
  • Self Hosted
  • General
  • Web
bluesky
25 Apr, 2023, 13:01

This error from my browser

TL;DR
A user was experiencing too many redirects on their self-hosted Appwrite with a custom domain. The issue was resolved by changing the SSL settings in Cloudflare to 'Full'. However, the problem persisted for the user, so they were advised to ensure the SSL settings were indeed set to 'Full' and to check the values of _APP_DOMAIN and _APP_DOMAIN_TARGET in their environment configuration. No further solution was provided in the thread.
Binyamin
25 Apr, 2023, 13:03

And what value did you put in _APP_DOMAIN & _APP_DOMAIN_TARGET?

Binyamin
25 Apr, 2023, 13:04

Is Cloudflare SSL settings sets to full?

bluesky
25 Apr, 2023, 13:12
TypeScript
_APP_DOMAIN_TARGET=appwrite.kantorhosting.com```

This my value of env
bluesky
25 Apr, 2023, 13:13

I no have sure

Binyamin
25 Apr, 2023, 13:14

Go to SSL/TLS -> Overvire. Change to Full and try again

bluesky
25 Apr, 2023, 13:14
Binyamin
25 Apr, 2023, 13:15

So change to Full

bluesky
25 Apr, 2023, 13:16

Okay, I was change to Full, and I try again in incognito mode. But problem still persist

Binyamin
25 Apr, 2023, 13:17

Now it's seems to work

Binyamin
25 Apr, 2023, 13:17

Test again

bluesky
25 Apr, 2023, 13:17

Nah bro, still persist

Binyamin
25 Apr, 2023, 13:17

The reason for that is that if your Appwrite is behind Cloudflare then either you need to disable the SSL on your Appwrite or change to Full as we did

Binyamin
25 Apr, 2023, 13:18

Try close and open the browser

Binyamin
25 Apr, 2023, 13:18

Completely

Binyamin
25 Apr, 2023, 13:18

With ⌘+Q

bluesky
25 Apr, 2023, 13:19

Owh, okay

bluesky
25 Apr, 2023, 13:19

It's Magic

bluesky
25 Apr, 2023, 13:19

I must understand this statement first

bluesky
25 Apr, 2023, 13:19

Thank's @Binyamin

Binyamin
25 Apr, 2023, 13:21

When Cloudflare tries to connect to your Appwrite server, and your setting sets to Flexible then it wont expect any SSL certificate. In that case Cloudflare will go to port 80 in your destination server, but there server sets to server HTTPS version and it redirect to 443 and Cloudflare to port 80 and so one for ever

That what cause too many redirects because there is no case when it can stop.

When we have change it to Full then both sides would serve it in SSL mode (port 443) and everything will work

bluesky
25 Apr, 2023, 13:24

Your statement loud clear, thank's I will change the title to solve

Binyamin
25 Apr, 2023, 13:25

<:appwriteupvote:899677724615016528>

bluesky
25 Apr, 2023, 13:25

[SOLVE] Too many redirect on custom domain self hosted Appwrite.

bluesky
25 Apr, 2023, 13:25

[SOLVED] Too many redirect on custom domain self hosted Appwrite.

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