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

This is a two part question


I have two domains

  1., with a subdomain (
  2., with no subdomains.

If I create a CNAME of, that points to

Will that work? or do I need to configure anything from the side of things?


if is secured with a wildcard SSL, and someone visits which is just a cname for, will the browser invoke a SSL security warning?

share|improve this question
up vote 4 down vote accepted

Part 1: Yes. A CNAME is just one record, and it is only configured in one place. It doesn't even have to point to a valid name, but you will then get an error when you try to resolve it.

Part 2: If you open a browser to and the certificate says that the name is supposed to be *, then yes, you will get a warning.

You could configure a redirect on your web server to tell everyone coming to, that they should visit instead. But this will only work if they open You will still see a warning if you open the SSL version at though.

share|improve this answer
Is there any way to get the name of the original host. For example if you went to, and it's really a name for, how can I get the string using php? Would it be a $_SERVER variable? – mrc0der Nov 8 '12 at 2:03
Test it out, @mrc0der. Look at the output of phpinfo() for the name. But yes, you are right. It will be the _SERVER["HTTP_HOST"] variable. Also check this: – chutz Nov 8 '12 at 2:48
I have another issue now: I have a that's a CNAME that points to; I also have a that is a CNAME that points to; Now though works fine and shows the content from, but when i go to it shows the content for only, now the subdomain. – mrc0der Nov 10 '12 at 3:12

Part 1

Yes, it will work.

In dns, you need something like follow

    sub1.sub2    IN A     "some IP address"


    sub1.sub2    IN CNAME "some hostname"

Then in, you add the CNAME

    corp         IN CNAME

Part 2

There should be no warning, as SSL is IP base. Following link actually answer in details

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.