Hosting domains/subdomains across multiple servers

Posted by on Apr 7, 2009 in Web Development | No Comments

Just a quick, but important note about local and remote domains on Unix-type systems when you have a domain that has some functions on one machine and other functions on another machine… don’t forget to set localdomains and remotedomains appropriately.

For example, say you have on Machine A, and on Machine B. Machine A is configured as the main web site and mail server. Some environments (and I’m talking specifically about WHM/cPanel here) will automatically add as local on Machine B. This means that when your scripts (or WordPress blog) running on Machine B try to send email to, it will get stuck on Machine B and never arrive on Machine A.

To avoid this, simply edit your localdomains and remotedomains files on Machine B:

Here you’ll have to remove the entry. Just remove the whole line it’s on.

Here you’ll need to add as an entry. Just add the domain on a line by itself.

And that’s it. =)

Leave a Reply

You must be logged in to post a comment.