Guide

My website has been hacked. What do I do now?

A calm step-by-step plan for a hacked website: contain it, change passwords, restore a clean copy, close the hole, and tell the people who need to know.

4 min readBy Wiredeo

A padlock resting on a computer keyboard
Photo: Sasun Bughdaryan, Unsplash

Stay calm and work in order. First, limit the damage. Then get a clean copy of the site back, change every password, and find out how they got in so it does not happen again. Do not delete things in a panic; you may need them to find the cause. Here is the plan.

Signs your site may be hacked

  • Your site redirects visitors to a strange or unrelated page
  • Your pages contain content you did not write, often ads or links to products you do not sell
  • Google or your browser shows a warning that the site may be harmful
  • Your host emails you about suspicious activity or suspends the site
  • You cannot log in, or an unknown admin user appears
  • Customers or friends report spam coming from your site or email
  • The site is suddenly very slow, or search results for your business show odd text

Some of these have innocent causes, such as a bad update. Our site-down checklist helps tell them apart.

Step 1: contact your host

Tell your hosting company straight away. Many can show logs, scan for malware, or temporarily take the site offline to protect visitors. They have seen this before. If someone else manages your site, call them too.

Step 2: take it offline if it is harming visitors

If it is redirecting people, stealing details or spreading malware, put up a simple maintenance page or ask your host to suspend it. A few hours offline hurts less than visitors getting infected.

Step 3: change every password

Do this from a computer you trust, which you have first checked for viruses. Change:

  • The website admin logins (all users)
  • Hosting and control panel
  • The database password and, where relevant, FTP/SFTP accounts
  • The email account used for account recovery
  • The domain registrar account

Use a different long password for each, ideally from a password manager, and turn on two-step sign-in wherever it is offered.

Step 4: restore a clean version

The safest fix is usually to restore a backup from before the problem began, then update everything straight away. This is why backups matter: how to back up your website. If you have no clean backup, a professional can clean the site by hand, or you can rebuild it from your content on fresh, up-to-date software. Simply deleting the odd files you spot often leaves hidden back doors behind.

Step 5: close the hole

Most hacks of small sites come through something ordinary:

  • Outdated WordPress, themes or plugins. See updating safely and checking if yours is out of date.
  • Weak or reused passwords
  • Abandoned plugins and themes you no longer use (delete them, do not just switch them off)
  • A compromised computer or an old developer account that still has access

Remove users who should not have access, and delete anything unused.

Step 6: ask Google to re-check

If Google flagged your site, fix it first, then request a review in Google Search Console. See Search Console for beginners. Warnings are removed after Google confirms the site is clean; there is no fixed time.

Step 7: tell the people who need to know

If the site collected customer information such as orders or form entries, you may have legal duties to notify customers or authorities, and the rules differ by country. We cannot give legal advice, so check the rules where you operate or ask a lawyer. Also tell your payment provider if payments were involved.

Make it less likely to happen again

  1. Keep software updated and remove unused plugins
  2. Use strong unique passwords and two-step sign-in
  3. Keep backups stored away from the site, and test a restore
  4. Use HTTPS (free certificate guide)
  5. Review who has access every few months

What not to do

  • Do not pay a ransom or a “hack removal” stranger who contacts you first. Unsolicited offers are often scams.
  • Do not just restore over the top and carry on without changing passwords and updating. The same weakness will let them back in.
  • Do not reuse the old passwords with small changes.
  • Do not ignore a Google warning. It can cost you visitors every day it stays.

Keep notes as you go

Write down what you saw, when you noticed it, and what you changed. If you hire someone to investigate, or need to explain it to your host or insurer, notes save a lot of time.

When to get help

If you are not confident cleaning a site, or it keeps coming back, bring in someone experienced. A repeat infection means the hole has not been closed.

We can look at your site and tell you what we see. Ask for a free review, or run the free check.

Filed under Security

Next step

Not sure where your own business stands?

A two-minute check-up shows where you are losing time and customers, and what to fix first.

Take the check-up Request an audit