I'm trying to create a domain alias, but I don't really know how to do this. I want all trafic on all ports and all subdomains to be redirected to another domain at the same port with the same subdomain (so any xxx.domain1.com:yy becomes xxx.domain2.com:yy).

Is this possible, and what is the best way to do this? I have full dns and root access to my server, if that's needed.

link|improve this question

possible duplicate of Wildcard DNS and subdomains – mailq Sep 21 '11 at 21:25
feedback

1 Answer

up vote 3 down vote accepted

So then make the A record of xxx.domain2.com point to the IP given as A record of xxx.domain1.com.

link|improve this answer
I have 1 IP for multiple addresses so than I probably need to configure my server some more? And doesn't an A record only directs 1 subdomain? – Tiddo Sep 21 '11 at 20:48
@Tiddo Yes. But where is the problem? Give every subdomain one IP. You can use your IP multiple times. – mailq Sep 21 '11 at 20:56
I don't really know what exactly to configure. Is it enough to add a domain alias in the vhost config file? And I don't want or have each subdomain in my dns. Moreover, the alias domain doesn't 'know' which subdomains the original domain has. Can't I use a wildcard or something like that? Sorry if this is a dumb question but I'm not really a server expert. – Tiddo Sep 21 '11 at 21:16
@Tiddo Yes you can. For all questions. – mailq Sep 21 '11 at 21:19
Ok. Thank you!! – Tiddo Sep 21 '11 at 21:32
feedback

Your Answer

 
or
required, but never shown

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