CNAME or A record? (mirroring)

Hello! I have a domain ( that is fully hosted on DreamHost. A second domain ( is registered and hosted at other providers. I would like migrate domain-b to mirror domain-a and serve up the content that is here at DreamHost, so that http:/ will be preserved in the URL address bar but will serve up the exact same content that is at http:/ - and so on and so on for resolving every URL for which there is DH content for Domain A. I don’t want it to redirect, so I think I mirroring is the way to go.

I’d like to set this up without fully hosting DNS for Domain B at DreamHost, because I want to preserve the current MX mail delivery routing.

I think I need to set up a CNAME or A Record at the registrar for Domain B, but I don’t know which route to take given that DreamHost uses virtual hosting. I don’t know how this affects the IP addresses used by an A Record.

Any advice? Is this pretty straightforward?

Well, actually no it is not.

The nameservers run on a set of “tables” consisting of multiple records of various types. That is pretty easy. However, when you look at the nameserver, say the granddaddy of UNIX nameservers called “bind”, and its tables you can tell that the names in the tables are relative to the domain. There is a file for each domain and everything about that domain is in that file.

The problem is that you can put a CNAME (or Cannoical Name, aka “alias”) record into the tables. It is legal to say that “” is the same as “” or “” is the same as “” which is the same as “” and “”.

It is NOT legal to say “” is the same as “” because “” is not in the same domain as “”. You can’t put a name into “”'s table for the “” domain.

That is where the redirect comes into play. The redirect is really something that the web server gives the web browser when it wants a page. Say that your page reference is to and you want the “index.html” page. Well, you tell the web server on that the index.html page is to be redirected to’s index.html page. That is legal. It is legal because what goes back to the web browser is an error code that you have either temporarily or permanetly moved the web page “index.html” from to The web browser will then re-request the page from

A temporary relocation does not change the page reference. It would still say that the page is located at

A permanent relocation will change the page reference on the browser line.

But, in no case can you put into either nor nameserver tables a cross-domain reference and have it work because all of the domain references in the table are relative to the one domain that is being described.

This does not apply to service references such as the MX records. Those point to whole names; but you did not ask about email servers.