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:

  • mydomain.com
  • mydomain.de
  • mydomain.net

My requirements:

All domains, root and www should - as a result open the same website:

  • mydomain.com
  • www.mydomain.com
  • mydomain.de
  • www.mydomain.de
  • mydomain.net
  • www.mydomain.net

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?


AFAIK there's no such thing as URL records within DNS.

What most providers do is that they setup a small webservice that redirect to the wanted destination by setting up an A record pointing to that webservice.

Check with your provider wether or not this is true for them.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.