Why are domain names occasionally inaccessible?
I could not track down the reason why my domain names occasionally are inaccessible to some visitors. With some I mean some, not everyone. I was working on my website, and at some moment I could not access it anymore. I thought that it's a hosting-related problem. I was getting "website not found" error in my browser. In the same time I could still access the website from a different computer (with different ip address). Problem was gone the next day when I woke up, so unfortunately, I let it go and did not try to find out the reason behind it.
Right now myself and some of my course mates were not able to access our website while some others were able to. Website is now inaccessible to people which it was accessible to earlier.
I was looking through error logs and anything that could be of use in Cpanel. But I was kind of lost.
I don't have extensive knowledge about servers. Which means my reasoning can be faulted. I thought that some visitors could theoretically get ip-banned if they download/upload a lot in a short amount of time. I thought that some defensive mechanism to prevent "spamming" could have worked. However, when I looked in Cpanel I saw that no ip addresses are banned.
Using google made me come across the idea that the problem could be caused by ISP and their DNS service. I found out it is possible to use specific DNS servers, instead of "obtaining DNS server addresses automatically". I changed settings of my connection (specifically, Internet protocol version 4 ) and now I can access my website again. I 'm using opendns.com nameservers now.
This means I have found a fix. But I still don't know why the problem happens in the first place. I shouldn't be asking visitors of my website to change settings of their internet connection.
So, the question is: Why does this happen, and how can I prevent it? If I can?
Edit1: Records in my registrar look like this:
Type IP Hostname Alias MX Preference
NS ns3.website.com
NS ns4.website.com
This sounds like your primary DNS servers are experiencing temporary outages.
When a user requests a DNS record, it gets handed up the chain of DNS servers. First the computer will check if it already has that record cached. If not, it will ask it's DNS server (usually the router). If it has it cached, it returns it, otherwise it asks it's DNS Server - usually the ISP's Server (or OpenDNS in your case). The DNS servers keep passing the request on until (assuming none of them has it cached) it hits your primary DNS Server.
Your primary DNS Server returns either an A-Record (IP Address) or CNAME-Record (other domain name) that points to your server. In your case it's an A Record pointing to 75.126.154.2. The DNS Servers then pass the information back the chain to the user who requested it - caching it for future request.
The cache timeout depends on the server and the TTL you set for your DNS records and is customarily anywhere between 15 Minutes and 12 hours. Your timeout is set to 4 hours.
Now, if your DNS servers go down or are overloaded (this is more common than it should be in private setups or with cheap hosters) it is well possible that a good portion of the Internet will have your DNS Records cached.
Example:
You requested the record before the DNS Server went down. Your router has it cached. Your friend on the same LAN request the page, the record is returned by the router, he can access the page. Another user with the same ISP also request the page, the ISP still has the record cached, he can visit the page.
Then a completely unrelated user request the record. The requests gets passed up from DNS server to DNS server until it finally hits your primary DNS server. Since it is down, the request will time out. The user will not be able to access your page.
Solutions:
1) Move to a more reliable DNS service
2) Host your backup DNS server with a completely different service provider. There are many DNS service providers charging very moderate fees. This way, as long as one of the two stays up, users will be able to access your site.