My web content is hosted by a different company than my DNS records/domains. Let's call the first content host and the second domain host.
The content hoster uses Plesk (v12 on CentOS 7).
I also got a domain there, but I don't want to use it. Let's call this one
My "real" domain at the domain provider is called
Up until now my working setup looked like this:
sub1.realthing.example pointed via A-record to IP-Address of
something.example. That works.
sub2.something.example has content and is working (content is showing in a browser)
What I want to do now:
sub3.realthing.example point to
sub2.something.example and then show the content of
I tried to do this with a CNAME entry but what happens is, that
sub3.realthing.example shows the content of
Checking the reverse-DNS record with dnswatch.info shows the right setup (
sub2.something.example). So it seems that I need to do this at the content provider side to enable Apache to present the correct content. But I don't know how to do this with plesk.
Old post (same meaning):
my domain there is some internal URL (
11-43-223-33.customer.company.example). I configured my real domain (
mydomain.example) at my domain/dns provider to point to the IP-address (
188.8.131.52) of the content server. That works.
Now what I want to do and until now am not able to accomplish:
Using a subdomain (
sub.mydomain.example) to point to a subdomain at my contenthoster (
sub.11-43-223-33.customer.company.example). I used a CNAME entry for that (
Instead of showing the content of
sub.11-43-223-33.customer.company.example when opening
sub.mydomain.example in a browser I got presented with the content of
As commented below, there is content behind
sub.11-43-223-33.customer.company.example which I can access if I open that URL in a browser. So the subdomain at my content provider is up and running by itself.
Is it even possible to accomplish this with Plesk? Do I need to add sth to the Apache config so that it'll work?
sub.11-43-223-33.customer.company.exampleis up and running, I can open it with that URL in any browser. Only won't work with the CNAME
sub.mydomain.example.. that will open the website of
mydomain.exampleinstead. I appended that explanation to the topic, thanks.
mydomain.exampleto the IP-address and now I wish to use a subdomain under the same IP-address. There is no way for the webserver to know that I want to open the subdomain when I just let DNS resolve to the IP address. So I thought "hey, CNAME is the way to go". Perhaps it is just not possible to access a subdomain with another DNS-entry Or I have to use some feature of Apache instead of meddling with DNS?
example.comand another for
sub-domain.example.com. Otherwise, Apache will not be able to match the request in the request header to a location and often provides the first site defined. Depending upon the OS, Apache will install differently. For example, Redhat will be different than Ubuntu. Using a control panel should make this transparent if you use one. What OS do you have? Are you using a control panel?