How to make VPS server identify subdomain IP

I am using GoDaddy VPS, server is not identifying the subdomain IP, after enabling cloudflare to my domain.

VPS, server is not identifying the subdomain IP

When a DNS record is “orange-cloud”/proxied on your Cloudflare DNS setting, a Cloudflare IP address will be returned for that DNS record to hide/protect your real server ip from attackers. If you want to verify/validate the real server IP, you may want to temporarily “gray-cloud” the DNS record.

3 Likes

Cloudflare’s Origin CA certificates aren’t valid for normal browsing, they are accepted only by Cloudflare itself. If the record is :grey: it won’t work for normal browsers unless you put a valid certificate (even a free one, like Let’s Encrypt does the part perfectly and is indistinguishable from a paid one).

Thank you matteo… once i faced with self signed SSL issue that’s why i didn’t try with other cerificates. i will try with other cerificate and come back.

If you use Cloudflare’s proxy you can continue using this certificate. If you don’t then you need to switch it…

You are trying to connect to a Cloudflare IP on port 3001, Cloudflare doesn’t support that port on non-Enterprise domains. You need to use one of the support ports: https://support.cloudflare.com/hc/en-us/articles/200169156-Identifying-network-ports-compatible-with-Cloudflare-s-proxy


tried with cloudflare’s HTTP and HTTPS port issue is same only

I do believe there is some issue somewhere else, are you sure you need to connect to the remote host and not localhost?

when i creates a subdomain in cpanel it is creating under main domain ie example.com which is remote host, if i connect to the localhost it will work, but my subdomain api.example.com is the current host , how i replace subdomain with localhost!! if i do that it is not ponting to subdomain

That is not something that has to do with Cloudflare. The server isn’t replying at all. Try removing Cloudflare’s proxy and check the configuration out.

Before enabling cloudflare every thing was working fine.

I feel like you need to connect to port 3001 and the server wants you to connect to that port. You need to change the port on the server, which is the easier and cheaper way to solve the issue.

Not particular about port, i tried with other port numbers as well

You can’t just change the port client side, the server if there even is one and you are not developing locally, but you need to switch the expected port on the server from 3001 to one of the supported ones.

earlier i used 2000, 3000, 9000, 4000 for my subdomains, all those were working fine , after enabling cloudflare tried with same port but it is not working. here problem is with IP, it is keep on changing server is not identifying those multiple IP’s.
Is it works If i install a cloudflare plugin in Cpanel and activate subdomain !!

Those ports aren’t supported by Cloudflare, you need to use one of the supported ones in the article above or disable the proxy. No alternatives.

yes here i tried the cloudflare supported ports. posted same issue in community.

But you still returned to a non-supported port. Configure it to use one of the supported ports then we can discuss things further since the main issue now is the port.

give me some time pls , reproducing the issue using supported ports…

i will come back in 10-15 mins.