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 trial![](https://ecs-static.teamtreehouse.com/assets/views/marketing/shared/community-banner-white-47072046c51352fe6a69f5e691ff5700b28bb11d45197d7bdf066d9ea3f72d0c.webp)
![TJ Bear](https://uploads.teamtreehouse.com/production/profile-photos/412642/micro_tjbearprofile2016.jpg)
TJ Bear
Courses Plus Student 11,869 PointsSo every computer, server, and website each have their own unique IP address, correct?
Is there anything else that has IP addresses? Do emails have IP addresses?
6 Answers
![Jason Anders](https://uploads.teamtreehouse.com/production/profile-photos/3512822/micro_Jason_s-Pic.jpg)
Jason Anders
Treehouse Moderator 145,859 PointsHi TJ, Yes, every device (phones, computers, wireless printers, smart TVs, etc) that connects to the internet has an IP address. Emails, per say, do not; however, the device the email was sent from does and is encoded into the email.
![Nathan Williams](https://secure.gravatar.com/avatar/d1feaf6f13a46beaa7da5f71e77d6998?s=96&d=https%3A%2F%2Fecs-static.teamtreehouse.com%2Fassets%2Fcontent%2Fdefault_avatar-445fbbabfc8dc9188fb5967fe43322ee0c3e0dd1e10f378bf8343784af5a13eb.webp&r=pg)
Nathan Williams
Python Web Development Techdegree Student 6,851 PointsIt's more appropriate to say that every internet-connected device has an IP address, but it's quite routine for several websites to share an IP, or for multiple devices to share a "public" IP via NAT, so I wouldn't say that a website has its "own" IP.
![Jason Anders](https://uploads.teamtreehouse.com/production/profile-photos/3512822/micro_Jason_s-Pic.jpg)
Jason Anders
Treehouse Moderator 145,859 PointsI was under the impression, though, that you can get to any website by typing in its actual IP address.
For example:
https://teamtreehouse.com (Plain English) 173.247.98.20 (IP)
But both will take you to the website. So, I guess, now I'm a little confused. If several websites are sharing an IP how does typing one IPv4 address lead to one specific site? Nathan Williams
![Nathan Williams](https://secure.gravatar.com/avatar/d1feaf6f13a46beaa7da5f71e77d6998?s=60&d=https%3A%2F%2Fecs-static.teamtreehouse.com%2Fassets%2Fcontent%2Fdefault_avatar-445fbbabfc8dc9188fb5967fe43322ee0c3e0dd1e10f378bf8343784af5a13eb.webp&r=pg)
Nathan Williams
Python Web Development Techdegree Student 6,851 PointsWhen multiple web sites share an IP address, the web server (Apache and Nginx are both popular examples) matches the incoming request's "Host" header to the appropriate vhost, or "website".
e.g.
[nathwill@wyrd ~]$ getent hosts teamtreehouse.com
173.247.98.20 teamtreehouse.com
[nathwill@wyrd zones]$ getent hosts shirts4mike.com
173.247.98.20 shirts4mike.com
These share an IP address, but the server uses the Host header of the browser's request to route the request to the appropriate site.
The reason that you end up on teamtreehouse.com when you visit the IP directly, is because we have (very consciously), set teamtreehouse.com as the "default" site for the variety of sites we run, so that requests that don't match a known hostname go to teamtreehouse.com :)
Hope that helps!
![Jason Anders](https://uploads.teamtreehouse.com/production/profile-photos/3512822/micro_Jason_s-Pic.jpg)
Jason Anders
Treehouse Moderator 145,859 PointsThat I didn't know... Thank you! :)
So is it the influx of devices rather than websites that is forcing the roll out of IPv6? ... as the IPs are running out.
![Nathan Williams](https://secure.gravatar.com/avatar/d1feaf6f13a46beaa7da5f71e77d6998?s=60&d=https%3A%2F%2Fecs-static.teamtreehouse.com%2Fassets%2Fcontent%2Fdefault_avatar-445fbbabfc8dc9188fb5967fe43322ee0c3e0dd1e10f378bf8343784af5a13eb.webp&r=pg)
Nathan Williams
Python Web Development Techdegree Student 6,851 PointsYep! That's about the short of it!
![Jason Anders](https://uploads.teamtreehouse.com/production/profile-photos/3512822/micro_Jason_s-Pic.jpg)
Jason Anders
Treehouse Moderator 145,859 PointsThanks much Nathan! I really appreciate you taking the time. :)
![umang ketam](https://secure.gravatar.com/avatar/ac77ed290c2adf0518e902f4369ee25d?s=60&d=https%3A%2F%2Fecs-static.teamtreehouse.com%2Fassets%2Fcontent%2Fdefault_avatar-445fbbabfc8dc9188fb5967fe43322ee0c3e0dd1e10f378bf8343784af5a13eb.webp&r=pg)
umang ketam
510 Pointshi Nathan how could you say that its quite routine for several websites to share an ip address , till now what we have studied along says that each website has its own ip with whose help our client gets the webpage allocated to that ip. with the help of dns so if the a number of websites share same ip so how we get the same webpage we desired to and not the other web pages since they also have the same ip as per ur precious info?? plz help me out sir!
![TJ Bear](https://uploads.teamtreehouse.com/production/profile-photos/412642/micro_tjbearprofile2016.jpg)
TJ Bear
Courses Plus Student 11,869 PointsThanks Nathan and Jason! Very informative.
![Nathan Williams](https://secure.gravatar.com/avatar/d1feaf6f13a46beaa7da5f71e77d6998?s=96&d=https%3A%2F%2Fecs-static.teamtreehouse.com%2Fassets%2Fcontent%2Fdefault_avatar-445fbbabfc8dc9188fb5967fe43322ee0c3e0dd1e10f378bf8343784af5a13eb.webp&r=pg)
Nathan Williams
Python Web Development Techdegree Student 6,851 Pointsmost websites have one or more static IP addresses, but there's no requirement for it. keeping DNS up to date with a dynamic IP address does have implications for DNS, but DNS can be kept up to date using what's called a "dynamic dns" service (more on that here. the point being that DNS is basically a record in a database somewhere, where the key is the hostname, and the value is the address. if the IP changes, you can just update the record, either manually, or via an API if your DNS provider offers one (most of them these days do).
![umang ketam](https://secure.gravatar.com/avatar/ac77ed290c2adf0518e902f4369ee25d?s=60&d=https%3A%2F%2Fecs-static.teamtreehouse.com%2Fassets%2Fcontent%2Fdefault_avatar-445fbbabfc8dc9188fb5967fe43322ee0c3e0dd1e10f378bf8343784af5a13eb.webp&r=pg)
umang ketam
510 Pointshi nathan u r really very informative . can plz elaborate the above concept of static and dynamic dns u r talking about,its a request to you!!
![Stephen Emery](https://secure.gravatar.com/avatar/e11432a558d5042201cfb55de05903e4?s=96&d=https%3A%2F%2Fecs-static.teamtreehouse.com%2Fassets%2Fcontent%2Fdefault_avatar-445fbbabfc8dc9188fb5967fe43322ee0c3e0dd1e10f378bf8343784af5a13eb.webp&r=pg)
Stephen Emery
14,384 PointsA quick note on computers and ip addresses. When a computer is connected to a wifi router, your computer will have a local ip address assigned to it that only your router knows. Your router will have it's own ip address as well on the local network. Then there's an external ip assigned to the Modem connecting you to your ISP (Internet Service Provider). Lastly, there's an ip address or a set of ip addresses your ISP uses. For a lot of personal level customers, the external ip address your box is dynamic and not static*.
It looks something like this: Your computer (192.168.1.4) -> Router (192.168.1.1) -> Modem external ip (206.55.92.10 [made up]) -> ISP public ip (79.119.190.47 [made up])
The IP address the dns sees when you make a request is the ISP's. It's up to your ISP to translate the information back down to you after they get the info. Thankfully this all happens rather fast so you don't notice it.
*Note for gamers: Personal level ISP IP addresses are dynamic making it hard to create network games for multiplayer. It's far easier to use a rpogram like Steam to handle the multiplayer connection, because with dynamic IPs it's impossible for computer to find each other.
![Ryan Shrestha](https://secure.gravatar.com/avatar/96ea13205e079201b588534ddb9c9a16?s=96&d=https%3A%2F%2Fecs-static.teamtreehouse.com%2Fassets%2Fcontent%2Fdefault_avatar-445fbbabfc8dc9188fb5967fe43322ee0c3e0dd1e10f378bf8343784af5a13eb.webp&r=pg)
Ryan Shrestha
4,735 PointsSo, does every website has a static IP Address or Dynamic IP Address? If Website Ip address changes time by time how does DNS knows? I am bit confuse
TJ Bear
Courses Plus Student 11,869 PointsTJ Bear
Courses Plus Student 11,869 PointsSo devices AND websites each have their own IP address, right?
Jason Anders
Treehouse Moderator 145,859 PointsJason Anders
Treehouse Moderator 145,859 PointsThat's correct. In a sense, you can think about websites being a virtual device.
Your computer has an IP. When you launch a browser and try to load a page, the request is sent out with your computer's IP address as the return address (where the webpage should be sent). The request goes looking for the website's address (IP). When it finds it, the website (as a virtual device) is now talking to your computer... sending it's data to compile the website you see on your browser. So, you're device needs an IP so the website knows where to send data, and the website needs an IP so your computer knows where to get the data.
If you have multiple hosts on a one server, the server will have an IP and each site on the server will have an IP. You can think of this as a really big condo complex. The main building (the server) has one address, but every unit inside (the websites) also have their own unique address...