This error occurs when your domain is not resolving correctly or the web server is not configured properly. Below are common causes and step-by-step solutions.
To check DNS manually:
nslookup yourdomain.com
or
dig yourdomain.com +short
If the IP does not match your server's IP, update your A Record.
If using a third-party DNS provider (Cloudflare, Google DNS, etc.), verify your nameservers.
whois yourdomain.com | grep "Name Server"
If nameservers are incorrect, update them at your domain registrar.
If the domain is resolving correctly but the website does not load, restart Apache/Nginx.
For Apache:
sudo systemctl restart apache2
For Nginx:
sudo systemctl restart nginx
If using Apache, check:
sudo nano /etc/apache2/sites-available/000-default.conf
Ensure:
<VirtualHost *:80>
ServerName yourdomain.com
DocumentRoot /var/www/html
</VirtualHost>
For Nginx, check:
sudo nano /etc/nginx/sites-available/default
Ensure:
server {
server_name yourdomain.com;
root /var/www/html;
}
Restart Apache/Nginx after any changes.
If SSL is misconfigured, your site might not load.
openssl s_client -connect yourdomain.com:443 -showcerts
If you see depth_zero_self_signed_cert, install a valid SSL:
sudo certbot --apache
or for Nginx:
sudo certbot --nginx
Restart the server after installation.
If you made changes but they are not taking effect, flush the DNS cache.
For Windows
ipconfig /flushdns
For macOS
sudo killall -HUP mDNSResponder
For Linux
sudo systemd-resolve --flush-caches
Try reloading your website.
| Issue | Fix |
|---|---|
| Incorrect DNS records | Check nslookup yourdomain.com and update DNS |
| Wrong nameservers | Verify with whois yourdomain.com |
| Web server not responding | Restart Apache/Nginx |
| Incorrect Virtual Host configuration | Check /etc/apache2/sites-available/000-default.conf |
| SSL certificate error | Install with certbot --apache |
| DNS cache not updating | Run ipconfig /flushdns or systemd-resolve --flush-caches |
Now your website should resolve correctly!