腾讯云

Reverse DNS:它有什么用?绝对没用?不,但是……

1

Forward DNS is what people usually think of when you setup DNS.  That points from a DNS name to an IP address.

So for example:

example.lowend.party -> 10.20.30.40

That is an example of an IPv4 A record.  Of course, there’s also AAAA records, which are for IPv6:

example.lowend.party -> 2001:db8::25

But what if you want to go in the opposite direction?  You have 10.20.30.40 and you want to know what name is associated with it.  That’s reverse DNS.

10.20.30.40 -> example.lowend.party

Forward DNS says “what IP is associated with this hostname” while reverse DNS is the opposite: “what hostname is associated with this IP”?

Normally, you set forward DNS with wherever you host your DNS.  You might self-host your DNS, or host it with a third-party DNS service, or host it with your registrar.  Assuming you own the domain, you have complete control and can create, modify, and delete forward DNS records at will for that domain.

但是对于 reverse DNS,你必须依赖你的托管服务提供商,因为他们拥有该 IP 地址块。你需要使用提供商的面板来设置 reverse DNS。例如,在 SolusVM 中它就在这里:

何时需要 Reverse DNS

Email: 多年前,我会说如果你的 VPS 正在提供邮件服务,它就是至关重要的。但到了 2026 年,由于送达方面的麻烦,大多数人都在使用第三方电子邮件服务,比如 Amazon SES,或者将电子邮件中继到他们拥有的、使用第三方服务的 VPS 上。但是,如果你想直接从你的 VPS 发送电子邮件,reverse DNS 就是你需要设置的其中一项。当然,你还需要 SPF、DKIM、DMARC、良好的 IP 声誉等。但 reverse DNS 也在清单上。

More Pleasant Logging: Reverse DNS is useful for making logging entries better.  If you’re monitoring or syslog server makes a log entry, do you want it to be for 10.20.30.40 or for example.lowend.party?  The latter makes a lot more sense to the human reading the log.

But Otherwise?  Meh…

True confession: most of my VPSes don’t have reverse DNS set.  Why?  Because for most use cases, it doesn’t matter.

Using the web, ssh, etc. doesn’t need it, so in general, I don’t need it.

But Be Aware…

When a user cancels a VPS and the IP is assigned to a new VPS, often the old reverse DNS isn’t cleared out.  It depends on the panel the provider is using, but I’ve run into this repeatedly over the years.  I’ll create DNS for server.lowend.party, but the reverse DNS shows somethingelse.example.com.

而这还是最好的情况……有时候,前一位用户留下的反向 DNS 可没那么礼貌。

所以,即使你不需要反向 DNS,也值得检查一下它会返回什么。