# Troubleshooting Mysterious Website Downtime: A Case Study on VPS, DNS, and Hosting Expiry

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](https://go.webdevstory.com/namecheap-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.

## 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` and `dig` 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](https://www.webdevstory.com/server-troubleshooting/).
    

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

![DNS propagation check showing missing A records globally](https://miro.medium.com/v2/resize:fit:1400/1*NN-mF1RXOC27IUO8SAeaWA.png align="left")

## Domain Expiry Check

* Used [**WHOIS**](https://who.is/) to confirm the domain was active (not expired).
    
* Verified the **registration details**.
    

## DNS Propagation Check

* Used [whatsmydns.net](https://www.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 / status to confirm the **web server was active**.
    
* Ensured the **firewall wasn’t blocking access**.
    

## 🛠 Step 4: Different Causes for Each Website’s Issue

![Domain name pointing to parked nameservers instead of VPS](https://miro.medium.com/v2/resize:fit:1400/1*RCZleeIff7fLLL37oVnYuA.png align="left")

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:

```bash
 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**.
    
* You must manually set up DNS records if they refuse or delete everything permanently.
    

## 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 misconfiguration.
    

Note: Some links on this page might be affiliate links. If you make a purchase through these links, I may earn a small commission at no extra cost to you. Thanks for your support!
