Django site - too many redirects

simon-ccomsFREE

a month ago

I am testing Railway for our Django site but when I go to my custom domain, it says the page isn't redirecting properly and the logs show lots and lots of 301 redirects.

The public networking docs on Railway suggest that it's something to do with Cloudflare but I'm not sure what that is and I don't think I'm using it.

Any other ideas?

Solved

7 Replies

a month ago

Make sure your SSL/TLS is set to Full on Cloudflare


simon-ccomsFREE

a month ago

But I don't think I'm using Cloudflare. I've certainly never set anything up on there myself.


a month ago

Oh sorry i misread your original question, mind sharing your website's domain, it'll help me understand what's going on


simon-ccomsFREE

a month ago


a month ago

I'm thinking something within your app itself is doing that, because it does seem to me like the responses are originating from your deployment

Your app is basically telling the request that the origin moved and the new origin is somewhere else but it redirects to the same location, resulting in a loop which ultimately results in too many redirects


simon-ccomsFREE

a month ago

That was it - a load of SSL settings from the existing deployment that are needed for the current server to work but not for Railway! Not sure how I missed them but your comment helped me focus my energies, so thanks!


a month ago

Awesome, happy I could help Best of luck


Status changed to Solved dev about 1 month ago


Django site - too many redirects - Railway Help Station