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 a server setup where two sites are virtually hosted. They share the same IP address, of course, and the server runs Plesk to manage the sites.

DNS is setup so that @ A points to the ip address www CNAME is setup to point to That's website one. When you visit or the website for this domain shows up correctly.

website 2:

DNS is setup so that @ A points to the ip address www CNAME is setup to point to Now here is the weirdness. correctly points to the website. However, points shows the website.

Why is this happening and how can I fix it? Not a DNS guru so let me know if you need more information. Thanks!

share|improve this question
up vote 3 down vote accepted

I would suspect that you don't have a ServerAlias setup for within the vhost definition.

<VirtualHost *:80>



and the reason you see the is that it is the first vhost defined and is then the default vhost.

From the comments. Plesk has a www checkbox that will create a suitable ServerAlias if checked.

share|improve this answer
This was the issue. There is a 'WWW' checkbox available when creating a new site. I forgot to check that box and this the ServerAlias directive was not added. Just a heads up to anyone using Plesk and get the same issues. Thanks again! – user658182 Aug 20 '12 at 11:04

Your DNS seems to be correctly set up:

;        IN  ANY



If you run Apache as your web server, I would say that the issue lies within the configuration of the web server.

The reason that the first site works on both names is most likely that it is the first vhost, which causes Apache to default to it if it doesn't have a match.

Try opening the vhost configuration for and add this line


Right underneath the "ServerName" line.

share|improve this answer

If you cannot edit the DNS zones manually (and change the www CNAME record for then you need to submit a ticket to your hosting provider.

I would suspect that a script was used to generate the zone files on creation of the site or account; perhaps it was entered incorrectly or there's a parsing bug of some sort.

share|improve this answer
I have ssh access to the server. Is it possible to check that way? What file would I look at? Cent OS is the OS – user658182 Aug 20 '12 at 10:29
It's very unlikely you would be able to edit the zone files from your SSH access. You're more than likely jailed in your home directory. – gravyface Aug 20 '12 at 11:15

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.