I have a subdomain, let's say it's called service.example.com
. I want to set up this domain to redirect all HTTP(S) (80
and 443
) calls to the apex domain example.com
and the rest of requests to specific TCP port (60000
) to my service. Can I do it with DNS SRV entry?
No, because technically yes (
SRV
records were designed for that), but in practice no, as browsers DO NOT useSRV
records. So you can publish them in your DNS zone, but they won't be used.The newest standard should come out "soon", it will create (they already exist on the field) new DNS records called
SVCB
andHTTPS
for that exact need (including "CNAME at apex" feature, among other things), where browsers already agreed to implement it, and in fact did. That is the path you should be looking at, taking into account there will be a long tail of old clients (not up to date browsers) that won't know how to use those records, so you need to mitigate for that.