It’s never good if your server is working fine, but the domains that resolve to it are down for one reason or another. This has happened to me TWICE this year already, and both times it was out of my hands (yes @ENOM, I’m looking at you).
Many of my clients use websites for data storage, and while it’s not nice when one goes down, it’s even worse if you can’t access information you may have saved as part of a web application. Thankfully there is a way to access Plesk websites even if the domain no longer resolves properly.
Let me show you how in this article.
1.) Accessing Plesk without a domain
First let’s gain access to our Plesk server via it’s numeric IP instead of a domain name. Let’s assume that you’ve had access via https://domain.com:8443 before, but domain.com is currently down due to a DNS resolve issue.
In that case, find out your numeric IP and access your Plesk server with https://188.8.131.52:8843 – replacing 184.108.40.206 with the IP of your server. If you can’t remember, login to your domain host’s control panel and find out what it is.
2.) Preparing an external domain that’s still working
We need a domain that still works and is not affected by the DNS outage. It doesn’t have to point to the Plesk server whose domains you want to access, but you need access to the DNS records. Perhaps your domain resolves via CloudFlare or DNSMadeEasy, or even your domain registrar’s control panel.
Let’s call this domain working.com. We must create an A record that looks like this:
Replace your own IP for your Plesk server here, replacing the dots in your numeric IP with dashes. Don’t forget the asterisk in the front so all requests can be redirected properly.
You will also have to supply the IP to your Plesk server with the A record. Don’t worry, this change will not impact on the other services hosted with this domain, we’ll simply make an addition.
One last note: you want this to kick in as soon as possible, so set your TTL to something like 60 rather than 4000. TTL describes the “time to live” in seconds – and we want this emergency preview in place sooner rather than later.
3.) Setting up Plesk with an external Preview Domain
In Plesk, head over to Tools and Settings – General Settings – Website Preview Settings. If you can’t see Tools and Settings, look for the Server Tab.
Define an external preview domain here, like this:
This is designed for customers who want to see their websites before a domain has switched to this server. We’re borrowing this functionality in these troubled times.
Plesk lets you choose a domain from the drop down menu, but assuming none of them are working at this point, our tweaked external domain should work just fine.
Now head over to the customer control panel for a domain that is not resolving on this server. In our example it’s domain.com. Under Websites and Domains, find the Preview option:
Clicking this will open a new browser tab which will attempt to display your website on a URL much like this one:
If all works well you should see your website, all the while bypassing the broken domain, with full PHP scripting capabilities. You can also access subfolders by simply appending them to the URL like this:
Caveat: Subdomains, Permalinks and Redirects
This isn’t a perfect solution, and several things won’t work with this approach. Webmail for one thing, or anything that is accessed as a subdomain (like webmail.domain.com).
Another thing that won’t work is permalinks: all Apache mod_rewrite rules will attempt to turn the URL back into its original state, and this means requests may be redirected to the broken domain.
In addition, web applications like WordPress are usually aware of where they live and you may have to teach them their new (temporary) home URL.
Here’s how you can fix a WordPress site. It will allow you to write new and access existing posts until the DNS problem has been fixed.
Try to login using /wp-login.php instead of /wp-admin. Then head over to Settings – General and tweak the two values for WordPress Address and Site Address by changing them to the temporary Plesk Preview URL (see above).
Before you do, make a note of what these values were before you hit Save. You’ll have to change them back when your real domain resolves again:
Next, head over to Settings – Permalinks and simply click the save button. This will update the .htaccess files so that all mod_rewrites can be redirected to the correct temporary URL.
As soon as the DNS panic is over, change these two URL values back to their original and once again click save under Permalinks.