Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

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

I have 2 servers. The MX records are pointing to server1 (which also has webmail on it).
The A record is pointing to server2.
Now if I type in the domain, it takes me to server2.
if I type of the, it takes me to server2 webmail.
I need to create a subdomain to point to server1 webmail.
how do I go about doing this ?

share|improve this question

migrated from Jun 17 '11 at 17:16

This question came from our site for professional and enthusiast programmers.

By subdomain you probably mean:

This is a two-part process. First, in your DNS, create the webmail host in the domain. This should be an A record that points to the IP of server1.

Second, configure the webserver on server1 to respond to requests for hostname You should probably do this by creating a new virtualhost in Apache, setting its ServerName to, and setting its DocumentRoot to the directory where your webmail application is stored. Some more configuration may be necessary but that's hard to tell without more information from you.

Now, browsing to should show the webmail interface.

share|improve this answer

Two possible approaches:

  1. Create another A Record for server2
  2. Create a web redirect on server1 to reroute to server2

Either one or implementing both (your choice) will do what you described.

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.