Blog · Website Security
Signs Your Website Has Been Hacked, and What to Do First
Most owners find out from somebody else. Here are the signs you can check yourself, what to do in the first hour, and the mistake that turns one bad day into a repeated one.
Signs Your Website Has Been Hacked, and What to Do First
Most owners find out from somebody else. A customer says the site sent them somewhere strange, Google shows a warning under the listing, or the hosting company suspends the account. By then the compromise is usually weeks old.
This guide covers the signs you can check yourself without any tools, what to do in the first hour, and the mistake that turns a bad day into a repeated one.
The signs you can check yourself
Search results that are not yours
Search for your domain. If the results include pages about products you do not sell, often in another language, your site is hosting injected spam pages.
This is the most common compromise of small business sites, and the most commonly missed, because the pages are hidden from you. They are built to be visible to search engines and invisible to the site owner, and your home page looks perfectly normal throughout.
A browser warning
"Deceptive site ahead" or "This site may be hacked" under your listing. Google has detected something and is telling visitors before they arrive.
This one is unambiguous. It is also the one that costs you immediately, because almost nobody clicks through a red warning screen.
Visitors sent somewhere else
You open the site and it is fine. A customer opens it on their phone and lands on an unrelated page.
Redirect attacks are often conditional. They trigger only for visitors from search results, only on mobile, or only for people who have not visited before. That is deliberate, and it is why the owner is the last to know. Always test from a phone, on mobile data, arriving from a search result rather than by typing the address.
Admin users you do not recognise
Check your user list. An account you did not create, or an existing account whose role was quietly raised to administrator, means someone has been inside.
Files changed when nobody was working
Most hosting control panels show file modification dates. Core files changed at three in the morning on a Sunday, when nobody touched the site, is a strong signal.
The site has become slow
A server spending its resources sending spam or mining cryptocurrency has less left for your visitors. Sudden unexplained slowness, particularly alongside a jump in bandwidth, is worth investigating.
Email going to spam
If mail from your domain suddenly stops arriving, your domain may have been used to send spam and ended up on a blocklist.
What to do in the first hour
Order matters here.
1. Do not panic and delete things. Evidence of how they got in is in the files and logs. Destroy it and you will clean the site and be reinfected within days through the same door.
2. Take a copy of the site as it is now. Files and database. Label it clearly as infected. You are not going to restore this; you are keeping it so the entry point can be found.
3. Tell your host. Most Kenyan hosts have dealt with this many times. They can see server-level logs you cannot, and they may already have the site flagged. If the account has been suspended, this conversation is unavoidable anyway.
4. Change passwords, in the right order. Hosting control panel first, then database, then site administrator accounts, then FTP or SSH. Do this from a device you trust. Changing the site password while the attacker still holds hosting access achieves nothing.
5. Force everyone out. Invalidate active sessions so an attacker who is logged in is logged out.
6. Check for scheduled tasks. Attackers leave cron jobs that re-infect the site after it is cleaned. A site that keeps getting reinfected usually has one.
7. Only then start cleaning.
Why reinstalling is not enough
The instinct is to reinstall WordPress, or restore last week's backup, and move on. Both fail for the same reason: they address the infection and not the entry point.
Restore a backup from before the compromise and you restore the vulnerable plugin that let them in. The site is clean on Monday and infected again by Friday.
Worse, if the compromise is older than you think, your backups are infected too. This is why the date of the first suspicious file matters, and why step two exists.
Finding the entry point is the actual work. Usually it is an outdated plugin or theme, a weak administrator password, a shared hosting account where another site was compromised, or credentials stolen from a developer's machine.
Cleaning properly
Replace rather than repair. Core files, plugins and themes should be deleted and reinstalled fresh from official sources. Do not trust a cleaned file; trust a replaced one.
The database needs looking at too. Injected content hides in posts, in options, and in user records. A file-only clean leaves it behind.
Check what should not be executable. Uploads directories should hold images, not scripts. A PHP file in an uploads folder is almost never legitimate.
Look for the extra accounts. Not just users, but database users and SSH keys.
Then close the door. Update everything, remove what is abandoned, enforce strong passwords, add two factor authentication on administrator accounts.
If this is beyond what you want to attempt, it is a defined job rather than an open-ended one. Our website security and malware removal service covers the clean and the entry point, and emergency website recovery is for when the site is down now.
Getting the warning removed
Once the site is genuinely clean, ask Google to review it. In Search Console, under Security and Manual Actions, there is a security issues report with a request review option.
Be honest in the request about what happened and what you changed. Requesting a review while the site is still infected gets it rejected and makes the next request slower.
Expect days rather than hours. During that time the warning stays up, which is one more reason the cleaning has to be thorough the first time.
Telling customers
If personal data was exposed, you have obligations under the Data Protection Act, and they are not optional. Get advice on the specifics rather than guessing.
Even where no personal data was involved, if customers saw something alarming, a short factual note is better than silence. What happened, what you did, whether anything of theirs was affected. Customers forgive problems handled openly far more readily than problems they discover themselves.
Preventing the next one
Most compromises of small sites are opportunistic. Automated tools scan for known faults in outdated software and exploit whatever they find. You are not being targeted; you are being found.
That makes prevention unglamorous and effective.
Our guide to plugin housekeeping covers the audit side of that in more detail.
- Update promptly. Most attacks exploit faults that were fixed months ago.
- Remove what you do not use. An abandoned plugin is a liability even when deactivated.
- Strong, unique passwords, in a password manager, not reused anywhere.
- Two factor authentication on every administrator account.
- Limit who is an administrator. Most people who need access do not need that role.
- Backups that are stored away from the server and restored occasionally to prove they work.
- Remove access when people leave, including former developers.
Backups are the one that gets skipped
Almost every site we take over has backups that have never been tested, and a meaningful number have backups that do not work at all. The plugin reported success every week and wrote to a folder that filled up two years ago.
A backup is not a backup until you have restored it somewhere and seen the site come up. Test yours this month, and keep at least one copy somewhere other than the server it is backing up. A backup on the same server is a backup that disappears with the server.
If you have no clean backup
It happens, and it is recoverable, just slowly. The content is often retrievable from search engine caches and from your own records. The site itself has to be rebuilt.
If you reach that point, it is worth treating as a rebuild rather than a rescue. A site that was compromised through a plugin nobody maintained is usually a site that was overdue anyway. Our web design and development pages cover what that involves, with builds from KES 35,000 and prices on the cost page.
How a typical compromise unfolds
Understanding the shape of it helps, because almost all of these follow the same sequence and none of it requires anyone to be targeting you.
Months before. A fault is found in a plugin used by many sites. The author releases a fix. The fault is published, as it should be, so that people know to update.
Weeks before. Automated tools begin scanning the web for sites still running the old version. Your site is one of thousands found. Nobody chose you.
Day one. The tool gets in and installs a backdoor, which is a small file allowing return access even after the original fault is patched. Nothing visible changes. This is deliberate. A site that breaks gets fixed, and a site that looks normal keeps being useful.
Weeks one to four. The access is used, or sold. Spam pages appear, hidden from the owner. Redirects are added for visitors arriving from search results only.
Week four or later. Google notices, or a customer complains, or the host spots the outbound traffic. This is when you find out.
Two things follow from that timeline. The backdoor is the thing that matters, not the spam pages, which are a symptom. And your backups from the past month may contain it, which is why restoring the most recent one so often fails.
What it actually costs
Worth being specific, because the cost of prevention always looks like real money and the cost of a compromise always looks hypothetical until it is not.
Time. A proper clean, including finding the entry point, is a day or more. If a rebuild is needed because there is no clean backup, considerably more.
Lost traffic. While a browser warning is showing, the great majority of people who click your listing turn back. That continues until Google reviews the site, which takes days after it is genuinely clean.
Lost rankings. Spam pages indexed under your domain, and a period marked as compromised, can suppress visibility for weeks afterwards.
Lost trust. The hardest to quantify. A customer who saw a warning on your site remembers it.
Possible legal exposure. If personal data was involved, the Data Protection Act applies regardless of how small the business is.
Set that against updates applied monthly and a backup you have tested. The comparison is not close, and it is the whole argument for maintenance.
Where to go next
If your site is down or showing a warning right now, emergency website recovery is the page to read, and contacting us with the domain and what you are seeing is the fastest route to an answer.
If nothing is wrong and you would rather keep it that way, support and maintenance covers updates, monitored backups and patching from KES 8,000 a month. That is considerably less than a recovery, and far less than the week you would otherwise spend on it.
Talk to us about website security
Tell us what you need help with in website security. We can help you choose the right next step for your business.
Rather just ask?
Send your brief and get a fixed scope and price back within a working day.
