Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

Possible Duplicate:
Wildcard DNS and subdomains

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.

share|improve this question
add comment

marked as duplicate by mailq, mdpc, longneck, Iain Nov 16 '12 at 18:09

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

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.

share|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
add comment

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