title: One DocumentRoot, Multiple Domains, Adding www but no htaccess?
body: <p>I have multiple domains pointing to the same folder, but I'd like some to be www and some non-www. Right now something is causing all of them to go straight to the www version and I am not sure why.</p>
  
  <p>I have one VirtualHost setup with ServerAlias for all the domains as such:</p>
  
  <pre><code>&lt;VirtualHost *:80&gt;
      ServerAdmin info@domain.com
      DocumentRoot "c:/Apache24/htdocs/domain1"
      ServerName domain1.com
      ServerAlias www.domain1.com
      ServerAlias domain2.com
      ServerAlias www.domain2.com
      ServerAlias domain3.com
      ServerAlias www.domain3.com
      ServerAlias domain4.com
      ServerAlias www.domain4.com
      ErrorLog  "c:/logs/www/domain1-error.log"
      #CustomLog "c:/logs/www/domain1-access.log" common
      CustomLog "| c:/Apache24/bin/rotatelogs.exe C:/logs/www/domain1/access-%Y_%m_%d.log 86400 -300" combined
      # php version #
      AddHandler fcgid-script .php
      FcgidWrapper "c:/php/php-cgi.exe" .php
  &lt;/VirtualHost&gt;
  </code></pre>
  
  <p>I'd like to figure out why <a href="http://domain3.com/info.php" rel="nofollow">http://domain3.com/info.php</a> goes to <a href="http://www.domain3.com/info.php" rel="nofollow">http://www.domain3.com/info.php</a> and so on.</p>
  
  <p>How can I get it to stay at <a href="http://domain3.com/info.php" rel="nofollow">http://domain3.com/info.php</a> and even get <a href="http://www.domain3.com/info.php" rel="nofollow">http://www.domain3.com/info.php</a> to switch to <a href="http://domain3.com/info.php" rel="nofollow">http://domain3.com/info.php</a> </p>
  
  <p>I'd like to figure out if this in an Apache setting as I understand I can use htaccess to change around www or not, but right now I don't have any htaccess in the DocumentRoot folder and it's still redirecting to www for everything.</p>
  
  <p>Thanks!</p>