If your website has been hacked, contact your hosting provider, change every password connected to the website from a device you trust, and ask for the website to be taken offline if it is sending visitors to harmful content. Then restore a clean backup from before the hack, update everything the website runs on, and check the Security issues report in Google Search Console. If customer data may have been exposed, take advice on your legal obligations straight away.
How do I know my website has been hacked?
Signs of a hacked website include pages you did not create appearing in Google's results for your website, visitors being redirected elsewhere, browser warnings when the website loads, unfamiliar admin users, and emails from your host about unusual activity. Google Search Console may also flag hacked content or malware in its Security issues report.
Some hacks only show to visitors arriving from search results or using a phone, so check your website the way a customer would, not only by typing its address. A website that looks normal to its owner can still be compromised.
What should I do straight away if my website is hacked?
Contact your hosting provider first, because a host can often see what changed, contain the problem and tell you whether anything else on the account is affected. If the website is redirecting visitors or serving malware, ask for it to be taken offline or put into maintenance mode, since leaving it live puts customers at risk.
Do not delete the hacked website or start editing files at random, because that can destroy the evidence of how the attacker got in. Write down what you noticed and when you noticed it.
Which passwords should I change after a website hack?
After a website hack, change the passwords for the website's admin area, the hosting account, any file transfer or database logins, the domain registrar account and every email account linked to any of those. Do it from a device you are confident is clean, because a password typed on an infected computer can be captured again.
Remove any admin users you do not recognise, and turn on two-factor authentication wherever it is offered. Use a different password for each account, kept in a password manager rather than a shared document.
Should I restore a backup or clean the hacked website?
Restoring a backup taken before the hack is a good first option, as long as you can work out when the compromise started. A restored backup can be reinfected through the same weakness, so update the website's software, themes and plugins immediately after restoring it.
If there is no clean backup, a hacked website has to be cleaned file by file, which is specialist work and worth paying for rather than attempting alone. Once the website is clean, set up automatic backups stored somewhere separate from the website itself.
Can I find out how my website was hacked?
Finding out how a website was hacked matters, because the same weakness can be used again after a clean-up. Hosting providers keep server logs that can show when files changed and where requests came from, and a host or security specialist can review them.
Routes into a small business website can include out-of-date software or plugins, reused or stolen passwords, and admin accounts that nobody remembers creating. Knowing which route was used tells you what to fix first.
How do I get Google warnings removed after a hack?
Once every issue is fixed, open the Security issues report in Google Search Console and select Request Review, describing the problem, what you did to fix it and the result. Google's documentation says a review can take "several days or weeks", and you are emailed as it progresses.
Requesting a review before every issue is fixed wastes time, because the warnings stay while problems remain. If spam pages from the hack were indexed by Google, remove them from your website so they return an error rather than redirecting somewhere else.
Do I need to tell my customers my website was hacked?
If a website hack exposed customer personal data, such as names, email addresses or anything submitted through your forms, UK data protection law may require you to report it and, in some cases, to tell the people affected, within strict time limits. Take advice promptly rather than waiting until the website is fixed.
If no personal data was involved, warning regular customers to ignore any unusual emails or pages that appeared in your name is still a sensible courtesy. It also shows them the problem is being handled.
How do I stop my website being hacked again?
Keep the website's software, themes and plugins up to date, and remove any you no longer use. Use unique passwords with two-factor authentication on every account connected to the website, and give admin access only to the people who genuinely need it.
Keep automatic backups stored away from the website, and check occasionally that a backup can actually be restored. If a website is old and difficult to keep secure, a rebuild can be more practical than repeated repairs, and our web design page explains how we approach new websites.