大网数据广告活动
服务器运维问答

DNS SRV for TCP service and HTTP redirection

· 52CE 我爱测

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 m…

问题原文

原帖链接 · sobi3ch · CC BY-SA 4.0

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?

已采纳解答

原帖链接 · Patrick Mevzek · CC BY-SA 4.0

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 use SRV 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 and HTTPS 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.

摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。

资料来源与适用范围

资料来源
Server Fault
适用范围
以原帖系统、软件版本与发布日期为准(2022-08-18)
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY-SA 4.0

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。