Error 502 Bad gateway only on certain network


#1

I have 3 sites at Cloudflare, and when I am connected to my home wifi network, all 3 give me a 502 Bad gateway error on all devices and all browsers. When I disconnect from my WiFi and use mobile data all 3 sites load perfectly. What am I doing wrong? Also if I am using WiFi and I request my sites directly from my host, and not CloudFlare they also load.

Here are the 3 sites:
https://imreigyermekrendelo.hu/
https://zambelly.hu/
https://elitance.com/


#2

To me all three are online. The situation you described suspects me of different IPs you get from different ISPs and/or any packet manipulation from internal network to outside of ISP network.
You need to find the problem over WiFi or home ISP.


#3

I don’t know how to solve the problem. Since then some users reported having the same issue when accessing the site. I still get the same message after two days, and can’t access the site at all.


#4

If others face the same problem then you may have problem at your server. At least try clearing your browser cache and cookies and restart server then try connecting to websites from home WiFI. If you have access to a VPN connection try connecting via it. Let us know what is the result.


#5

I tried clearing browser cache and cookies. I don’t have control over the server, I cannot restart it. I tried connecting with Tunnelbear VPN, and if I use the VPN, it loads over my home network too. If I plug my phone into the same PC that showed the error(with no VPN) and share my mobile data connection (with no VPN), it loads perfectly. I also have a subdomain https://ds.zambelly.hu/ that is linked to a different host than my main domain, and that one always shows the 502 Error with or without VPN, mobile data or home netork (altough I might actually have some problems with the host itself on that one).

Edit: I realised that I have a mail subdomain for all 3 domains. Those work on all connections. Now I am also pretty sure that the issue is with the host, but I don’t know what to do or what to ask for at my hosting service.

Edit #2: Now I have a theory: Maybe my host server ip-banned the local CF gateway? When I used TunnelBear’s VPN, I tunneled trough another country, which also means I used another CF gateway, and that solved the problem. I have contacted my hosting company and I am waiting for their reply.


#6

Without access to server there is little to do. Hf you got access to server try disabling firewall first.


#7

I asked the hosting provider if it is possible that their servers blocked CloudFlare, but they said that CloudFlare’s IP ranges are whitelisted.
A few hours later I received a response from CloudFlare, and they say that on their side it looks like the origin server is blocking the requests and they also shared the exact IP addresses that got blocked. Now I forwarded that email to my hosting provider, and I hope they can fix the issue.

Note: In the email I received from CloudFlare they said that the errors were actually 522 and not 502.


#8

Hi, did you fix this error? I am also encountering the same problem.


#9

A post was split to a new topic: Getting 502 error (only on speed tests)


#10

I’m having the same issue, 502 Bad Gateway but it only appears sometimes, I don’t really know where’s the issue…


#11

502 is an issue at your server’s end. If you have access to the logs, you should be able to track down the cause.


#12

I have access to the logs but I’m not able to understand what they say :disappointed:


#13

Maybe your host provider can take a look at them. Just tell them the exact time of the event and the domain.