TROUBLESHOOTING

Website Not Loading

Updated: December 2024
13 min read

Website not loading? This comprehensive troubleshooting guide will help you diagnose and fix common issues preventing your website from being accessible.

Quick Diagnostic Checklist

Start with these basic checks:

Common Error Messages

This site can't be reached

DNS or network issue

Connection timed out

Server/firewall issue

502 Bad Gateway

Backend service down

503 Service Unavailable

Server overloaded/maintenance

SSL Certificate Error

SSL/TLS configuration issue

404 Not Found

File/page doesn't exist

DNS Issues

Check DNS Resolution

# Check if domain resolves
nslookup yourdomain.com

# More detailed DNS check
dig yourdomain.com

# Check with specific DNS server
dig @8.8.8.8 yourdomain.com

# Check A record
dig yourdomain.com A +short

Common DNS Problems

DNS Not Propagated Yet

Symptom: Domain doesn't resolve or resolves to old IP

Cause: Recently changed DNS records

Solution:

  • • Wait 1-48 hours for global propagation
  • • Check propagation: whatsmydns.net
  • • Flush local DNS cache (ipconfig /flushdns on Windows)
  • • Access site via IP temporarily

Incorrect DNS Records

Symptom: Domain points to wrong server

Solution:

# Verify current A record dig yourdomain.com A +short # Should show your server IP # If not, update DNS at your registrar: # Type: A # Name: @ # Value: your_server_ip

Missing WWW Record

Symptom: example.com works but www.example.com doesn't

Solution: Add CNAME or A record for www

# Option 1: CNAME (recommended) Type: CNAME Name: www Value: @ # Option 2: A record Type: A Name: www Value: your_server_ip

Web Server Problems

Check Web Server Status

# Check Nginx status
sudo systemctl status nginx

# Check Apache status
sudo systemctl status apache2

# Check if web server is listening
sudo netstat -tlnp | grep :80
sudo netstat -tlnp | grep :443

# View error logs
sudo tail -f /var/log/nginx/error.log
sudo tail -f /var/log/apache2/error.log

Common Web Server Issues

Web Server Not Running

# Start Nginx sudo systemctl start nginx # Start Apache sudo systemctl start apache2 # If fails to start, check configuration sudo nginx -t sudo apache2ctl configtest

Configuration Error

Server won't start due to config syntax error

# Test Nginx config sudo nginx -t # If error, check recent changes sudo nano /etc/nginx/sites-available/yoursite # Fix errors and test again sudo nginx -t # Restart if test passes sudo systemctl restart nginx

Wrong Document Root

Server running but showing wrong content or 404

# Check Nginx config sudo nano /etc/nginx/sites-available/yoursite # Verify 'root' directive points to correct path: # root /var/www/yoursite/html; # Ensure index file exists ls -la /var/www/yoursite/html/index.html

Permission Issues

# Check file permissions ls -la /var/www/yoursite/ # Fix permissions sudo chown -R www-data:www-data /var/www/yoursite/ sudo chmod -R 755 /var/www/yoursite/ # For files sudo find /var/www/yoursite/ -type f -exec chmod 644 {} \;

SSL/HTTPS Errors

Check SSL Certificate

# Check certificate details
openssl s_client -connect yourdomain.com:443 -servername yourdomain.com

# Check certificate expiry
echo | openssl s_client -connect yourdomain.com:443 2>/dev/null | openssl x509 -noout -dates

# Test SSL configuration
curl -vI https://yourdomain.com

Common SSL Issues

Certificate Expired

Let's Encrypt certificates expire after 90 days

# Renew Let's Encrypt certificate sudo certbot renew # Or renew specific domain sudo certbot renew --cert-name yourdomain.com # Test auto-renewal sudo certbot renew --dry-run # Check renewal timer sudo systemctl status certbot.timer

Mixed Content Warning

HTTPS page loading HTTP resources

Solution:

  • • Update all internal links to use HTTPS or relative URLs
  • • Check for hardcoded HTTP links in HTML/CSS/JS
  • • Update database content (for WordPress, use Better Search Replace plugin)
  • • Add Content Security Policy header to upgrade insecure requests

Certificate Name Mismatch

Certificate issued for wrong domain

# Check certificate domains openssl s_client -connect yourdomain.com:443 | grep subject # Obtain new certificate with correct domain sudo certbot --nginx -d yourdomain.com -d www.yourdomain.com

Application Errors

PHP Errors

# Check PHP-FPM status
sudo systemctl status php8.1-fpm

# View PHP error log
sudo tail -f /var/log/php8.1-fpm.log

# Test PHP configuration
php -v
php -i | grep error_log

# Enable error display (development only!)
# Edit php.ini
sudo nano /etc/php/8.1/fpm/php.ini
# display_errors = On
# error_reporting = E_ALL

Database Connection Errors

# Check MySQL status
sudo systemctl status mysql

# Test database connection
mysql -u username -p -h localhost database_name

# Check MySQL error log
sudo tail -f /var/log/mysql/error.log

# Verify database credentials in config file
# WordPress: wp-config.php
# Laravel: .env

Common Application Issues

White Screen of Death

  • • PHP fatal error
  • • Check error logs
  • • Enable error display
  • • Increase PHP memory limit

500 Internal Server Error

  • • Check web server error log
  • • .htaccess syntax error
  • • PHP configuration issue
  • • Insufficient permissions

502 Bad Gateway

  • • PHP-FPM not running
  • • Backend service crashed
  • • Timeout in proxy config
  • • Too many requests

Database Connection Failed

  • • MySQL not running
  • • Wrong credentials
  • • Database doesn't exist
  • • User lacks permissions

Firewall & Network Issues

Check Firewall Rules

# Check UFW status
sudo ufw status verbose

# Check if ports 80 and 443 are allowed
sudo ufw status | grep -E '80|443'

# Allow HTTP and HTTPS if not open
sudo ufw allow 80/tcp
sudo ufw allow 443/tcp

# Check iptables rules
sudo iptables -L -n | grep -E '80|443'

Test Network Connectivity

# Test if port is accessible externally
telnet your_server_ip 80
telnet your_server_ip 443

# Or use netcat
nc -zv your_server_ip 80
nc -zv your_server_ip 443

# Check from another server
curl -I http://your_server_ip
curl -I https://your_server_ip

Pro Tip

Use online tools like "Down for Everyone or Just Me" to verify if your site is down globally or just for you. Sometimes the issue is with your local network or ISP.

Troubleshooting Workflow

1

Identify the Error

What exact error message do you see? Take screenshots if needed.

2

Check Basic Services

Is the web server running? Is the server online? Are ports open?

3

Review Recent Changes

What changed before the site went down? New config? Update? DNS change?

4

Check Logs

Web server error logs, application logs, system logs - what do they say?

5

Apply Fix & Test

Fix one thing at a time. Test after each change. Document what works.

Still Not Working?

Our support team can help diagnose complex website issues 24/7

Get Expert Help

Was this article helpful?

Need help now?

Contact Support