DNS Question - Backup DNS Entries

We have 2 servers, I'll call them NS1 and NS2.

NS1 is our primary web/email/name server.

My goal is to set up NS2 as a hot backup web/email/name server.

I understand the correct MX entries for NS2, I just give them a lower priority than NS1 and everything should be properly recieved on NS2 and forwarded to NS1 in the event that NS1 is down for a bit.

What I don't understand is how to set up the correct A records on NS2, so that web traffic is pointed to NS1 if it's up and running, and to NS2 if NS1 is down. Or maybe I don't use A records on NS2?

Can anyone help?

 

 

 

 

Top