Has Your Website Been Hacked? 9 Warning Signs and What to Do Next
Website hacks are rarely dramatic. More often, a site quietly starts redirecting mobile visitors, ranking for spam keywords, or sending emails it shouldn’t. Here’s how to spot the signs and what to do if it happens to you.
9 warning signs your website has been hacked
- Google or your browser shows a warning such as “This site may be hacked” or “Deceptive site ahead”.
- Visitors are redirected to unrelated sites — often only on mobile or only when arriving from Google, so you might not see it yourself.
- Strange pages appear in search results — try searching
site:yourdomain.comand look for spam, pharmacy or gambling pages. - Unknown admin users or changed passwords in your CMS or hosting account.
- Files you didn’t create or recently modified core files on the server.
- Your host suspends the site or warns about malware or excessive resource use.
- The site becomes slow or traffic spikes without explanation.
- Emails from your domain bounce or land in spam because your server is sending spam.
- Pop-ups or ads appear that you never added.
What to do in the first hour
- Don’t panic, and don’t delete everything. Evidence helps find how the attacker got in.
- Change passwords for hosting, CMS admins, FTP/SFTP, database and email — from a clean device.
- Turn on maintenance mode if visitors are being harmed by redirects or malware.
- Take a full backup of the current (infected) state for investigation.
- Tell your hosting provider — they may have logs and can help contain it.
- Check Google Search Console for security issues and manual actions.
How a hacked website is cleaned up
- Find the entry point. Review server logs, recently changed files and outdated components to see how the attacker got in.
- Remove malware and backdoors. Attackers usually leave hidden files so they can return; all of them must go.
- Replace core files with fresh copies, and clean the database of injected content and rogue users.
- Close the vulnerability — update or remove the vulnerable plugin, fix the code, tighten permissions.
- Restore clean content from a backup taken before the infection, if needed.
- Request a review in Google Search Console and from any other blacklist so warnings are removed.
How to stop it happening again
- Keep everything updated — CMS core, plugins, themes, server software and libraries.
- Use strong, unique passwords and multi-factor authentication for every admin account.
- Remove what you don’t use: old plugins, themes, test sites and admin accounts.
- Add a web application firewall (such as Cloudflare) to block malicious traffic and brute-force attempts.
- Set security headers and HTTPS across the whole site.
- Back up automatically to a separate location, and test restoring.
- Monitor for file changes, uptime and Google Search Console security alerts.
- Test regularly with a vulnerability scan or penetration test, especially for custom code.
Summary
Most website hacks come from outdated software and weak passwords, and many are invisible to the site owner at first. Watch for the warning signs, act quickly and methodically when something looks wrong, and close the original vulnerability — otherwise the attacker will simply come back.
Frequently asked questions
How do hackers get into websites?
The most common ways are outdated plugins, themes or software with known vulnerabilities, weak or reused passwords, insecure hosting configuration, and vulnerable custom code such as forms that allow injection.
Will a hacked website affect my Google ranking?
Yes. Google may show a warning to visitors, remove pages from results or rank spam pages that attackers inject. Cleaning the site and requesting a review in Google Search Console restores normal results.
Can I just restore a backup?
Restoring a clean backup helps, but if you don't fix the vulnerability the attacker used, the site is likely to be hacked again. Find and close the entry point first, then restore.