Plesk-based hosting can often suffer from a resilience problem: failure of the DNS for sites it hosts if the server goes down for any reason.
Ideally a zone should have a number of domain name servers located in different places. A zone is basically a domain and all its sub-domains. The zone record tells other servers where to find everything for that domain – where the websites are, the main servers etc.
Plesk run on a server or virtual server (VPS) generally provides two name servers. They will be configured automatically when websites are set up on the server, and are very convenient to use. Plesk also allows some customisation of the domain records so that, for example, a sub-domain can point to another server, or the mail server points to your office server.
The problem comes when the server running Plesk is down or inaccessible. A mail server trying to send an email to your domain will suddenly find there is no record anywhere of that domain – it has basically dissappeared.
The way around this is to use external name servers. By setting up the external name servers as a slave servers, they can be made to automatically keep themselves updated from your master name servers on your hosting machine.
For our domain, I used www.zoneedit.com to set up a slave for one of our zones. The slave was pointed at our hosting server (using its IP address) and that was it for that end – the zoneedit slave just fetches updates when it is appropriate and updates its own records, putting them onto two geographically-separated name servers of its own.
Back to the domain registration settings, I then needed to add the zoneedit name servers to the domain, giving me four in total (the two on our Plesk hosting and the two on zoneedit). There is no priority assigned to any of these name servers, so a server looking for our website or mail server could go to any of these sources. It is therefore very important to ensure they are all synchronised identically.
One last step was to tell Plesk to allow these name servers to fetch a copy of the zone records. This is not so obvious but is in Plesk under the option:
Server -> DNS Settings -> Common ACL
In here I added the IP addresses of the two zoneedit name servers assigned to my zone, and then the updates simply went ahead.
You can test this works using nslookup command from another server. Create a new sub-domain, then check it can be seen on your Plesk server:
nslookup new.sub-domain.example.com ns.plask-server.example.net
Then try the same command but pointed at the external name server. You will find the external name server cannot see the sub-domain immediately. Try again in an hour – and it should be there. If not, check your setting and TTL etc.
Hopefully that will give you more resilience; even if your website is down, other severs that your zone points to are still locatable.
One thing that I am still looking for a solution to, is domain aliases. A domain alias for a domain set up in Plesk will not get transferred to the slave name server. Even if the alias is a sub-domain of the main domain, it does not get transferred. So the hosting server will correctly return the IP address for example.com for the alias myalias.example.com, but the slave name servers will not. This is not just a problem for when your hosting server goes down, because there is no priority on the name servers – all and any could be used at any time for a server to locate your alias domain, and depending on which name server it hits, it is pot luck as to whether it finds it or not. I’m looking for a solution to this, so any hints appreciated.
I’m also looking for a decent and cheap slave name server service. zoneedit is good and reliable, and easy to use, but could get costly when we have scores of domains to sync up. Any suggestions?