Host IP address

Get the latest on wired & wireless, talk network setups, get help with connectivity problems, web hosts, etc.
Post Reply
User avatar
jbarrera
n00b
Posts: 17
Joined: Tue Sep 04, 2012 2:28 pm
Location: Laredo,TX

Host IP address

Post by jbarrera » Mon Nov 05, 2012 11:34 am

What does it mean when you can access a webpage by its name but not by its IP address?
I type in.. example.org.. fine, then try its IP address... can't open, tried it from different Pcs and networks... same thing. I want to know how is this accomplished, or if it is a fluke.

Thank You.

psilocybin
Sargeant at Arms
Posts: 191
Joined: Tue Feb 17, 2009 5:27 am

Re: Host IP address

Post by psilocybin » Mon Nov 05, 2012 5:38 pm

maybe a shared host, meaning the server requires the hostname in the MIME header to determine what page you're trying to access because it's hosting several pages with different URLs.

User avatar
jbarrera
n00b
Posts: 17
Joined: Tue Sep 04, 2012 2:28 pm
Location: Laredo,TX

Re: Host IP address

Post by jbarrera » Mon Nov 05, 2012 7:14 pm

Great, he is actually hosting more than one page , so that explains it. Thank you,
So , correct me if i'm wrong, I should get the same I.P address for both sites correct?
Thanks Again.

psilocybin
Sargeant at Arms
Posts: 191
Joined: Tue Feb 17, 2009 5:27 am

Re: Host IP address

Post by psilocybin » Mon Nov 05, 2012 11:08 pm

jbarrera wrote: So , correct me if i'm wrong, I should get the same I.P address for both sites correct?
most likely, I think.

User avatar
Cool_Fire
Not a sandwich
Posts: 1912
Joined: Fri May 09, 2003 1:20 pm
Location: 41 6d 73 74 65 72 64 61 6d
Contact:

Re: Host IP address

Post by Cool_Fire » Tue Nov 06, 2012 5:29 am

This is actually a pretty common thing. Most hosting providers will have hundreds of websites on one machine, usually all with one or a hand full of IP addresses. If this wouldn't be possible, hosting would be very expensive indeed.

If you're interested, you can see this happen when you request a page. (Using something like wireshark or the live http headers plugin for firefox)

When you request a page, you'll see it's something like this:

Code: Select all

GET /pagename.html HTTP/1.1
HOST: www.sitename.com
(usually some more headers and cookie info)
The domain name gets sent with every request so the server knows which site you're requesting the page from.
If we're breaking the rules, then how come you can't catch us? You can't find us? I know why. Cause, it's ... MAGIC!
Hackerthreads chat, where the party is going 24/7.

Post Reply