tags:

views:

234

answers:

2

I'm building a site that will be available on two domains, example.com and example.eu. Currently I have it up and running on example.com (example.eu is HTTP redirected to example.com).

What I need is that both example.com and example.eu point to the same host (atm they don't) - in other words, when you go to http://example.com/somepage.php, the same script is executed as with http://example.eu/somepage.php, without any HTTP redirects.

Which type of DNS record should I use, A or CNAME? (Is there a difference? The articles I've read left me confused. (Can you recommend some DNS tutorial?))

+3  A: 

Either a CNAME or an A record is perfectly fine for this.

In theory an A record might allow for slightly faster resolution, but in practise if you use a CNAME record then the client's recursive DNS server will return the A record in the "additional" section of the response, so long as the A record is already in its cache.

The obvious advantage of the CNAME method is that if the IP address of the canonically preferred name has to change you don't need to change the DNS entries for the other aliases of the name.

Alnitak
A: 

search for DNS howto, it might be abit old, but helped me a couple of years back.

Kalle