Site emails state incorrect domain name I have a couple of drupal sites running from the same host, using apache vhosts to do domain name forwarding.

I have many domains/url's dns entries pointing to this server's ip address, some of which are not currently live websites (they fail/default over to my main website).

When a user registers on one of the sites, or the site sends me an email alert, it includes a link at the bottom of the email where I can click and view the user account, etc.

The problem is, it seems the domain/url in the link changes randomly, and is not always the domain/url of the actual site it's from. They are all domains I own and are pointing at the box, so it's like drupal does a DNS lookup on itself, then uses one of the returned domains to include in the email instead of the sitename set in the settings.

How can I fix this so emails will include a link to the proper domain they originated from?
Go to:


  admin>configuration>people>account settings


Scroll down and you will see 8 email options for account activities such as account activation, password recovery, etc..

The Default token inside these emails is [site:name] which I presume is what's giving you trouble? Or do you have it set to [site:url]? 

Regardless possible next steps:


Manually set the link location by adding something like this to the emails ... (kind of hacky)
"http://www.mywebsite.com"
Add HTML functionality to your emails... and then apply above solution with nice html link markup (still hacky)
Try setting a specific domain as your $base_url in sites/default/settings.php. This will disable the dynamic detection of your base domain...
Failing the above investigate further here:- Your Drupal Site Pretending to be Another.