Ip:port to domain using cloudflare

This stuff’s a little beyond me, but I was wondering if I could take a site I’m using that’s on my publicip:specificport
and tie a domain to it. (example: www,website.com goes to xxx.xxx.xx.x:port). I am already hosting a site from the same network so port 80 is taken and works great). Will need some guidance on this.

I did find this page: https://support.cloudflare.com/hc/en-us/articles/200169156-Which-ports-will-Cloudflare-work-with-

But I’m not familiar with it. Thanks in advance!

1 Like

Assuming you want to proxy it you could only use the following ports

Right and the port I’m using is actually one of those specific support ports. But I still am not sure how to set it up in the DNS settings. I’m a total noobie when it comes to this

The DNS settings do not involve a port but only the IP address of your server.

Ty for helping so far.

What im trying to figure out is that I have domain1 going to my ip address on Cloudflare (which PC1 at home is hosting a website on port 80) so bam, easy thats done. What I dont understand is that PC2 can’t host on port 80 so I have it hosting on port 2086. Meaning you can go to mypublicip:2086 and it goes to the website. I just want domain2 to go to that specific address if there’s any possible way.

I am not quite sure what setup you’d like to have. Can you draw a quick diagram of what you’d imagine?

Okay thank you for your reply and your help. I’m a complete noob when understanding this so bare with me.

I created this diagram to best explain my situation.

Cloudflare does not support port remapping, so accessing your website on port 80 and expecting Cloudflare to forward that request to port 2086 wont work. What will work is opening your second website directly on port 2086 (and make sure it is served via HTTP, not HTTPS).

Cant you run both websites off of the same server on the same port and simply use virtual hosts to distinguish them?

That’s something I dont know, and definitely beyond me :slight_smile: . So you’re definitely helping me out with your suggestions. I do have two PCs hosting different sites because there is database load on both but thats okay. I just need to find the exact way to point website2.com to the IP of PC2. I for some reason thought it was only doable through port 80. I have the website currently working under publicip:2086. It works just fine but I dont want people to know the ip, just want a domain to go to it . Dont even know if thats possible. On top of that, using SSL is important (https) because it’s a map website which people can use a location finder to find out where they are so it requires those types of things.

website1.com on PC1 works perfect and is using Cloudflares https and SSL tools. Just wish there was a way to do it for PC2. :-/ But that is completely beyond me.

If the database is an issue you can always host both sites on the same machine and simply connect for the second site to the database server on the second machine.

If you cant place both sites on the same machine but need to have them on different servers, and subsequently different ports, you will need to specify that port as well when you open your site via the hostname (website2.com:2086). However also keep in mind, if HTTPS is important to you you should move this away from 2086 to one of the HTTPS supported ports by Cloudflare from the list above.

Thank you for your reply! :slightly_smiling_face:
2086 IS one of the supported ports :slight_smile: thats why i went for it.

so the hostname will always need to have :port in front of the domain? If thats the case, how is it set up on Cloudflare?

The port is not the issue (as long as you are on HTTP) but the omission of it when you try to open website2.com.

Exactly - well, to be precise not in front of the domain but after - unless you change your setup of course.

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