Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

As I understand it, an IP address-owner can set up a DNS PTR record for his IP address to map the IP addresses to its host names. There are some things about this I don’t understand. I’ve managed other DNS records often using web based interfaces, but never seen PTR records exposed in those.

A DNS record of type CNAME or A is stored in the DNS zone for a specific domain such as Are the PTR records pointing at typically stored in the same zone or are they stored in separate zones? If the PTR record is stored in the same zone as as, how does other servers know to query this zone for the PTR record?

What stops me from adding a PTR record saying that <ip-address-of-my-server> resolves to, say, If I manage the PTR records for my IP address, shouldn't I be able to add anything?

share|improve this question

or are they stoerd in separate zones?

Separate zones, one per old C network (last byte in the octet).

What stops me from adding a PTR record saying that resolves to say

Nothing. But as this is not used exceptt for nice pings or some email validity checks, you achieved nothing. people will still go to gmail when they type in All people now see is in a traceroute, nothing else.

The one real use for this is smtp - the HELO string given in SMTP should match the PTR record name given. Basically the server must say it is who the ptr record says it is. Note that it can still accept emails for other domains.

share|improve this answer
So I take it that relying on it being correct may be a bad idea. For instance, say I want to make sure only can access my web service. When a client connects to my web service I only have its IP address. I could do a DNS/PTR lookup and then see whether the IP-address matches and only in that case let it call my code. But as I understand you now, this would pretty much make it possible for anyone to call my service, as long as they add the correct PTR record. – Martin May 18 '11 at 9:48
@Martin: Once you've done the reverse lookup you could do a forward lookup. This should match the original IP. If not something dodgy could be going on. e.g. IP address resolves If does not resolve to, then the PTR could be fake. – qbert220 May 18 '11 at 10:44
No, you should NOT. the PTR will map normally to the host name, NOT the domain name you use. A computer can host multiple domains, or a domain be on many computers. Expect the PTR to resolve to the COMPUTER name, not the domain name you connected to. For example, I hsot some domains for customers, and PTR will show www-0001 or www-0002, depending on what computer hosts the domain. – TomTom May 18 '11 at 10:59

If you have a zonefile for with:  300  IN  A

Then you would have a zonefile for with:  300  IN  PTR
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.