How to know if your website is hacked: warning signs and what to do
Many site owners only discover that their website is hacked weeks later, when customers complain or Google shows a warning. This guide lists the most common signs of a hacked website, how to check each one yourself, and the first steps to take so you can contain the damage quickly.
Common signs that your website is hacked
- Strange redirects: visitors coming from Google or from a phone are sent to a gambling, pharmacy or "you won a prize" site, while you see the normal site when you type the address directly.
- Spam pages in Google: search results for your domain show pages you never created, often in Japanese or full of product keywords.
- Browser or Google warnings: "Deceptive site ahead", "This site may be hacked" or an antivirus blocking your site.
- Unknown users: new administrator accounts in WordPress or new FTP accounts in cPanel that nobody in your team created.
- Unknown or changed files: PHP files with random names, files in the uploads folder ending in
.php, or recently modified core files. - Email problems: your mail suddenly bounces or lands in spam because the server was used to send spam from your account.
- Slow site or resource limits: sudden high CPU or bandwidth usage without a real increase in visitors.
- Security alerts: a malware notice from the hosting security scanner (Imunify360 on EgWeb servers) or from your WordPress security plugin.
How to check your site step by step
- Search Google for
site:yourdomain.comand look for pages or titles you do not recognise. - Open the site from your phone using mobile data, and from a Google search result, not only by typing the address. Some hacks only redirect these visitors.
- Check Google's Safe Browsing status at Google Transparency Report, and the Security issues report in Google Search Console if your site is verified there.
- Log in to cPanel (see how to log in to cPanel) and open the Imunify360 tool under the Security section, if available on your plan, to see any detected malware files.
- In WordPress, go to Users and filter by Administrator. Remove anyone you do not know.
- In cPanel File Manager, sort
public_htmlby the last modified date and look for files changed when nobody was working on the site.
What to do immediately if you are hacked
- Do not panic and do not delete everything. Take a copy of the current files and database first; they may be needed to find out how the attacker got in.
- Change all passwords: cPanel, WordPress admins, FTP accounts, the database user (update
wp-config.phpafterwards) and the client area. - Clean or restore: restore a clean backup from before the infection (see how to back up and restore your website), or let the scanner clean infected files.
- Update everything: WordPress core, all plugins and the theme. Delete plugins and themes you do not use, especially "nulled" (pirated) ones.
- Request a review from Google if it shows a warning, once the site is clean.
How to prevent it next time
- Keep WordPress, plugins and themes updated and avoid pirated themes and plugins.
- Use strong, unique passwords and two-factor authentication.
- Keep regular off-site backups.
- Follow the checklist in How to secure your WordPress website.
Frequently asked questions
Why do I see my site normally while customers see a spam site?
Many malware scripts hide from logged-in administrators and from people who type the address directly. They only target visitors from search engines or mobile phones, so always test the way a real customer arrives.
Will restoring a backup remove the hack?
Only if the backup was taken before the infection, and only if you also fix the weakness (usually an outdated plugin or a leaked password). Otherwise the attacker can return.
Can EgWeb clean my site?
Yes, open a support ticket with your domain name and what you noticed. Our team can review the scanner results and advise on cleaning or restoring.