502 Bad Gateway on a sub-domain I've tried adding

origin

#1

I’ve tried adding a sub-domain flip.etherace.io to my Cloudflare DNS sectin and point it to my origin servers but it always responds with 502 Bad Gateway. I’m somewhat certain Cloudflare is not the problem, I checked the post What should I do after seeing a 502 or 504 gateway error on my site? and it returns the first of the two pictures. I have opened a ticket and submitted a .har file.

The reason I am asking here is because I’m hoping someone could tell me what could be the possible problem, possibly with my Cloudflare set-up or my origin server. I asked my origin server provider and they said “We think that you still need to add this sub-domain to your DNS because it is not resolving at the moment.” How do you check if a domain is resolving? I’ve used different tools such as ‘nslookup’ (for Windows) and it verifies my record exists for the sub-domain is added correctly. Also I’ve already added my sub-domain to my Cloudflare ‘DNS’ section for four days now so I’m not sure what they mean by adding it to my DNS. I originally created my sub-domain in my cPanel account with my origin server providers.

Please let me know if I can supply any more information on this and thanks for any help!


#2

Also a note, I added the sub-domain in my Cloudflare ‘DNS’ section as an ‘A’ record, should it be a CNAME?


#3

Your Cloudflare setup seems to be fine. flip.etherace.io properly resolves to Cloudflare.

There is most likely an issue on your server’s end. Have you verified it was properly set up for that hostname? You could temporarily disable Cloudflare’s tunnel, so that it directly resolves to your IP address and check in that way. If you dont want to run the risk of your IP being exposed you can also add it to your hosts file at C:\Windows\System32\drivers\etc\hosts (I am assuming you run Windows) by adding the following line (replace the x’s with your IP address)

xxx.xxx.xxx.xxx flip.etherace.io

In that way the host would only locally resolve to your IP and you could check if your server is properly configured. Dont forget to remove the line once everything is working.


#4

Thanks for the response !

I’m pretty sure now that it is an issue on my server’s end. I’ll contact support and verify that I set-up my sub-domain correctly.

When I disabled Cloudflare’s tunnel, I got a 502 nginx error, which I believe means my server is not responding properly. Sadly my providers haven’t been helpful thus far.


#5

It was indeed a problem at my server, and my provider has fixed is now :grinning:, not sure how to close this question but I’ve marked a solution.


#6

This topic was automatically closed after 14 days. New replies are no longer allowed.