Can a DNS Record Include a Port Number for a NAT VPS?
Updated · Autdo Cloud
A normal DNS A or AAAA record does not contain an application port. Pointing a domain to a shared public IPv4 address does not make your assigned high port available as standard HTTP or HTTPS automatically.
What the common records do
An A record returns IPv4 addresses. An AAAA record returns IPv6 addresses. A CNAME aliases one name to another name. None changes the default port chosen by a browser for https:// or http://.
Some applications support SRV records, which can describe service ports. General web browsers do not use SRV to find arbitrary HTTPS ports, so it is not a universal workaround.
Ways to reach the application
If your client supports explicit ports, use a URL such as https://app.example.com:24443. The mapping, TLS certificate and service must all be configured correctly. Alternatively, put a suitable public reverse proxy or ingress service in front of the origin.
Do not point a shared address at an ordinary browser URL and assume that public port 443 belongs to your guest. It may serve another tenant or no relevant service at all.
Check the entire path
Verify DNS resolution, the client's chosen port, the NAT mapping, the guest listener and TLS. If a CDN proxy is enabled, its supported ports and origin routing rules also apply. DNS-only mode and proxied mode are different.
Autdo's NAT product should be planned around assigned endpoints, not an assumption of dedicated IPv4. Review website requirements, Cloudflare port behavior and public reverse proxies.
Reference: RFC 1035: DNS record definitions.