lets assume I have the subdomains:

a.sheehan.com
b.sheehan.com
c.sheehan.com

i want to map them respectively to

haha.com
lala.com
baba.com

How can I have

a.sheehan.com map to haha.com
b.sheehan.com map to lala.com
c.sheehan.com map to baba.com

With a single A-Record or CNAME?

link|improve this question

60% accept rate
one of them must first exist as an A record in first place so haha.com IN A someip should exist so you can map anything to it afaik. After that you can simple have a.sheehan.com IN CNAME haha.com. perhaps you want to elaborate more your question. – Prix Nov 23 '10 at 4:13
updated my question. – syalam Nov 23 '10 at 4:20
with only a single record? only if they all have the same address, in which you can use a wildcard: *.sheehan.com IN A 1.2.3.4 – jcomeau_ictx Nov 23 '10 at 4:42
your update has no meaning at all, still the same thing as to what you explainned and there is no way to acomplish it as i said above. Even if u use a wildcard unless all your 3 domains are in the same ip and you use mod_rewrite to map the subdomain to the correct place you won't be able to do it. – Prix Nov 23 '10 at 6:26
feedback

1 Answer

First off, A records only point to IP addresses, so that option is right out, as your question is phrased. (People loosely speak about an A record pointing to the canonical hostname of its referent, but it actually only points to the IP.)

For CNAME records, again, no: each maps from one alias name to one canonical name. The only way you could do this, as jocmeau mentioned above, is a wildcard mapping them all to the same canonical name.

Perhaps you could expand your question to explain why you'd want to do this anyhow?

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

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