Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialhelmi al kindy
1,371 PointsIs it possible that .....
One single IP address to host different websites ? E.g: 123.220.255.48 = teamtreehouse.com >> example.com >> someotherexample.com >> soonandsoforth.com
2 Answers
Dennis Balagna
4,948 PointsYes, one single IP can host multiple websites. The server knows what website to send you to at that IP address with the "host" field in the header that is sent in the request by the client.
Marcus Parsons
15,719 PointsHey Helmi,
IP addresses are unique identifiers that vary per computer/server/device and are never repeated. No two computers/servers/devices can have the same IP address. A good analogy of this is to think of IP addresses like house addresses but each with only person or company living at that particular address. If I wanted to send mail to "203 Main Street New York, New York 10001" but that address belonged to "Team Treehouse" and "Example" and "Some Other Example" and "So On And So Forth" and had a bunch of other names associated with it, it would be confusing as to who I wanted my mail sent to. There would also be cases of getting someone else's mail you didn't want and so on and so forth. And that's why IP addresses are made unique so that data cannot get mixed up out in the internet.
helmi al kindy
1,371 PointsThanks
Marcus Parsons
15,719 PointsYou're welcome, Helmi.
Artyom Silivonchik
935 PointsIt's not answering the question.
One IP address can host (better word "belong to") several sites. If you need more info - please read about "shared hosting" it's a very wide spread practice.
Julian Williams
1,022 PointsWell, not really, Marcus ("...like house addresses but each with only person or company living at that particular address"). Just as one house address may have several individuals residing therein, so may a single individual living at an an address have several web-connected devices, each of which (as you yourself say) have separate, unique IP addresses.
Joseph O'Donnell
1,449 PointsSo would it be correct that every device I may be using at my home (on the same wireless network/same modem) will have a distinct IP Address? Does this change if there is a LAN in place? Will each computer in the same local area network have its own IP address as well?
removericcardodedomenico
Courses Plus Student 961 Pointsremovericcardodedomenico
Courses Plus Student 961 PointsHi Dennis, may I ask you what do you mean by "host reader"?
Dennis Balagna
4,948 PointsDennis Balagna
4,948 PointsRiccardo, I am talking about the host field of the HTTP header. You can view a list of the different fields of the HTTP header at (https://en.wikipedia.org/wiki/List_of_HTTP_header_fields)
I've slightly modified my original answer to add a little clarity.