Is it possible for many domain names to share one IP address?

Yes, this is an extremely common practice. It is called a Shared Web Hosting:

In name-based virtual hosting, also called shared IP hosting, the virtual hosts serve multiple hostnames on a single machine with a single IP address. This is possible because when a web browser requests a resource from a web server using HTTP/1.1 it includes the requested hostname as part of the request. The server uses this information to determine which web site to show the user. When you register/purchase your domain name on a particular "registrars name server", your DNS settings are kept on their server, and in most cases point your domain to the Name Server of your hosting provider. This Name Server is where the IP number (currently associated with your domain name) resides.

Any time you have a website that you look up its IP and when you type the IP directly into the browser and you got a different website, you just encountered Shared Hosting.


In fact, this website here uses it. Ping superuser.com or stackoverflow.com and you will get 198.252.206.16 for both. If you type that IP address into your browser, it will not work and you will get an error saying the site does not exist because it did not have a hostname to check and see which site it should serve you.


Shared web hosting is also for the case of different people, each with one or many different domain names, in addition to the cases of one or more different sub-domains.

For example, I have about 30 domain names on a single web hosting account. The files for my "First" domain name are located in the root of my "public_html" folder. This folder is in my "home" directory, so something like: ".../.../username/home/public_html".

And, in the root of this folder are folders for each sub-domain of my "First" domain name. Lets say my "First" domain name is "example.com", and I have some sub-domains. The files will be organized like this:

"example.com"  -->  ".../username/home/public_html"
"a.example.com"  -->  ".../username/home/public_html/a"
"b.example.com"  -->  ".../username/home/public_html/b"
"c.example.com"  -->  ".../username/home/public_html/c"

Plus, there is another folder in public_html for each of my other additional domain names (referred to as "add-on" domains in my hosting).

"domain2.com"  -->  ".../username/home/public_html/somefolder"
"domain3.com"  -->  ".../username/home/public_html/otherfolder"
"a.domain2.com"  -->  ".../username/home/public_html/somefolder/a"
"b.domain3.com"  -->  ".../username/home/public_html/otherfolder/b"

Plus, many other people (perhaps dozens of people), each having a different "username", all have hosting accounts on the same computer, and each of these other users may have one or many domains and sub-domains, with their files organized in a similar fashion.

All of these users, including me, all share the same IP address. If I want, I could pay extra to have one or more unique IP addresses for my domains.

Originally, at least in concept, I believe the internet was setup with each domain name to have a different IP address. I think around the time of HTTP/1.1 this was changed to allow multiple domain names to share a single IP address. This was done then because of the concern of running out of IP addresses.


IPs are scarce. Not only are there no rules that disallow this but it is strongly encouraged. Use of IP addresses must be justified by some kind of need.