Skip to content
Hosting Operations6 min read

Website Down? 7 Fixes That Actually Work [Solved]

Fix a website down issue in minutes. Check DNS, server status, and disk space. Stop downtime with these practical steps for hosting owners.

Written by Abdul AbrorTechnical Hosting Support Engineer
turned-on monitor
On this page

TL;DR — Key takeaways

  • Check if the server is powered on and accessible via SSH or console before assuming a code error.
  • Verify DNS propagation using dig or nslookup to rule out domain resolution issues.
  • Inspect disk usage immediately; a full partition is the most common cause of sudden site failure.
  • Review error logs in /var/log/apache2 or /var/log/nginx for specific 500 or 502 errors.
  • Restart the web service (Apache/Nginx) after clearing temporary files or fixing configuration syntax.

When a website goes down, panic is natural. But the fix is usually one of five common issues: DNS, disk space, service crash, code error, or network block. This guide walks you through each one in order of likelihood.

I’ve handled hundreds of these tickets. The pattern is consistent. Start with the basics. Don’t jump to code changes until you’ve ruled out infrastructure. Here’s how to diagnose and fix a down site quickly.

1. Is the Server Actually Running?

First, confirm the server is powered on. If you have console access, check the power state. If it’s off, power it on. If it’s on but unresponsive, try a hard reboot via the provider’s control panel.

Next, test SSH access. Run 'ssh user@server-ip'. If it times out, the server is unreachable. Check your firewall rules or provider status page. If SSH works, the server is up. Move to the next step.

  • Check provider status page for outages
  • Test SSH connection from a different network
  • Verify IP address hasn’t changed

2. Check DNS Resolution

DNS issues are common after domain transfers or record changes. Use 'dig yourdomain.com A' to check if the domain resolves to the correct IP. If it returns 'NXDOMAIN' or the wrong IP, the issue is DNS.

If DNS is correct, the problem is on the server. If DNS is wrong, update the A record or CNAME at your domain registrar. Wait for propagation (up to 48 hours, though often faster). Use 'dig +trace' to verify propagation.

  • Use 'dig' or 'nslookup' to test resolution
  • Check TTL values for faster propagation
  • Verify domain registrar settings match server IP

3. Check Disk Space Usage

A full disk is the most common cause of sudden site failure. Apache and Nginx cannot write logs or temp files when the partition is full. Run 'df -h' to check usage. If any partition is at 100%, that’s your culprit.

Identify what’s using space. Run 'du -sh * | sort -h' in your web root and /var/log. Clear old logs, delete unused backups, or remove large files. Never delete system files. After freeing space, restart the web server.

  • Run 'df -h' to check partition usage
  • Use 'du -sh' to find large directories
  • Clear /var/log and temp files safely
  • Restart Apache/Nginx after freeing space

4. Review Web Server Error Logs

If the server is up and disk space is fine, check the logs. For Apache, look at /var/log/apache2/error.log. For Nginx, check /var/log/nginx/error.log. Look for recent 500, 502, or 503 errors.

Common log entries: 'Permission denied' (file permissions), 'Syntax error' (config file), 'Too many open files' (resource limit). Fix the specific error. For permission issues, run 'chmod 755' on directories and 'chmod 644' on files. For syntax errors, use 'apachectl configtest' or 'nginx -t' to validate.

  • Check /var/log/apache2/error.log or /var/log/nginx/error.log
  • Look for 500, 502, or 503 errors
  • Validate config with 'apachectl configtest' or 'nginx -t'
  • Fix file permissions if 'Permission denied' appears

5. Test Local Connection

Rule out external network issues by testing locally. Run 'curl -I localhost' on the server. If it returns '200 OK', the web server is working. If it fails, the issue is with the web server process or config.

If 'curl localhost' fails but 'systemctl status apache2' shows 'active', the service may be misconfigured. Check the listen port. Run 'netstat -tlnp | grep 80' to see if Apache is listening on port 80. If not, check the config file for 'Listen 80'.

  • Run 'curl -I localhost' to test local response
  • Check if web server is listening on port 80/443
  • Verify 'Listen' directive in config file

6. Check for Recent Code or Config Changes

If the site was working yesterday and is down today, check what changed. Look at file modification times in your web root. Run 'ls -lt' to see recently modified files. If you deployed new code, roll back to the previous version.

Check for .htaccess or nginx config changes. A single syntax error in .htaccess can take down the entire site. Use 'apachectl configtest' to validate. If you’re using a CMS, check the error log for PHP errors. Disable recent plugins or modules to isolate the issue.

  • Check file modification times with 'ls -lt'
  • Roll back recent code deployments
  • Validate .htaccess or nginx config syntax
  • Disable recent plugins or modules to isolate issues

7. Restart the Web Server

After fixing the root cause, restart the web server to clear cached errors. For Apache, run 'systemctl restart apache2'. For Nginx, run 'systemctl restart nginx'. Wait 10 seconds, then test the site again.

If the site is still down, check the logs again. The restart may have revealed a new error. If the site is up, monitor it for 30 minutes to ensure stability. Set up monitoring alerts for future outages.

  • Restart Apache with 'systemctl restart apache2'
  • Restart Nginx with 'systemctl restart nginx'
  • Test the site after restart
  • Monitor for 30 minutes to ensure stability

Quick troubleshooting checklist

  • Check server power and console access
  • Verify DNS records resolve correctly
  • Check disk space usage (df -h)
  • Review web server error logs
  • Test local connection (curl localhost)
  • Restart web server service
  • Check for recent code or config changes

FAQ

Why is my website down but the server is running?

The web server process (Apache/Nginx) may have crashed due to a configuration error or resource limit. Check the service status with 'systemctl status apache2' and review the error log for specific failure reasons.

How do I know if it's a DNS issue or a server issue?

Use 'dig yourdomain.com' to check DNS resolution. If it returns an IP address, DNS is working. If it fails, the issue is with DNS propagation or records. If it returns an IP but the site is unreachable, the issue is on the server side.

What should I do if disk space is full?

Identify large files using 'du -sh * | sort -h'. Clear log files, delete old backups, or remove unused files. Never delete system files blindly. After freeing space, restart the web server to clear any cached errors.