Running Multiple Websites on a Cloud Server with 1 IP

One of the most commonly asked questions my team receives from customers and prospects is: Can I run multiple websites on a single IP? The answer is yes, you can.

For this example, I will use Apache web server. During the initial configuration of apache, you will need to manage your virtual host file, commonly referred to as vhost. For the techies out there this post will be basic, however, we get a BUNCH of questions around running multiple websites on a single server.

After configuring Apache and creating the root directories for your websites, you will access the vhost file for each domain hosted on your cloud server. This is where you let Apache know where it can find each domain’s root directory. My vhost file for this website looks like this:

It’s a relatively simple process. In our Rackspace Cloud Knowledge Base, we have an article that explains how a vhost works and a more technical post on how to actually configure virtual hosts. Please note the links are for Ubuntu, you can view a conclusive list of all operating systems here.

Now that you know its simple to host multiple domains on a single IP, you may still be wondering about additional IP’s. By default, you get 1 IP address per instance. If you need additional IP’s, justification is needed. That justification would need to be SSL requirements for unique IPs per domain. For this, you can get an additional 4 IPs per instance, for a total of 5. This total is per instance. If you need additional IPs above 5, you would need to provision additional instances.

I hope you found this information useful. If you have additional questions about Cloud Servers or any of the Rackspace Cloud products, please catch us in live chat or give us a call at 1.877.934.0409.

Rack Blogger is our catchall blog byline, subbed in when a Racker author moves on, or used when we publish a guest post. You can email Rack Blogger at


  1. You would think that if someone has a cloud server they would have half a clue about the packages they are running on it.

    What’s next, can I have multiple databases in MySql?

    • HA HA 🙂 I understand why Rackspace publish this article.
      but i would strongly advice anyone who’s running a production Cloud Server at Rackspace and don’t know about Apache, Virutal Hosts and what is does read the Apache docs.

      and think he’s probably should be more concerned about his server’s security and not his 1 IP adsress. because if you run your server with one IP, that means your public IP is also your SSH IP, and that’s a bad advice 🙂

      see “nano /var/log/secure” for more ref.

    • Jon says: >> if someone has a cloud server they would have half a clue

      Maybe someone like me is researching these things, because they don’t know the answer, and wants to learn about multiple site hosting options *before* getting a rackspace cloud. And maybe you’re just a little bit of a prick.

      Jon I sure hope you’re not one of rackspace’s help staff

  2. I dunno – I bet there are a lot of people who have a Cloud Server as a hobby.

    I’m a borderline hobbiest – what I’d like to see an article on is how to setup a cloud server where multiple users can maintain their own websites. I guess it’s the permissions that get me.

  3. Igal, im glad you brought that up. This is a simple issue to overcome. You can disable direct root login to the server and/or change the SSH port number to a non-typical port. You can also edit your iptables accordingly. I’m sure this is not a conclusive list of alternatives, however they should work great. Thanks again for the comment.

  4. 101 Ways to Make Money Online Make Money Online By Automating Websites For Passive IncomeSecond Income Generator for your Life | Second Income Generator for your Life

    […] Running Multiple Websites on a Cloud Server with 1 IP | Rackspace … […]

    • That’s good, but what’s not possible, is to have multiple web sites if one of them needs wild card subdomains with a single IP on Windows Server. For that, a separate IP is needed for each.

      There is some configuration workarounds that can be used to simulate this, but it’s not very neat.

      Unfortunately RackSpace does not recognize having an application that utilizes wildcard subdomains as sufficient justification to be allowed to pay for an extra ip …

      • @Niels – I have multiple subdomains running on my cloud server – create a DNS entry and use a host header. If you need multiple subdomains to the same site (not sure why) you can always add w URL rewrite rule to handle.

        • Hi Don,

          Thanks, but by ‘wildcard’ I mean more than ‘just’ multiple, I mean all. That is the equivalent of host header * (which is not possible in IIS). The supported alternative for Windows is to assign an ip as the host header, without mentioning any specific domain.

          There are many services that use domains like this, in the style of Mine is one of them. No more, I guess :*(

  5. Igal, Mike… for the diehard security paranoid nothing like ssh disabled. The cloud server offers a TTY so once you got your server on production you can simply shut down sshd. Nothing as safe as that.

  6. Hosting multiple sites on a single IP is doable, but not the best solution if you are looking to increase your SERP. It’s not going to help you with your SEO goals, and linking between sites on the same IP’s will get noticed by Google Search Engine spiders. Just a tip! 🙂

    • @Narek, regarding same ip for multiple websites, that is no longer true (though it used to be true), as Google now recognizes that many sites may be on the same IP or set of IPs without being related.

  7. @Mike, nice article, but one note though: if you are running multiple websites in Apache, and any require SSL support, you must have a single IP per SSL certificate/website.

    On the other hand, if you instead drop the bloated Apache, switch to a smarter webserver application such as Nginx (which allows you to maximize the usability of a $10-20/mo Rackspace cloud server), with Nginx you can actually run multiple websites with multiple SSL certificates off of a single IP address, with no errors.

    That helped me out greatly when I found that Rackspace Cloud Server limits you to 5 IPs per server.

  8. Hi All,
    We had been hosting multiple websites (more than 160 web sites) on dual ip address for the past ten years on a physical server and have migrated our entire websites to RackSpace Cloud a few months back.

    All our websites are working fine in the Cloud Environment and it is really stable :D.

    However, we are still in the research state on how to tighten the server to make it even more secure.

  9. This is a great beginner overview.

    I have one caveat/suggestion to add: **NEVER** put a document root inside a public_html folder.

    If you’re using mod_userdir, you will implicitly share all files in a public_html folder. Any virtual-host specific configuration (egauthentication domains) will be *bypassed* if someone accesses the pages via the public_html path, eg, http://host/~demo/ . In general, this is a *bad* practice as it creates two valid access paths with different configurations.

    Also, if you’re not currently using mod_userdir, you may do an apache upgrade later and find it suddenly enabled… and you might not notice. Therefore, you should assume it’s on and protect yourself.

    • One more thing: this is especially bad if you don’t have PHP/Ruby enabled by default. If you enable PHP/Ruby on your virtual host but not in your base httpd.conf, any requests to http://host/~demo/ will *NOT* be parsed by the PHP/Ruby interpreter as mod_userdir uses the base httpd.conf configuration.

      This means your configuration files could be served plain-text, database passwords and all.


Please enter your comment!
Please enter your name here