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
1 Comment
LVL 12

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

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
strCount chalenge 3 50
mapBully challenge 6 89
Eclipse Neon and jdk 1.8.0 11 72
solarwind tftp server 2 32
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 …
Introduction This article is the second of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers the basic installation and configuration of the test automation tools used by…
Viewers will learn about arithmetic and Boolean expressions in Java and the logical operators used to create Boolean expressions. We will cover the symbols used for arithmetic expressions and define each logical operator and how to use them in Boole…
Viewers will learn one way to get user input in Java. Introduce the Scanner object: Declare the variable that stores the user input: An example prompting the user for input: Methods you need to invoke in order to properly get  user input:

760 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

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now