Website hacked? What to do in the first hour
28 November 2026 · 7 min read
If you are reading this, something on your site looks wrong. Maybe Google shows pages you never wrote, maybe visitors land on a site selling pills, or maybe your host has just suspended your account. It feels urgent, and it is, but the first hour is about stopping the damage and keeping the evidence, not about deleting things in a panic.
This guide walks through what I check first, how you can confirm what happened in about 10 minutes, what a proper fix involves, and when it makes sense to bring someone in.
Signs your site has been hacked
Most hacks show up in one of a handful of ways.
- Google shows pages under your domain that you never created, often in Japanese or full of product names. This is usually called the Japanese keyword hack.
- Visitors are redirected to spam or scam sites. Often this only happens to people arriving from Google or on a phone, so you may not see it yourself when you type your address in.
- Chrome or Google search shows a red warning, or "This site may be hacked" under your listing.
- You cannot log in to WordPress or your store admin, or there are admin users nobody on your side created.
- Your host has suspended the account for malware or for sending spam.
- Customers report card fraud after buying from your store.
- You cleaned the site once and the problem came back.
Any one of these is enough to treat the site as compromised until you know otherwise.
Check it yourself in 10 minutes
You do not need any special tools for a first look.
A word of caution first. Some hacked pages try to infect the people who open them, so avoid browsing suspect pages on your own phone or computer. If you do open one, do not enter any details and do not download anything.
- Search Google for site:yourdomain.com and scroll through the results. Pages you do not recognise, foreign language titles or product spam are a clear sign.
- Check your domain with the site status check on Google's Transparency Report. It tells you if Google currently flags the site as unsafe.
- If you have Google Search Console, open the Security issues report. Google lists what it found there, often with example URLs.
- In Search Console, put one of your normal pages into URL Inspection and choose Test live URL. This shows the page exactly as Google receives it, which matters because some hacks show spam or redirects only to Google or to visitors arriving from Google search. Not seeing anything wrong yourself does not mean the site is clean.
- Log in to your admin and look at the list of users. Any administrator you cannot name is a problem.
- Look at your host's file manager or ask your host which files changed recently. New PHP files in upload folders, or core files changed on a day nobody worked on the site, are typical.
Write down what you find and when. It will save time later.
What to do in the first hour
Do not start deleting files. It is tempting, but it destroys the trail that shows how they got in, and without that the hack usually comes back.
Take a copy of the site as it is now. Ask your host for a snapshot or download the files and the database. This is your evidence, and your safety net if a cleanup goes wrong.
Change passwords from a clean device. Start with your hosting account, then the site admin, the database, FTP or SSH, and the email account that receives password resets. If you think your own computer may be infected, use a different one.
Remove access you do not recognise. Delete unknown admin users and revoke API keys or integrations you do not use any more.
Put the site in maintenance mode if visitors are at risk. If the site redirects to scams or a skimmer may be reading card details, a short outage is better than more victims.
If card details may be involved, tell your payment provider now. They need to know, and they decide whether a formal forensic investigation is required. That is a separate certified role, not part of a normal cleanup.
What a proper fix involves
A real cleanup is more than running a scanner and deleting what it flags.
Stop it spreading. Lock out the attacker before anything else. Every password and key changes, unknown accounts go, and the site is taken offline only if visitors are still at risk.
Find everything they left behind. Attackers rarely leave one file. Expect extra admin accounts, code hidden inside legitimate files, scheduled tasks that put the infection back, and spam entries in the database. The platform's own files get checked against a fresh official download, because a changed core file is easy to miss by eye.
Work out the way in. This is the step most quick fixes skip, and it is why sites get reinfected. The usual suspects are an outdated plugin or extension, a reused password, a server setting left open, or a neighbouring site on the same hosting account.
Shut that door and the ones beside it. Update what is out of date, remove what is not used, and put a web application firewall in front of the site so the next automated attempt is stopped at the edge.
Review requests. Once the site is clean, ask Google to recheck it from the Security issues report, and ask any blocklist that flagged you to do the same. Google says a review can take from a few days to a few weeks, so fix every affected page before you ask.
A written record. What happened, what was found, what was changed and what to do next. You will want it if this ever happens again, and your payment provider or insurer may ask for it.
Restoring a backup is not always the answer
Restoring last month's backup can look like the quick way out. It works only if the backup is from before the break in, and only if you then close the hole they used. Many hacks sit quietly for weeks before anyone notices, so the backup may already contain the backdoor. Restore, and the attacker simply walks back in through the same door.
When to get help
You can handle a small, clear case yourself if you are comfortable with your hosting panel and database. Get help when any of these are true.
- Card details may have been taken.
- The site was cleaned before and the problem came back.
- You cannot find how they got in.
- The site makes money every hour it is down.
- More than one site or a whole server is affected.
This is the work I do in my Hacked Site and Server Cleanup package. I contain it, clean it, find how they got in, close that hole and give you a written report. If you are not sure whether you need it, tell me what you are seeing and I will tell you honestly.
After the cleanup
The weeks after a cleanup are when a site is most at risk, because attackers often return to check whether their way in still works. Keep plugins and the platform updated, check the admin user list now and then, and make sure your backups can actually be restored. If you would rather someone else watched it, that is what the Security and Care Plan is for.