Add port to DNS record

Hello.
We have a chat service that runs on a port, and we need to add a port to a record to our DNS

So, as I understand it, you have a service running on a different port than the standard ones and you want to access it via the web, correct?

If yes, the functioning of the DNS and its types of entries do not allow this configuration, the DNS translates the domains to IP addresses, then the ports part refers to the structure and functioning of the computer networks themselves.

So if you use a service (I’m guessing it’s a web service) on a port other than port 80 (http) or 443 (https), you’ll have the following options:

  1. Use the service with the port informed at the end, example: yourdomain .app:1515 (where 1515 is the port of your service)

  2. Use a load balancer service that receives requests on standard ports (80 and 443) and forwards traffic to the desired port. I believe port configuration is available in Cloudflare’s own platform, or you can use nginx configured as load balancer/proxy as well.

In short, there is no way to define port for direct access, which is what you want to do by the question description.

By the way, in case I misunderstood and your need is, for example, the configuration of an XMPP server or some other system that uses SRV entries, you can search more about these entries

Best Regards

Cloudflare actually offers Origin Rules, which allow you to specify the port used on the Origin.

2 Likes

This is new to me, thank you

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