Website hacked what to do: your immediate checklist
If you typed “website hacked what to do” after finding spam or a security warning, use a trusted device, record what you can see, ask your host to restrict public access and secure the accounts controlling the domain and server. Preserve the website files, database and logs before anyone starts cleaning or updating them.
Treat the compromise as a security incident. Contain the immediate risk, preserve evidence and establish what changed before deciding how to recover.
Start with these actions:
- Move to a trusted computer or phone. Avoid resetting credentials from a device that might also be compromised.
- Start an incident log. Record when each symptom appeared, who discovered it and every action taken afterwards.
- Capture screenshots, warning emails, suspicious URLs and unfamiliar accounts without exploring malicious pages unnecessarily.
- Contact the hosting provider. Ask it to restrict access, retain logs and take a snapshot of the current environment.
- Secure the recovery email, registrar and DNS first. Then reset hosting, CMS, database, SFTP or SSH, deployment and relevant API credentials.
- Revoke active sessions, remove unknown recovery methods and enable multi-factor authentication wherever it is available.
Credible warning signs include a website redirecting to spam, defaced pages, unknown administrator accounts, unexpected files or emails and unfamiliar DNS records. Google may also display a “This site may be hacked” label or a red Safe Browsing warning.
Restrict access through the host, CDN or a clean static holding page where possible. Enabling maintenance mode inside a compromised CMS may leave the malicious code executing and accessible through other routes.
Ask the host to preserve logs and create a snapshot before cleanup. Urgent containment still takes priority over producing a perfect forensic image, particularly where the site is distributing malware, collecting customer details or sending visitors elsewhere.
Preserve evidence before anyone deletes files
Save a dated copy of the website files and database without overwriting an earlier backup. Keep the original snapshot read-only where practical and restrict access because it may contain malware, credentials or personal data.
Collect the material needed to reconstruct the incident:
- Web access, error and authentication logs
- CDN, firewall and DNS change logs
- Deployment records and hosting control-panel activity
- CMS audit logs and administrator account details
- Screenshots, suspicious URLs and warning emails
- The time each symptom was first observed
Record every containment change, including password resets, blocked accounts, DNS changes and files moved by the recovery team. This lets an investigator separate an attacker’s activity from your own work.
Blindly deleting unfamiliar files can remove useful clues without proving the site is clean. The same problem applies to installing a security plugin or immediately updating WordPress. Those actions may overwrite evidence whilst leaving database injections, scheduled tasks, stolen sessions or server-level backdoors untouched.
Use the preserved evidence to determine the entry point and affected systems. It also supports an assessment of personal data exposure and any reports required by an insurer, the ICO, police, bank or payment processor.
Decide whether the ICO’s 72-hour rule applies
A compromised website does not automatically create an ICO reporting duty. The key question is whether a personal data breach occurred and whether it is likely to create a risk to people’s rights and freedoms.
Check whether personal data was accessed, disclosed, altered, deleted or made unavailable. Relevant data might sit in contact forms, customer accounts, order records, analytics systems, email integrations, backups or server logs.
Where the reporting threshold is met, the ICO requires notification within 72 hours of awareness. Do not wait for every technical question to be answered. Report the known facts and update the record as the investigation develops.
A breach likely to create a high risk for affected people also creates a separate duty to inform them without undue delay. The message should explain what happened, the likely consequences and what they can do to protect themselves.
You must document personal data breaches and the remedial action taken, including the reason for deciding that notification was unnecessary. The ICO says its small-business guidance is under review, so check the current position as data law and guidance may change.
Report cybercrime through Report Fraud, rather than Action Fraud
Outdated checklists still direct businesses to Action Fraud. Report Fraud replaced it on 4 December 2025 as the national fraud and cybercrime reporting platform.
A police report is particularly useful where there is extortion, fraud, stolen credentials, an ongoing attack or a need for a crime reference. A business, charity or organisation can report online or call 0300 123 2040. Organisations in Scotland should contact Police Scotland on 101.
Keep the report reference with the incident log and preserved evidence. Do not upload malware, credentials or sensitive customer records unless they are specifically requested through an appropriate secure route.
Reporting cybercrime does not replace any applicable notification to the ICO, affected customers, an insurer, bank, card processor or contractual partner. Each has a different purpose and threshold.
Choose between cleaning, restoring and rebuilding
Website malware removal should never be the automatic choice. We choose the recovery route according to the evidence available and the confidence we can place in the resulting system.
| Recovery route | When it is defensible | What must happen before relaunch |
|---|---|---|
| Clean in place | The entry point and affected systems are known. Altered components can be replaced from trusted sources and persistence can be checked comprehensively. | Remove the vulnerability, replace compromised components, inspect accounts, scheduled tasks, configuration and database content, then retest. |
| Restore a backup | The backup was demonstrably created before the compromise and its chain of custody is credible. | Restore into staging, close the original vulnerability, update supported dependencies and test before reconnecting live DNS. |
| Rebuild cleanly | No trustworthy backup exists, database integrity is uncertain, dependencies are abandoned or the site has suffered repeated compromise. | Build from trusted components, migrate inspected content only and issue fresh credentials from the clean environment. |
Cleaning in place requires credible evidence that persistence has been removed. A scanner can assist with triage, although a clean scan cannot prove that every backdoor, stolen credential or database change has gone.
When a WordPress site is hacked, preserve the snapshot first. Replace WordPress core, plugins and themes with trusted copies instead of asking a scanner to disinfect altered files individually. WordPress also recommends updating the installation and changing passwords again once the site is clean.
A clean rebuild is often the safer engineering decision when the old environment cannot establish its own integrity. Our custom web development work uses trusted source code and controlled deployments, which makes future investigation and recovery more manageable than an undocumented collection of plugins.
Remove Google’s hacked-site or dangerous-site warning
What people call a Google dangerous site warning can refer to several systems. A “This site may be hacked” search label, red Safe Browsing interstitial, malicious redirect and cloaked hacked-spam page are related symptoms, though each needs to be investigated in its own context.
Google treats malicious redirects as a form of code injection. Check the Security Issues report in Google Search Console, inspect every listed issue and URL pattern and review all verified owners, verification files and tokens. Remove any ownership route you cannot account for.
Follow a strict sequence: fix every identified issue, test the site from clean devices and networks, then request a review. A normal-looking homepage proves very little when malicious behaviour only appears on search traffic, mobile devices or particular URLs.
Set expectations carefully. Google says malware reviews commonly take a few days, whilst hacked-spam reviews may take several weeks. Technical recovery and Google’s review run on separate timelines, so a clean website may continue showing a warning until Google processes the request.
Verify the recovery and reduce the chance of another compromise
Do not declare recovery complete until the entry point has been identified or the affected system has been replaced with a clean build. Check for persistence across:
- Administrator and hosting accounts
- Scheduled tasks and background workers
- Web server configuration and writable directories
- DNS records and registrar access
- Deployment keys, repositories and automation services
- Database content and stored scripts
- Third-party integrations and API credentials
Patch supported software and remove abandoned plugins, themes and integrations. WordPress identifies untrusted extensions, compromised administrator computers and outdated plugins as preventable security risks. Apply least-privilege access, enable multi-factor authentication and rotate credentials again after the environment is clean.
Create isolated backups and perform a real restore test. The NCSC says secure, tested backups are essential and disruptive recovery can take significant time. An archive you have never restored is only a recovery assumption.
After relaunch, monitor server logs, redirects, uptime and Search Console. Run our free website audit to catch post-recovery regressions in performance, SEO, user experience and trust signals. Keep the compromised environment offline until you are certain nothing still depends on it.
If the site needs an independent technical review or a clean rebuild, talk to our senior developers.