VJOY
VJOY

Reputation: 3792

How to get domain name from IP address

I have a website hosted on a shared server. When I use DNS.GetHostEntry(IPAddress) function what I am getting is a domain name for shared server (Name server). I want to fetch the actual domain name.

Does anyone have idea about this?

Upvotes: 0

Views: 2139

Answers (2)

blubb
blubb

Reputation: 9910

It's (theoretically) possible, but unlikely for you to work.

What you are looking for is a reverse DNS lookup with multiple PTR records. However, given that you're on a shared server, there are likely more than just your domain, and even if the procedure were working, you'd get a list of many domains, among which you'd have to look for the one you were actually interested in... rendering the whole action pointless.

Upvotes: 1

GazTheDestroyer
GazTheDestroyer

Reputation: 21261

If you are on a shared server, then the IP maps to multiple domain names. There is no "actual" domain name.

Upvotes: 0

Related Questions