views:

38

answers:

0

I had a very strange behavior with my Apache setup and then fixed it, however I would like to understand what really happened. My httpd.conf LOOKED like this:

<VirtualHost *:80>
  ServerName mysite.com
  ServerAlias www.mysite.com
  ...
  <Directory "/path/to/mysite.com">
  </Directory>
</VirtualHost>

=== THEN, I wanted to add a 2nd different host, with the same IP but different domain name, so I added the following after to the file (after the above lines)

<VirtualHost adifferentdomain.com:80>
  ServerName adifferentdomain.com
  ServerAlias www.adifferentdomain.com
  ...
  <Directory "/path/to/adifferentdomain.com">
  </Directory> 
</VirtualHost>

====== THE end result: When you browsed for mysite.com you would see the content from adifferentdomain.com . When you browsed for adifferentdomain.com you would see adifferentdomain.com

So what exactly happened? Was that a standard redirection? Or what exactly was the "understanding" from a regular browser?

My question is because this affected my google ranking dramatically, and I want to know what exactly did Google see.