Sub-domain forwarding to url:port

I’m trying to setup a sub-domain to point to my BBS, I’ve added an ‘A’ record and ensured that it points to my proxied public ip address, but it’s not working.

What I would like is sub.domain.extension to redirect to ip_address:port.

Can someone help me with making this work correctly?

Why would you want to do that? You would no longer be using the Cloudflare proxy at that point.

You can change the destination port with an origin rule, which is likely a better option.

Very good question, and the only answer that I have is 'it’s what was suggested to me through internet searches.

I’m not familiar with an Origin Rule, can you tell me more about it, please?

I totally did not see that you had posted a link … looking at that and other info and trying to set it up. Could I maybe DM the settings and see if I did it correctly to you?

1 Like

Better to just share them publicly in this topic. You can edit out part of the IPs or domain names for privacy reasons if you want.

It should be pretty straightforward. You would need a :orange: proxied hostname for which you could then map to whatever port your BBS is listening on using an origin rule.

Perfect, here is what I have:

**My `CNAME` record**
**Type:** *CNAME*
**Name:** ``
**Target:** ``
**TTL:** `Auto`
**Proxy status:** *Proxied* (orange cloud icon)
**My `A` record**
**Type:** *A*
**Name:** ` (cannot set it as`
**IPv4 address:** ``
**TTL:** `Auto`
**Proxy status:** *Proxied* (orange cloud icon)

Origin rule is pretty simple, points to the address with the custom port.

Origin Rule

Custom Filter Expression
Field: Hostname
Operator: equals
Value: bbs.example.Custom


Rewrite To: custom port

Why do you have a CNAME that points to itself? That won’t work. If you are going to use a CNAME, it needs to point to a hostname that resolves to the IP used by the host running your BBS. You could use an A record instead, but you will need to delete the CNAME first. A CNAME may not exist at the same name as any other records. That’s why you cannot add an A record at the same name.

Good to know. The reason why I used a CNAME as well was my own inability to read the whole sentence, and stopped reading within the last two words:

" The following example DNS records configure a hostname pointing to an external hostname and IP address using a CNAME record and an A record, respectively:"

I saw ‘and an A record’ as that it needed both.

Going to make those changes right now.

1 Like
*Type:** *A*
**Name:** `bbs`
**IPv4 address:** ``
**TTL:** `Auto`
**Proxy status:** *Proxied* (orange cloud icon)
1 Like

Is it working as expected?

Unfortunately, no.

I can get it to PING successfully to the proxied IP address, but if I use a telnet application and point it to, it does not resolve.

You neglected to mention that you were using telnet. The Cloudflare proxy only supports HTTP and HTTPS. You will need to find another way.

1 Like

Well that makes sense =)

Sorry that I didn’t include that, which is also the reason why I want to use a custom port so that it’s a bit harder to find and such.

At least I know now that I can’t do it through here … thank you so much for your assistance and guidance with this.

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.