Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

So here's the deal:

  • 1 domain (
  • 2 shared hosting plans (for each, all domains and subdomains have the same IP address)

I've already set up to point to the IP (using A) of the second host and it works.

Now what if I want to point to the same host, but different folder? I can't point to the same IP. Is there a way around it? Or do I have to get dedicated IPs for each subdomain on the second host?

share|improve this question
up vote 3 down vote accepted

DNS translates hostnames to IPs, there is no such thing as a different folder DNS-wise. The translation hostname (or more generally: URL) to folder must be done in your webserver configuration. This is called virtual hosting. (Some problems arise if you need https for several names)

share|improve this answer

if you use Apache as a webserver, you have to create different <VirtualHost IPADDRESS:80> configs and direct them into a folder with DocumentRoot /var/www/sub2. Check out /etc/apache2/sites-enabled/default on a linux server and most probably C:\xampp\apache\conf\extra\httpd-vhosts.conf on Windows.

share|improve this answer

There is no reason you cannot point 1000 domains to 1 IP, you just need to configure your web/mail/whatever server to respond to each domain..

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.