Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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.

EDIT

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)

EDIT 2

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

share|improve this question
    
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. –  Brent Pabst Nov 27 '12 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 '12 at 21:28
    
thanks guys will edit it now to make it clearer –  Stephen Nov 27 '12 at 21:42
add comment

1 Answer

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

share|improve this answer
add comment

Your Answer

 
discard

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.