My website is not working. Is it DNS?
I'm having trouble with my site not loading. How do I know if the issue is related to my DNS settings?
DNS is what points a URL to its proper IP address. You can use something like DNS Checker to lookup your domain name and determine if it is pointing to your server's IP address.
Another useful tool is your /etc/hosts file. You can set tell a specific URL to point to a specific IP for your local computer only. If your site loads after making this change, then it is likely a DNS issue.
On a Mac:
- Open Terminal
sudo nano /etc/hosts
- Add your domain to the end of your /etc/hosts/ file
- Flush your DNS cache
sudo killall -HUP mDNSResponder
On a PC
- Open Notepad as an administrator
- From Notepad, open: c:\Windows\System32\Drivers\etc\hosts
- Add your domain to the bottom of the file and save changes:
If your site now loads on your local computer after making these changes, then it is likely a DNS issue. Check your DNS configuration, especially your A records to ensure that you are pointing them to the proper server, and that they have propagated.
To reverse your /etc/hosts changes, simply reverse the changes made in steps 2 and 3 above.