Would it be easier for me (since I just can't seem to get my websites and email to stay up) to use a DNS service to do this instead of trying to do it with my static IP? I have never completely understood the whole DNS thing or what causes the problems.
Definitely not easier, since Virtualmin could no longer manage your DNS information for you. It might provide more reliable DNS service…but if you actual server is down, you can’t do anything with it anyway, so no point in having DNS.
I’m sure this is something simple. We just need to troubleshoot.
First up, use whois to find out what DNS servers the world thinks are “right” for your domain (hereinafter referred to as a “zone”, as that’s the level at which we’re talking with regard to whois). Look for the section labeled “Domain servers in listed order” or similar. All of the servers listed must have accurate records for your zone, or you will see intermittent failures…if any of those servers are not configured appropriately for providing name service for your zone, you need to remove them from the list. This is done at your registrar (GoDaddy, Gandi, Verisign, etc. whoever you registered your domain with).
Next up check to be sure they’re all answering with the right data:
host example.com ns1.another.com
Where “example.com” is your domain name (we’re no longer talking about zones, since we’re looking up single names), and ns1.another.com is one of the name servers listed in the whois step. Does it return accurate information quickly? If not, it’s gotta be fixed, or removed from the NS list at your registrar.
Next up, make sure the NS records for your zone match what is being served by the registrar:
host -t ns example.com ns1.another.com
You want to see a list of the exact same name servers shown in the whois lookup. If not, you’ll need to fix it in the BIND module. I can walk you through that if there’s a problem.
DNS is pretty simple once you grok the basic concepts…but a lot of folks lose the ball when it hits the registrar. The key issue is that there always has to be a sane path from “the Internet” to “your box”, and any distractions or incorrect data is going to throw a wrench into the picture. Once you understand that “the Intenet” only knows about one set of DNS servers (the “root” name servers) and they only know what name servers are authoritative for zones, and that’s the tiny thread that holds the whole system together…it should become clear that that thread and all of the servers it winds its way through have to have correct data or the end user goes off the path and gets lost. OK, that analogy stretched a little too far.
Just make sure the path from the world to your servers door is well-marked, and DNS won’t keep tripping you up, I promise.
Also, if you’d like to let us know an example of a domain that is having problems, I can walk through those above steps for you, and point out where/if things are going wrong.