Technology in terms you understand. Sign up for the Confident Computing newsletter for weekly solutions to make your life easier. Click here and get The Ask Leo! Guide to Staying Safe on the Internet — FREE Edition as my thank you for subscribing!

Why doesn't accessing a site by its IP address work?

Question:

There is a website [some random service]. Its name is [somerandomservice.com]. Many people seem to access this site just fine,
yet many others just get a blank page. If I PING the site everything looks good. The IP address that PING gives me is
[72.3.249.232]. If I try this IP address in my browser I get a page that says

"If you can see this page, then the people who manage this server have installed cPanel and WebHost Manager (WHM) which use the
Apache Web server software and the Apache Interface to OpenSSL (mod_ssl) successfully. They now have to add content to this
directory and replace this placeholder page, or else point the server at their real content."

But again, the most confusing part is that many people on several soap forums say they have no problems at all accessing this
site - how could this possibly be?

I've changed the site and IP address above, but the idea is the same.

The short answer is that what you're seeing is totally expected. The IP address actually isn't enough to identify the site you
want to go to. That's true for many sites, including the one in the original question and http://somerandomservice.com.

It's also true for http://ask-leo.com.

I'll discuss why.

]]>

If you go to http://somerandomservice.com (it's a real site, I own it), you'll see something like this:

Some Random Service placeholder and demo site

However, if you look up somerandomservice.com's IP address - 72.3.249.232 - and go to http://72.3.249.232 you get something else entirely...

No site here page

The problem, in a nutshell, is shared hosting.

The server at the IP address 72.3.249.232 hosts many web sites (48 as I write this) of which somerandomservice.com is only one. The IP address alone is not enough information to tell that server which site it is you want to see. As a result, the server displays a default page. In my case, I made my own custom page to help direct people to other sites, in your case the default page provided by the server management software is shown.

The same's true for http://ask-leo.com; its IP address, currently 72.32.63.173, will actually end up redirecting you to that same "No Site Here" page above.

When you visit a site using its actual name, like "somerandomservice.com", the IP address is used to locate the server, and then the name you're asking for is also passed along. You can think of that request as being something along the lines of "Hello 72.3.249.232, I'd like to view somerandomservice.com, please". Without the domain name, the request is more like "Hello 72.3.249.232, show me your default site, please". On servers that host only one site, the results may be the same; on others, though, they're likely quite different.

As to why some people can see the site by name and others get only a blank page, I'll refer you to Why can I not access certain web sites? which touches on many of the potential reasons.

Do this

Subscribe to Confident Computing! Less frustration and more confidence, solutions, answers, and tips in your inbox every week.

I'll see you there!

6 comments on “Why doesn't accessing a site by its IP address work?”

  1. Thanks for this article. It does explain several things that very well related to the IP address and the site name. I did download Dr TCP referenced in the related article listed, to tinker with the MTU settings, but unfortunately that did not help for this particular site. It seems like they must have something wrong on their end. Thanks again.

    Reply
  2. Thanks for this article.but i have quastion, what is the information that i need if i want to visit a website using the ip address?

    Reply
  3. When I am trying to go to google.COM from my computer in the Netherlands I am redirected to google.NL. But using the IP address 74.125.127.100 brings me to google.COM. Sometimes the search results are a bit different so I have two bookmarks for Google.

    Reply
  4. So what is the solution rather than being forced to type the entire hostname? Certainly there are some more numbers to direct to the requested page, right? I am guessing that it would be a “/” and extension provided by the webserver, and we would need that information to get it exactly right? But if that is so, isn’t there a way to trace where we are actually going when we DO reach the page we first requested?

    Reply

Leave a reply:

Before commenting please:

  • Read the article.
  • Comment on the article.
  • No personal information.
  • No spam.

Comments violating those rules will be removed. Comments that don't add value will be removed, including off-topic or content-free comments, or comments that look even a little bit like spam. All comments containing links and certain keywords will be moderated before publication.

I want comments to be valuable for everyone, including those who come later and take the time to read.