Website Down? 7 Fixes That Actually Work in 2026
Fix a website down issue fast. Check DNS, PHP, and disk space. Stop downtime with these 7 practical performance tuning steps and monitoring tips.

On this page
TL;DR — Key takeaways
- Check DNS propagation and server reachability first; 40% of 'down' reports are client-side or DNS cache issues.
- Verify disk space and inode limits before code changes; a full filesystem causes immediate service failure.
- Inspect PHP error logs and web server logs for specific stack traces rather than guessing configuration changes.
- Restart services only after backing up configurations; blind restarts mask underlying resource exhaustion.
- Set up uptime monitoring with 1-minute intervals to detect performance degradation before total outage.
When a website goes down, the first 10 minutes determine whether it’s a minor hiccup or a full outage. In support tickets I’ve handled, the usual culprit is rarely the code itself—it’s resource exhaustion, DNS misconfiguration, or a silent service crash.
This guide walks through seven practical fixes that resolve most 'website down' scenarios. You’ll learn how to diagnose the root cause, apply targeted fixes, and set up monitoring to catch issues before they become outages.
1. Verify DNS and Network Reachability
Before touching server configs, confirm the problem isn’t on the client side or in DNS propagation. Use dig or nslookup to check if the domain resolves to the correct IP address. If the IP is wrong or missing, the issue is DNS-related, not server-side.
Test connectivity from multiple locations. If one location works and another doesn’t, you’re dealing with a regional DNS cache issue or a CDN misconfiguration. Wait for TTL expiration or flush local DNS caches before proceeding to server checks.
- Run: dig +short yourdomain.com A
- Compare the returned IP with your server’s public IP
- Test from a different network or use an online DNS checker
- Check if the domain is registered and not expired
2. Check Disk Space and Inode Limits
A full disk is the most common cause of sudden website downtime. When the filesystem is 100% full, the web server can’t write logs, PHP can’t create session files, and databases can’t commit transactions. The site appears down, but the server is technically online.
Run df -h to check disk usage and df -i to check inode usage. Even if disk space shows 95% free, if inodes are exhausted, the system can’t create new files. Look for large log files, old backups, or unexpected data growth in /var/log or /tmp.
- Run: df -h to check disk usage percentage
- Run: df -i to check inode usage percentage
- Identify large files: du -sh /var/log/* | sort -rh | head -10
- Clear old logs: find /var/log -name '*.gz' -mtime +30 -delete (after backing up)
- Check for orphaned temp files in /tmp and /var/tmp
3. Inspect Web Server and PHP Error Logs
Generic 'website down' reports hide specific errors. Check the web server error log (nginx: /var/log/nginx/error.log, Apache: /var/log/apache2/error.log) for 500, 502, or 504 errors. Each error code points to a different component failure.
For PHP applications, check the PHP error log (often in /var/log/php-fpm/error.log or configured in php.ini). Look for fatal errors, memory exhaustion, or database connection failures. The stack trace will tell you exactly which file and line caused the crash.
- Tail the error log: tail -f /var/log/nginx/error.log
- Search for recent errors: grep -i 'error' /var/log/nginx/error.log | tail -20
- Check PHP logs: tail -f /var/log/php-fpm/error.log
- Look for 'Fatal error', 'memory exhausted', or 'Connection refused' messages
- Correlate error timestamps with when the site went down
4. Restart Services with Caution
Restarting services is a quick fix, but it’s also a band-aid. If the site goes down again after a restart, you’ve masked the root cause. Always back up configuration files before making changes, and note the time of the restart for correlation.
Restart the web server and PHP-FPM in this order: first PHP-FPM, then the web server. This ensures the backend is ready before the frontend starts accepting traffic. Use systemctl for systemd-based systems or service for older distributions.
- Backup configs: cp /etc/nginx/nginx.conf /etc/nginx/nginx.conf.bak
- Restart PHP-FPM: sudo systemctl restart php-fpm
- Restart web server: sudo systemctl restart nginx
- Verify service status: sudo systemctl status nginx php-fpm
- Test the site immediately after restart
5. Check Database Connectivity and Performance
If the web server is running but the site shows a blank page or 'Database connection failed', the issue is in the database layer. Test connectivity from the server using the mysql or psql command-line client. Verify the host, port, username, and password in your application’s configuration file.
Check database resource usage. A slow query or a locked table can cause timeouts that appear as a down site. Use SHOW PROCESSLIST in MySQL or pg_stat_activity in PostgreSQL to identify long-running queries or blocked connections.
- Test connection: mysql -u username -p -h localhost
- Check database status: sudo systemctl status mysql
- Identify slow queries: SHOW PROCESSLIST;
- Check disk I/O for the database: iostat -x 1 5
- Verify database user permissions and host restrictions
6. Monitor Resource Usage and Set Alerts
Prevention is better than reaction. Set up monitoring to track CPU, memory, disk, and network usage. Use tools like Prometheus, Grafana, or your hosting provider’s built-in monitoring dashboard. Configure alerts for thresholds that indicate impending failure.
For example, alert when disk usage exceeds 85%, memory usage exceeds 90%, or CPU load average exceeds the number of cores. These alerts give you time to investigate before the site goes down. Also monitor error rates and response times to catch performance degradation early.
- Install monitoring agent: e.g., node_exporter for Prometheus
- Set disk usage alert: alert when / usage > 85%
- Set memory alert: alert when available memory < 10%
- Set CPU alert: alert when load average > number of cores
- Monitor HTTP 5xx error rate: alert when > 1% of requests
7. Implement a Rollback and Recovery Plan
If a recent deployment caused the outage, roll back to the last known good version. Keep versioned backups of your code and database. A rollback should take less than 5 minutes to minimize downtime. Test your rollback procedure in a staging environment before you need it in production.
Document the incident. Record the timeline, root cause, and resolution steps. This documentation helps prevent the same issue from recurring and provides context for future support tickets. Share the post-mortem with your team to improve processes.
- Keep versioned code backups: git tag v1.2.3
- Keep database backups: mysqldump --single-transaction dbname > backup.sql
- Test rollback in staging before production
- Document incident timeline and root cause
- Review and update monitoring alerts based on findings
Quick troubleshooting checklist
- Verify DNS resolution using dig or nslookup from multiple locations.
- Check server disk usage with df -h and inode usage with df -i.
- Review web server error logs for 500, 502, or 504 errors.
- Check PHP-FPM process status and memory usage.
- Test database connectivity and query performance.
- Verify SSL certificate validity and chain completeness.
- Monitor CPU and memory load averages over 15 minutes.
FAQ
Why is my website down but the server is online?
The web server process may be crashed, PHP-FPM workers are exhausted, or a firewall rule is blocking traffic. Check service status and error logs to identify the specific component failure.
How do I fix a 502 Bad Gateway error?
A 502 error usually means the web server cannot communicate with the backend application. Restart the PHP-FPM service, check for memory limits, and verify the socket or port configuration matches between nginx/apache and the application server.
What should I check first when a website is down?
Start with DNS resolution and basic connectivity. If the server responds to ping but not HTTP, check the web server service status and firewall rules. If the server does not respond at all, check the hosting provider status page and network connectivity.
Related articles
- Hosting OperationsWebsite Down Not Working: 7 Fixes That Actually WorkFix a website down not working error by checking DNS, disk space, and PHP limits. Stop downtime fast with these 7 practical hosting troubleshooting steps.
- Hosting OperationsWebsite Down Error: 7 Fixes That Actually WorkFix a website down error by comparing DNS, server, and code causes. Stop guessing and apply these 7 practical steps to restore uptime fast.
- Hosting OperationsWebsite Down Not Working: 7 Fixes That Actually WorkFix a website down not working error fast. Check DNS, server status, and code errors with these 7 practical steps for hosting owners.
- Hosting OperationsWebsite Down Not Working: 5 Fixes That Actually WorkFix website down not working errors fast. Compare DNS, server, and code fixes to restore uptime in minutes.
- Hosting OperationsWebsite Down Not Working? 7 Fixes [Solved]Fix website down not working errors fast. Check DNS, server status, and code errors with these 7 practical troubleshooting steps.
- Hosting OperationsWebsite Down? 5 Fixes That Actually WorkFix a website down error by comparing DNS, server, and code fixes. Find the fastest solution to restore uptime and prevent future outages.