My Website is Down, Help!
We get this message shortly before people sign up to our hosting đ
Firstly, donât panic. There is a logical explanation for this and there will be a fix once weâve identified the problem.
Lots of things need to happen for your site visitor to view a page on your website.
In this article weâll describe the troubleshooting steps needed to identify the problem and ultimately fix it.
- Is it down for everyone? If the site is down via your desktop, try using your phone â or vice versa. If its available to one device but not the other then the site is probably still up and the problem is local to you and that particular device. Services like https://downforeveryoneorjustme.com/ can also help here.
- Is this unscheduled downtime? Your site may be offline because the hosting provider is performing scheduled maintenance. You may have missed an email about this so its worth checking, along with their service availability page. If its scheduled downtime the site should be up in due course without you having to do anything.
- Similarly, it may be unscheduled downtime but your hosting provider is already all over it so you donât need to panic. Check their ticketing system, Twitter feed or drop them a call/email.
- OK, so now your site is down on multiple devices and the provider isnât saying there is a problem. This is where the detective work begins. The first thing to happen when a web page is requested is a lookup from your site name (www.mysite.com) to an IP address. This is called name resolution, its handled by the Domain Name System (DNS) and its the first chance for someone â or something â to drop the ball. Open up a command prompt, no really, on Windows 10 like this on Mac its called terminal and if youâre on Linux you donât need me to tell you how to do this stuff đ In the prompt type ping www.mysite.com followed by enter and wait a few seconds. If you get numbers and times coming back move onto the next step. However, if you get something like âName or service not knownâ or âHost unreachableâ you likely have a domain or DNS problem. Did you renew the domain? Is your DNS provider up and running? If you canât reach www.mysite.com but you can reach mysite.com then DNS is working but you have a configuration issue. Update your DNS settings to include the www subdomain. Very rarely your machine or local network is âspoofingâ DNS which means youâre getting a different IP address back compared to everyone else. If the site works on your phone but not on other devices it might be a spoofing issue. You need to examine your local hosts file and see if there any lines in there that contain your website address, on a mac its like this.
- So you can ping your domain, that suggests the machine is up although some hosts are setup so as not to respond to ping requests. Can you reach the server via FTP or SSH? If so that confirms the machine is up even if you couldnât ping it. Next things to think about are the web and database servers. Sometimes youâll see a message like âUnable to establish database connectionâ where your homepage should be. In this case the your database server (mysql, SQL server, postgress, etc) is down and you need to restart it. If you have a hosting control panel you can do it there, if you have SSH access do it on the command line otherwise youâll have to ask the hosting company to do it or reboot the entire machine and hope it comes back up. NB if you have determined the database server went down you should try and find out why. Possible causes are Out of Memory and lack of disk space but thats another post for another day.
- At this stage weâve established that the machine us up (ping/FTP/SSH access) and the database server is up and running. Is the webserver (Apache or IIS) up? On Linux system
ps aux
will show you if there any running Apache processes. Before you try restarting Apache, double-check your configuration withapachectl configtest
. If that comes back ok, try restarting Apacheservice apache2 restart
on Linux. you should try and find out why. If your site is now up the webserver was down- why? Possible causes are Out of Memory (quite common, is Apache configured to sue more memory than you have?) and lack of disk space but thats another post for another day. If the configtest failed you need to address this first, typical issues are pointing to digital certificate files in the wrong place.
If youâve worked your way through this list you should now have a reasonable idea of whats going on. Hopefully your site is back up, if its not you can ask for help in a way that will help others help you. Contact your hosting company or give us a call.