Help with Forwarding Rule

Hi I am new to Cloudflare and could use some help to accomplish forwarding my site. Since I am new here they won’t let me post what it thinks fare URL so I am going to do my best to describe this without doing so. Here is what I am trying to do.

When someone visits www mysite com they get forwarded to www mysite com :12345.

I have an A record for www that points to where the ip address of my host. I then have a forwarding rule that says, “If URL matches” www mysite com/ then “Forwarding URL” www mysite com :12345. When I do it this way the site simply times out.

I have also tried forwarding to hostipaddress :12345. This works but the browser then shows you are vising hostipaddress :12345 which I don’t want.

What I do want is for vising www mysite com to forward to www mysite com :12345 without exposing where my site is hosted. If this could be accomplished without exposing the port number that would be great but not a must.

Is 12345 an example or the real port?

The following ports are proxied by Cloudflare:

No it is not a real port I am using. That as just an example of what I want to do. Most of the ports I use are pretty random but the most important thing I wanted was for a user not to have to include a port number in URL and secondary was to reverse proxy the domain. Masking the port number wasn’t a necessity. After some more research it seems that Cloudflare cannot do what I want, at least not with the free account. I ended up setting up a small nginx server at Hetzner to do the reverse proxy functions. Everything is working just as I wanted it now but thanks for taking time to respond.

The main problem ist that if example.com is protected (proxied) by Cloudflare any redirect to other ports than those meintioned above will fail.

Happy to see that you found a working solution. :slight_smile:

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