host name look up on ip address

Posted on 2014-01-31
Last Modified: 2014-02-03

I am trying below example.

I wonder why got out put 5 different times as below

Which Host:local host
Canonical Host Name:DERBIZZ
Host Address:
Canonical Host
Host Address:
Which #1
Canonical Host
Host Address:
Which #2
Canonical Host
Host Address:
Which #3
Canonical Host
Host Address:
Which #4
Canonical Host
Host Address:

what is difference between cononical host name and host name.
Just as an aside, what happens if we try doing a lookup on a host that doesn't exist, such as: InetAddress.getByName("")? An UnknownHostException is thrown, as shown below.

what is the meaning of host not exists.

please advise
Any links resources ideas highly appreciated. Thanks in advance
Question by:gudii9
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
LVL 13

Accepted Solution

Phil Phillips earned 500 total points
ID: 39825391
You got different a list of results because Google has it set up so that resolves to a whole set of IPs.  This helps Google distribute their load.

In this case, the canonical hostname is the "true" hostname of each particular IP, while the hostname is the original hostname you used for your query.

As for the "host not exists", that's just an example of what happens when you query a hostname that does not resolve.

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
designing in object programming 12 107
hibernate example issues from command prompt 10 64
jboss 7.1 start up error 1 63
Delete .class files at every compile 4 21
I had a project requirement for a displaying a user workbench .This workbench would consist multiple data grids .In each grid the user will be able to see a large number of data. These data grids should allow the user to 1. Sort 2. Export the …
Basic understanding on "OO- Object Orientation" is needed for designing a logical solution to solve a problem. Basic OOAD is a prerequisite for a coder to ensure that they follow the basic design of OO. This would help developers to understand the b…
Video by: Michael
Viewers learn about how to reduce the potential repetitiveness of coding in main by developing methods to perform specific tasks for their program. Additionally, objects are introduced for the purpose of learning how to call methods in Java. Define …
Viewers will learn about the regular for loop in Java and how to use it. Definition: Break the for loop down into 3 parts: Syntax when using for loops: Example using a for loop:

733 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question