Skip to content
Hosting Operations5 min read

Website Down? 5 Fixes That Actually Work

Fix a website down error fast. Compare disk, DNS, and server causes. Use this checklist to restore service in minutes.

Written by Abdul AbrorTechnical Hosting Support Engineer
Server rack with blinking status lights and a terminal window showing error logs
On this page

TL;DR — Key takeaways

  • Check disk space first; a full partition is the most common cause of sudden website downtime.
  • Verify DNS propagation using `dig` or `nslookup` before blaming the server if the site is unreachable.
  • Restarting the web server (Apache/Nginx) often resolves temporary process hangs without requiring a full reboot.
  • Always back up your database and configuration files before applying any code or server-level fixes.

When a website goes down, panic is the enemy. In my support experience, 80% of outages stem from three simple issues: full disks, DNS misconfigurations, or crashed web server processes.

This guide compares the main causes and provides a side-by-side resolution strategy. You will learn how to diagnose the root cause quickly and apply the correct fix without breaking your setup.

The Three Main Causes of Website Downtime

Most outages fall into one of three buckets. Understanding which bucket you are in saves hours of guessing.

1. Resource Exhaustion: The disk is full, or memory is maxed out. The server is alive, but it cannot write new files or serve requests.

2. Network/DNS Issues: The server is fine, but the domain cannot resolve to the correct IP address. This is often a propagation delay or a typo in the DNS records.

3. Application/Service Failure: The web server (Apache, Nginx, LiteSpeed) has crashed, or a PHP/Node.js process is hanging. The port is open, but no response is returned.

  • Resource issues show high load averages and full partitions.
  • DNS issues show no IP response or a wrong IP.
  • Service issues show connection timeouts or 502/503 errors.

Comparison: Disk Space vs. DNS vs. Service Failure

Let's compare these three scenarios side-by-side to help you identify the culprit fast.

Disk Space: The error is usually a 500 Internal Server Error or a blank page. Logs will show 'No space left on device'. This is a local server issue.

DNS: The error is 'DNS_PROBE_FINISHED_NXDOMAIN' or 'This site can’t be reached'. The server itself is healthy. This is a network resolution issue.

Service Failure: The error is a 502 Bad Gateway or 503 Service Unavailable. The web server is running but cannot talk to the application backend. This is a process management issue.

  • Disk: Check `df -h`. Fix: Delete logs or expand volume.
  • DNS: Check `dig`. Fix: Update records or wait for propagation.
  • Service: Check `systemctl status`. Fix: Restart service or check app logs.

Step-by-Step: Diagnosing Disk Space Issues

Start here. It is the most common and easiest to fix. Log into your server via SSH.

Run `df -h` to see partition usage. If `/` or `/home` is at 100%, your site is down. The web server cannot write session files or logs.

Find the culprit with `du -sh * | sort -h | tail -n 10`. Often, it is old logs in `/var/log` or a large backup file in `/home`.

Delete old logs or move backups to off-site storage. Never delete system files blindly. If you are unsure, truncate the log file with `> /var/log/apache2/error.log` instead of deleting it.

  • Use `df -h` to check partition usage.
  • Use `du -sh *` to find large directories.
  • Truncate logs instead of deleting them to avoid permission issues.

Step-by-Step: Verifying DNS Resolution

If the disk is fine, check DNS. Open a terminal on your local machine.

Run `dig +short A yourdomain.com`. If it returns an IP, DNS is working. If it returns nothing, the record is missing or not propagated.

Compare the returned IP with your server's actual IP. If they don't match, update the A record in your DNS provider's dashboard.

Wait 5-15 minutes. Use `nslookup yourdomain.com` to verify. If it still fails, check if your DNS provider has a service outage.

  • Use `dig +short A` for quick IP checks.
  • Compare returned IP with server IP.
  • Allow 15 minutes for propagation after changes.

Step-by-Step: Restarting Web Services Safely

If DNS and disk are fine, the web server process is likely hung. Check the status first.

Run `systemctl status apache2` (or `nginx`). If it says 'active (running)' but the site is down, the process may be stuck.

Before restarting, check the error log: `tail -n 50 /var/log/apache2/error.log`. Look for 'segfault' or 'out of memory'.

Restart the service with `sudo systemctl restart apache2`. This is safe and will not lose data. If the site comes back, monitor the logs for 10 minutes to ensure stability.

  • Check service status before restarting.
  • Review error logs for segfaults or OOM errors.
  • Restart the service, not the whole server, unless necessary.

Prevention: Monitoring and Alerts

Fixing downtime is reactive. Preventing it is proactive. Set up simple monitoring.

Install a disk usage alert that triggers when usage exceeds 80%. Use a tool like `monit` or a simple cron job that sends an email.

Set up a synthetic monitor that pings your site every 5 minutes. If it fails, get an SMS or email alert immediately.

Keep your server updated. Security patches often fix bugs that cause crashes. Run `apt update && apt upgrade` monthly.

  • Alert at 80% disk usage.
  • Use synthetic monitoring for uptime checks.
  • Apply security updates monthly.

Quick troubleshooting checklist

  • Check server disk usage with `df -h`
  • Verify DNS records with `dig +short A yourdomain.com`
  • Check web server status with `systemctl status apache2` or `nginx`
  • Review error logs in `/var/log/apache2/error.log` or `/var/log/nginx/error.log`
  • Test local connectivity with `curl -I http://localhost`

FAQ

Why is my website down but the server is online?

The web server process may have crashed, or the disk is full. Check the service status and disk usage immediately.

How long does DNS propagation take after a fix?

Typically 15 minutes to 24 hours. You can verify local resolution instantly using `dig` or `nslookup`.

Should I restart the server if the website is down?

Only after checking logs and disk space. A restart is a last resort if the web service is unresponsive.