Troubleshooting Website downtime can be a frustrating experience, especially when there’s no clear sign of what went wrong.
Recently, we encountered an issue where two websites hosted on our VPS were behaving differently—one was accessible, while the other was completely unreachable.
This led us on a deep troubleshooting journey to diagnose and fix the problem.
Table of Contents
Initial Troubleshooting Steps for Website Downtime
- Two websites on the same VPS were down—but not in the same way.
- Other websites on the same VPS and the same cPanel account were working fine, resolving correctly, and loading without issues.
- However, one of the downed websites returned an NXDOMAIN error, indicating that its DNS records did not contain the domain name.
- There was no DNS resolution, server response, or immediate explanation for why this happened.
🛠 Step 1: Identifying the Problem
- We first ran
nslookup
anddig
to check DNS resolution. - The NXDOMAIN error meant the domain was not resolving.
- Checked the WHOIS record to confirm domain status and name servers.
- Discovered the domain was using parked nameservers instead of pointing to our VPS.
🛠 Step 2: Ensuring the VPS is Running
Before jumping into DNS-related issues, we verified that our VPS was running. If the VPS itself was down, that could explain why the sites weren’t loading. We ran tests on our server:
- Checked system uptime and resource usage to ensure no crashes or outages.
- Loaded other sites hosted on the same VPS to confirm they were working.
- Confirmed that this was a site-specific issue rather than a server-wide problem.
Since other sites on the VPS were working perfectly fine, we ruled out a VPS failure and focused on investigating domain-specific problems.
🔧 Step 3: Investigating Potential Causes
Domain Expiry Check
- Used WHOIS to confirm the domain was active (not expired).
- Verified the registration details.
DNS Propagation Check
- Used whatsmydns.net to check global DNS resolution.
- Found that the A record was missing everywhere.
Checking Web Hosting & Server Status
- Verified that the VPS was running.
- Checked
apache2
/nginx
status to confirm the web server was active. - Ensured the firewall wasn’t blocking access.
🛠 Step 4: Different Causes for Each Website’s Issue
While both websites had been moved to our hosting environment, they still had some time left on their previous hosting plans, and we leveraged their cPanel zone editor to host them from our VPS.
After diagnosing the problem, we found that both websites had different underlying issues:
- One website’s DNS records were completely removed when the previous hosting provider expired, making it impossible to resolve.
- The other website changed its nameservers, pointing to a location different from our VPS.
Although both websites faced similar downtime issues, the root causes were distinct and required different solutions.
🛠 Step 5: Fixing the DNS Issue
Updating the Nameservers
- Logged into the domain registrar and replaced the parked nameservers with the correct ones from our hosting provider.
- Added an A record pointing to our VPS IP.
Verifying Propagation
- After updating, we waited for DNS changes to propagate.
- Used CLI (
nslookup
,dig
) and online tools to track progress.
Clearing DNS Cache
To speed up the local resolution, we cleared the DNS cache:
sudo systemctl restart systemd-resolved # Linux
ipconfig /flushdns # Windows
🛠 Step 6: When Hosting Providers Delete DNS Records
Why Does This Happen?
- Some hosting companies automatically remove all DNS zone records when a hosting plan expires.
- Even if the domain is registered, the system wipes out the DNS settings, making the website inaccessible.
- Users assume that just pointing the domain to a new hosting provider will work, but without DNS records, nothing resolves.
How to Fix It
1. Contact the Previous Hosting Provider
- If your previous hosting still controls the nameservers, ask them to restore the DNS zone.
- If they refuse or delete everything permanently, you must manually set up DNS records.
2. Manually Add New DNS Records
If the old provider deleted all records, you need to configure them manually:
- A Record → Points the domain to the new hosting IP.
- CNAME Record → For subdomains like
www
. - MX Records → If using email hosting.
- TXT Records → For email authentication (SPF, DKIM).
🚀 Step 7: Confirming the Fix
- After propagation was completed, we reran tests.
- The domain is now properly resolved.
- The website was accessible again.
🔑 Key Lessons from Troubleshooting Website Downtime
- Always check DNS records, WHOIS status, and propagation when facing downtime.
- VPS and DNS issues are not always the same—identify the root cause before applying fixes.
- Hosting providers may delete DNS records upon expiration, so it’s crucial to back up DNS settings.
- Monitor nameservers and A records after domain migrations to avoid misconfigurations.
🚀 Before You Go:
- 👏 Found this guide helpful? Give it a like!
- 💬 Got thoughts? Share your insights!
- 📤 Know someone who needs this? Share the post!
- 🌟 Your support keeps us going!
💻 Level up with the latest tech trends, tutorials, and tips - Straight to your inbox – no fluff, just value!