Ask Leo! by Leo A. Notenboom

How do I translate a URL to an IP address?

Search First! Then browse: Categories | Full Archive | By Date | Newsletter

Home » Networking » Network IP Addressing

Summary: Mapping a domain to an IP address is very easy with several tools, both on your machine and on the internet. I'll look at the two I use.

Is there a tool somewhere to translate from an URL to the IP address? My PC is in a LAN and I would like to find out the IP address (and port number) to a web or ftp site.

There's lots of tools.

Translating from a domain name to an IP address is something your computer has to do each time you access the internet. It's no surprise then that there are several tools in Windows. I'll show you the one I use all the time.

And of course there are even more tools out on the internet.

Let's first clear up a couple of things though.

A "URL" is a full specification to a page. For example:

http://ask-leo.com/who_is_leo.html

Is a URL. It has three parts:

  • The protocol specifier: http:

  • The domain name: ask-leo.com

  • The page location: /who_is_leo.html

The protocol specifies the port that will be used. http, for example, is port 80. ftp uses ports 20 and 21. SMTP, the mail sending protocol, is usually on port 25. You can actually find the full list of "official" ports here.

It's only the domain name that has an IP address associated with it. So that's what you would be looking up.

My approach is to use the "ping" command in a Windows command prompt. For example:

C:\>ping ask-leo.com

Pinging ask-leo.com [72.3.133.152] with 32 bytes of data:

Reply from 72.3.133.152: bytes=32 time=65ms TTL=48
Reply from 72.3.133.152: bytes=32 time=67ms TTL=48
...

All you need is that first line, which tells you exactly what IP address the domain "ask-leo.com" resolves to.

Obviously the ping command does more, but it's easy and a habit I've gotten into for figuring out IP addresses quickly.

If you want a lot more information about a domain, then there are several tools out on the web that are worth looking into. One easy one is samspade.org. A single field into which you enter the domain name you're interested in, press WhoIs and you'll get a report much like this:

Ask Leo WhoIs Info

As you can see it displays the same IP address as above, as well as the registration and contact information about the domain.

There are a couple of catches with this type of lookup:

  • Not all registrars will show up this easily or quickly. Often you'll be redirected automatically or manually to another "WhoIs" lookup service that's hosted by the actual domain registrar.

  • Some folks go to great lengths to hide their domain ownership. Either by registering with false information, or by using a privacy service, the information presented here isn't always exactly what you're looking for. But it's a start.

Related:

Article C3087 - July 15, 2007

Helpful? Get new articles weekly by email in my FREE newsletter!

Your Name:
Your Email:


Why Subscribe?

Recent Comments
9 Comments

If ask-leo.com = 72.3.133.152, how come when I try http://72.3.133.152:80/who_is_leo.html, it doesn't work?

Posted by: Chris at July 15, 2007 10:42 PM

Hi. Is it so that many proxy routers and fire walls filer away ping signals? My computer is inside a company LAN and I can't get a ping answer from anything outside the LAN.
Thanks in advance, Gunnar

Posted by: Gunnar Siréus at July 16, 2007 1:09 AM

But it doesn't tell how many nodes it crosses. This is vital to check the network problems. Just pinging and getting IP is no way a productive. NeoTrace, a software is ideal tool to do this. If it's ping, they must know about tracert too. by the way, you can give them a tip like " ping -t " which will ping the ISP continously and keep the connective alive. It's useful when connection is slowing down or when server is irresponsive.
If ISP's DNS server is lousy, OpenDns.com is very good place to visit all the cached internet.

Posted by: MeroGuff at July 16, 2007 5:34 AM

The reason using the raw IP address in the URL doesn't always work is that there may be more than one website hosted on a given IP. (This is called "virtual hosting".) The webserver software uses the domain name within the URL to determine which site to retrieve.

For example, although "ask-leo.com" resolves to "72.3.133.152", so does "www.pugetsoundsoftware.com". If you use the raw IP on the URL, the webserver has no way of knowing which site you want, and will use some default programmed into it.

Posted by: Ken at July 16, 2007 8:51 AM

As much as I've used ping for network diagnostics, it never occurred to me to use it for simply resolving a domain name. Thanks for the tip.

My tool of choice--habit, really--for resolving domain names is nslookup. It exists specifically to query DNS (Domain Name System) servers.

All of my systems come with nslookup already installed. (I run Windows XP Pro, Mac OS X, Linux, and FreeBSD; just got rid of my last Irix system, which had it, too.)

Posted by: David at July 28, 2007 12:01 PM

thanks ken :)

Posted by: Chris at July 31, 2007 3:02 AM

There are good sources about it on the following link
http://www.whatusearch.net/internet/

Posted by: yilmaz at August 11, 2007 12:03 PM

hi, click this link.. type any url and get the ip address.. http://www.ip-details.com/domain-host-search/

Posted by: constantinum at May 30, 2009 3:50 AM

Post a comment on "How do I translate a URL to an IP address?":






(Email Address will not be published.)

Remember Me?

By popular demand...
my tip jar
Cuppa Joe
Buy Leo a Latte!

(you may use HTML tags for style)

RSS feed Subscribe to the RSS Feed specifically for comments on this article.

Before commenting, please...

Please wait. Your comment is being processed ...


Question? Ask Leo!