Signs of a hack
- The browser or Google warns that "this site may be dangerous"
- Your pages with spam in a foreign language or about casinos and pills appear in search results
- Visitors are redirected to unfamiliar sites, especially on phones
- Unknown users or files have appeared in the admin panel
- The host blocks the site for sending spam or excessive load
- Search Console sent a security issue notification
- The site suddenly slowed down and file contents changed without your involvement
Action plan
Change all credentialsimmediately
Passwords for hosting, the admin panel, the database, FTP, and email. Turn on two-factor authentication wherever it is available.
Save a copy of the infected site1 hour
You need it to find the entry point and to show the host what happened. Store it off the server.
Take the site offline during the work1 hour
Turn on a "maintenance" page so you do not infect visitors or damage your reputation.
Restore a clean version2–4 hours
Preferably from a backup made before the hack. Then update the system and plugins to the latest versions.
Find the cause1–2 days
An old plugin, a weak password, stolen access, a vulnerable theme. If you do not find the cause, the hack will return.
Notify search enginesafter cleanup
After cleanup, submit a review request in Search Console to remove the warning.
Why sites get hacked
Most often it is not a personal attack but automated brute-forcing. Bots look for sites with old versions of the system and plugins, weak passwords, and exposed folders. Small businesses are attractive because nobody watches their sites closely.
The attacker's goal is to use your site: to host spam pages for someone else's promotion, send emails from your domain, redirect visitors, or steal form data. That is why an infected site often keeps working normally, and the owner hears about the problem from a customer.
How to protect yourself in advance
- Updates
- The system, themes, and plugins are updated on a schedule, and unused ones are removed.
- Backups
- The backup is stored off the server, tested for restoration, and made daily.
- Access rights
- Every employee and contractor gets a separate account, and access is revoked for former ones.
- Monitoring
- Alerts about file changes and site downtime go to your phone.
Check adjacent systems too
If your site password matches the one for your email or ad account, change those as well. A site hack is often just the first step toward more serious access.
What to check a week after cleanup
Do not relax after the site is restored: attackers often leave a hidden backdoor and come back a few days later. Check the list of admin users, recently modified files, scheduled jobs on the server, and outgoing email. Any unfamiliar entry is a reason to investigate.
Also make sure no spam pages remain in search: a site: query in Google will show suspicious URLs, and Search Console lets you request their removal. If the site accepted payments or customer data, assess whether you need to notify users and your bank, and document the steps you took.