Question: I need to get DNS configured to point a subdomain from one domain (which I will generally not be controlling) to another subdomain on a different domain name. Testing this process using a simple CNAME entry keeps pointing to the primary domain and not the subdomain where it should be going.

This is the scenario; (newdomain.com is in my control)

  • cdn.xyz.com should display content from this subdomain subdomain.newdomain.com
  • It is instead displaying content from newdomain.com (not the subdomain sub domain)
  • cdn.xyz.com/page.htm displays content from newdomain.com/page.htm although what I need is it to display content from subdomain.newdomain.com/page.htm

Other Background:

  • setup is between two different servers with different IP ranges although DNS cluster is on between all servers
  • the newdomain.com is set up with its own unique IP (which is on the A records for the subdomains, the subdomains work as expected/normal)
  • the DNS entry is correct (cdn CNAME subdomain.newdomain.com.) ie the end period is included
  • a DNS lookup on the CNAME externally reports back as subdomain.newdomain.com. as the record

Does anyone know what DNS entries I am missing to get this working correctly ?

Note: I do not want to just put a redirect between domains as I need the content of subdomain.newdomain.com/content.html to be visible via the URL of cdn.xyz.com/content.html also I can just use some redirects on newdomain.com to achieve what I am after but would prefer to just get the DNS correct.


Current DNS

cdn CNAME subdomain.newdomain.com. || CNAME entry for domain1

subdomain A XXX.XXX.XXX.XXX || A record entry for working subdomain pointing to unique IP

What should happen is that cdn.domain1.com -> subdomain.newdomain.com

What is happening is cdn.domain1.com -> newdomain.com (ie. the root not the subdomain)


Actually if its easier I am trying to emulate a simple cloud setup like Rackspace Containers (which I assume is similar to Buckets on AWS). although it is not for cloud storage

Where a container has a url reference of hd62321678d323.rackspace.com (in truth they are much longer) so I can use a CNAME record of: cdn CNAME hd62321678d323.rackspace.com.

so that http://cdn.mydomain.com/myfile.jpg displays content from http://hd62321678d323.rackspace.com/myfile.jpg

  • Can you edit your question to list the current DNS configuration you have in place? I'm really confused by your question as to what you have in place. A simple CNAME xyz.abc.com -> abc.xyz.com would be perfect. Nov 27, 2012 at 21:26
  • How is it all configured? Kan you show the zone-file or the equivalent? Or at least the SOA-, A- and CNAME records you have entered?
    – Sandokan
    Nov 27, 2012 at 21:28

1 Answer 1


This is not a DNS problem.

You have to tell the web server at address XXX.XXX.XXX.XXX how to handle requests for cdn.xyz.com. See your web server's documentation for (name-based) virtual hosting.

If you are using Apache: http://httpd.apache.org/docs/current/vhosts/name-based.html

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .