Most hacked websites are not defaced. They keep working, and the attacker quietly uses them to rank spam,
redirect search visitors or send email. This guide covers the signs to look for, why owners are often the last to
notice, how to confirm a compromise, and how to clean up without letting the attacker straight back in.
Published 21 November 2026 · Qcramai Security
The signs of a hacked website
Any one of these can have an innocent cause. Two or more together deserve a proper look.
In search results
Pages you never wrote. Search site:yourdomain.com on Google. Pharmacy, casino,
loan or replica-goods pages, or titles in Japanese or Chinese on an English site, are the classic sign of an SEO
spam injection.
"This site may be hacked" under your listing, or a Security issues report in Google
Search Console.
A sudden drop in search traffic together with a jump in indexed pages you do not recognise.
For your visitors
Redirects to other sites, often only for visitors who arrive from Google or on a phone.
A red "Dangerous site" warning in Chrome, Safari or Firefox. These come from Google Safe Browsing,
and you can check your status on Google's
Safe Browsing site status page.
Pop-ups, ads or download prompts you did not add.
On the server and in email
Admin accounts you do not recognise in your CMS or hosting panel.
Recently changed files you did not touch, PHP files in upload folders, or new scheduled tasks (cron jobs).
Email bouncing or landing in spam because your server's IP was blocklisted for sending spam.
A warning or suspension from your host about malware, high CPU use or outbound spam.
Why owners miss it
Attackers want the site to stay online and the owner to stay unaware, so most injected code checks who is asking
before it does anything:
Cloaking: spam text and links are served only when the visitor's user agent says Googlebot.
You see your normal site; Google indexes the spam.
Conditional redirects: only visitors with a search engine in the Referer header, or
on a mobile browser, are redirected. You type your address directly, so you are never redirected.
One-time redirects: each visitor is redirected once and then marked with a cookie, so a second
look shows nothing.
Logged-in exclusions: anyone with a CMS login cookie is skipped, which hides the hack from every
administrator.
That is why the most useful first check is to look at your site as Google and as a search visitor, not as yourself.
Check it in 30 seconds. Our free
hacked website checker loads your page as Googlebot, as a visitor
from Google on desktop and on iPhone, and as a direct visitor, then compares them for cloaked spam, conditional
redirects, hidden links, obfuscated scripts and blocklist listings.
How to confirm a compromise
Check from the outside. Run the hacked website
checker on your home page and a few deeper pages, and do the site: search above.
Check Google's view. In Search Console, open Security & Manual actions, then use
URL Inspection on a suspicious page to see the HTML Google actually received.
Check reputation. Look up the domain and server IP on the
blacklist checker and on Google's Safe Browsing status page.
Check the server. If you have shell access, list recently modified files and look for common
injection patterns:
# PHP files changed in the last 14 days
find /var/www -type f -name '*.php' -mtime -14 -print
# PHP files inside upload folders (there should be none)
find /var/www -path '*uploads*' -name '*.php' -print
# rewrite rules that act on the referrer or user agent
grep -rniE 'HTTP_REFERER|HTTP_USER_AGENT' --include=.htaccess /var/www
Treat what these find as leads, not proof. Plenty of legitimate code uses the same functions.
Check accounts and tasks. Review CMS administrators, hosting and FTP/SSH users, and scheduled tasks.
How to clean it up
Contain it. Put the site in maintenance mode if it is serving malware or redirects, and tell your
host. Take a copy of the hacked site and logs first; you will want them to find the way in.
Find the entry point. Access logs, the oldest modified file and the plugin list usually point to
it. Cleaning without closing the hole means being hacked again within days.
Restore or rebuild. Restore from a backup taken before the first sign, or reinstall the CMS core,
plugins and themes from official sources and keep only your own content and uploads (with no scripts in them).
Update everything. CMS, plugins, themes and the server software. Remove what you do not use. Our
end-of-life checker shows outdated versions your site discloses.
Rotate every secret. CMS admin passwords, hosting panel, database, FTP/SSH, API keys and the
secret keys in your configuration file. Remove accounts you do not recognise.
Clean up search results. Delete the spam pages so they return 404 or 410, then request a review in
Search Console under Security issues.
Watch it. Re-run the outside checks over the following weeks. Reinfection usually means a
backdoor or the original hole was missed.
How attackers get in
Outdated plugins, themes and CMS versions with publicly known vulnerabilities, found by automated
scanners within days of disclosure.
Stolen or reused passwords for admin, hosting or FTP accounts.
Pirated ("nulled") themes and plugins that ship with a backdoor already installed.
Exposed files such as .env, .git folders and database backups in the web
root. The exposed files checker looks for them.
Upload forms that accept scripts, and shared hosting where one compromised site spreads to others.
Questions
How do I know if my website has been hacked?
Look at it the way others see it: search site:yourdomain.com on Google, check Search Console for
security issues, and use a checker that loads your pages as Googlebot and as a search visitor. Unknown admin
accounts and recently changed files on the server are strong signs too.
Why is my website redirecting to another site?
If you did not set up the redirect, injected code or a rewrite rule is the usual cause. These redirects often
target only visitors from search engines or on phones, which is why they can be hard to reproduce yourself.
Will Google penalise my site for being hacked?
Google may show a warning in search results or in the browser and can remove spam pages from its index. Once the
site is clean, you can request a review in Search Console; the warning is removed when the review passes.
Is restoring a backup enough?
Only if you also close the way in. Restore, then update the software, rotate every password and key, and remove
unknown accounts. Otherwise the attacker can repeat the same attack.
Need a hand? If the site keeps getting reinfected, or you need to know how the attacker got in, our team
can investigate and fix it. Get in touch.