I would like to setup DNS records to map multiple domains to one website in a failsafe and clean way. Here's the situation:
I have a couple of domains:
All domains, root and www should - as a result open the same website:
Currently, I have configured A records for each of the above pointing to the according IP. This works well, apart from that cookies cannot be shared among the six, because the browser creates new cookies for each domain. Furthermore, I would prefer to have a 'primary' domain, www.mydomain.com and point all others there, i.e. the displayed URI changes to www.mydomain.com after each of the others is requested by the user.
I am now unsure because I don't know which DNS setup would be correct: I thought about setting up an A record on www.mydomain.com and URL records pointing at www.mydomain.com to the others. This would inlcude an URL record on root domains. I know that CNAME records must not be set on root domains. Is the same true for URL records?
Although I don't suppose so: Do some browsers (i.e. IPad Safari) depend on both URIs (i.e. www.mydomain.com and mydomain.com) to work identically (it seems that IPad redirects www.mydomain.com to mydomain.com or at least displays the URIS accordingly).
As this must be an absolute every day problem: what are the best practices for the scenario?