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.

If I have two servers, each with their own domain name and I wish to swap those domains so the opposing server recieves it, all I have to change is the @ A records to the other IP, right?

Thanks.

share|improve this question

migrated from stackoverflow.com Aug 11 '11 at 13:24

This question came from our site for professional and enthusiast programmers.

closed as not a real question by MikeyB, Scott Pack, Chris S, Shane Madden, womble Aug 13 '11 at 3:16

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.If this question can be reworded to fit the rules in the help center, please edit the question.

1 Answer 1

up vote 1 down vote accepted

Yes, changing both A records should be sufficient as long as you haven't also defined the MX records by IP instead of hostname. CNAME records are aliased to the A record hostname, so they will automatically follow to the new IP when the A record changes.

If you have Apache virtualhost configs that reference the old hostnames, you will need to change those, of course.

share|improve this answer
    
Okay great, what exactly does the A record do and why do the other records stay the same? –  mcfan42 Aug 11 '11 at 13:15
    
@mcfan42 The A record maps a hostname directly to an IP. If you have CNAME records, those alias other hostnames to the A record so as long as the A record resolves correctly they will as well. If you have defined an MX record by IP address rather than hostname, you would need to change that too. –  Michael Aug 11 '11 at 13:17
    
So basically, all other records will stay the same... only the @ A record needs to be changed to do what I'm trying to achieve? –  mcfan42 Aug 11 '11 at 13:18
    
@mcfan42 It should be enough. It will take a few hours before DNS caches around the world expire and they reach the new IP –  Michael Aug 11 '11 at 13:22
    
sounds good... no need to worry about backing up my servers, right? No concern for losing data? –  mcfan42 Aug 11 '11 at 13:23