Go Back   HostGator Peer Support Forums > HostGator Announcements > Network Status

Notices

Reply
 
Thread Tools
  #1  
Old 09-12-2005, 09:08 AM
princom's Avatar
princom princom is offline
Baby Croc
 
Join Date: May 2005
Location: Central Florida
Posts: 80
Default Confused about Domain -> IP Address

I know you can access sites of accounts you've set up but have not yet received the domain name by doing the ipaddress followed by the account name like this http://70.84.243.130/~aircurre/ but when I tried http://www.princomcfl.com/~aircurrent/ it didn't get to the page. yet when you ping princomcfl.com you get the same ip address 70.84.243.130 and I always thought that entering the domain is the same as entering the ip address, so what gives?
__________________
Princom: Central Florida Computer and Web Solutions


More Words of Wisdom to Live By from Homer J. Simpson:
"Kids, you tried your best and you failed miserably. The lesson is, never try." - "Beer. Now there's a temporary solution." - "Internet! Is that thing still around?" - "D'oh!" - "Spider Pig, Spier Pig. Does whatever a Spider Pig does. Can he swing, from a web? No he can't, he's a pig. Look oooouuuutt!!! He is a Spider Pig!!"
Reply With Quote
  #2  
Old 09-12-2005, 09:11 AM
MachineDog MachineDog is offline
Royal Croc
 
Join Date: Jul 2005
Location: Somewhere in the everglades.
Posts: 513
Default Re: Confused about Domain -> IP Address

Entering the domain brings you to the IP then the server brings you to the virtual space setup depending on the domain. BTW, that's the IP of the server.
__________________

Reply With Quote
  #3  
Old 09-15-2005, 05:39 AM
jeff_s jeff_s is offline
Baby Croc
 
Join Date: Feb 2005
Posts: 69
Default Re: Confused about Domain -> IP Address

Hi princom-

Your statement that the domain name is the same as the IP address is true when you are talking about simply communicating with the box.
www.pricomcfl.com is resolved to 70.84.243.130 by dns
so if you ping either one you are indeed talking to the same box. And when you web-browse to a url, the request does get to the right box by this mechanism.

But on these shared servers, apache must be set up differently than if it was a web server serving a single domain. Apache must examine each HTTP GET request, which includes the domain name, not just the IP. It does this using a table which maps your domain name to your account name. This table is maintained by cpanel. When you add an account, or add parked or add-on domains, you are manipulating apache's lookup table.

Your request to GET the URL:
http://www.princomcfl.com/
results in apache looking up the domain and sending out the file
/home/princom/public_html/index.html
(assuming here that your account name might be "princom")

Your request to GET the URL:
http://70.84.243.130/~aircurre/
results in apache responding with the file
/home/aircurre/public_html/index.html

But your request to GET the URL:
http://www.princomcfl.com/~aircurre/
results in apache looking up the domain and trying to respond with the file
/home/princom/public_html/~aircurre/index.html
and if such a file does not exist, you'll get a 404

Hope this explains it.

-Jeff_s
Reply With Quote
  #4  
Old 09-15-2005, 08:24 AM
MachineDog MachineDog is offline
Royal Croc
 
Join Date: Jul 2005
Location: Somewhere in the everglades.
Posts: 513
Default Re: Confused about Domain -> IP Address

Very detailed explanation. This should go in the FAQ I think.
__________________

Reply With Quote
Reply

Bookmarks

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

All times are GMT -6. The time now is 03:03 AM.

 
Forum SEO by Zoints