Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

When I do reverse DNS queries with IP address that I obtained from DNS query of one website, it shows many different domain names, why is it so? I thought if I do the reverse DNS query I will obtain the domain name which I did with just DNS query. Reverse DNS doesn't work correct or all those names are correct? I don't understand

share|improve this question
    
See github.com/stephane-chazelas/bro-pdns-forward-dns for a way to have the reverse lookup give you the last name you have resolved to that IP address. –  Stéphane Chazelas Dec 8 '13 at 10:17
add comment

1 Answer

The mapping between an IP address and a domain name isn't one-to-one. You can have any number of (possibly completely unrelated) domain names pointing to the same IP address. (And conversely, a given domain name can resolve to several different IP addresses.)

This is perfectly normal, and quite usual.

share|improve this answer
    
Thank you but why it can have any number of domain names pointing the same IP address? I still don't get that –  user54039 Dec 8 '13 at 10:06
    
Because it's very practical. Needing one separate IP address for each and every website out there would be a pain (think hosting sites, VPS, blog platforms and such). Would be a waste of IPv4 space too. –  Mat Dec 8 '13 at 10:09
add comment

Your Answer

 
discard

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