All posts

Blog

How to Scan Your Website for Malware (and What to Do If You Find Some)

Illustrated cover for the Security & SSL guide "How to Scan Your Website for Malware (and What to Do If You Find Some)"

Website malware rarely announces itself. There's no flashing warning on your homepage. Instead, you might notice your traffic dropping, customers mentioning odd redirects on their phones, or your host telling you an account is sending spam. By then, the infection may have been there for weeks.

Regular malware scanning catches problems early, while they're easier to clean. This guide explains the types of scans available, how to run them, and what to do if something turns up.

What website malware looks like

Malware on websites comes in many forms. Common examples include:

  • Malicious redirects that send some visitors, often only mobile users or those arriving from search engines, to scam or spam sites
  • SEO spam: hidden links or entire pages of pharmaceutical, gambling or counterfeit-goods content injected into your site
  • Backdoors: small scripts that let attackers return even after you change passwords
  • Credit card skimmers injected into checkout pages
  • Phishing pages uploaded into a folder of your site to impersonate banks or other brands
  • Spam mailers that use your hosting account to send junk email
  • Cryptominers that use visitors' browsers or your server's CPU

Many infections are designed to hide from site owners, for example by showing clean pages to logged-in admins while serving malware to everyone else.

Warning signs to watch for

Run a scan right away if you notice:

  • Browser or search engine warnings such as "This site may be hacked" or "Deceptive site ahead"
  • Strange pages showing up when you search site:yourdomain.com
  • Unexpected redirects, pop-ups or ads
  • New admin users you didn't create
  • Files you don't recognize, especially PHP files in upload folders
  • Sudden spikes in CPU usage, bandwidth or outgoing email
  • Your host suspending the account or reporting abuse

Types of malware scans

No single scanner catches everything, so it helps to understand what each type can and can't see.

1. External (remote) scanners

These tools visit your site like a regular browser and inspect the pages they receive. Examples include Sucuri SiteCheck and similar free online checkers.

Good at: spotting visible malware, injected scripts, spam links, blocklist status and outdated software versions that are publicly exposed.

Limitations: they only see what the server sends to them. They can't see backdoors sitting quietly on the server or files that aren't linked from public pages.

2. Blocklist and search console checks

  • Google Search Console has a Security Issues report that tells you if Google has detected malware, hacked content or deceptive pages on your verified site.
  • Google Safe Browsing's site status lookup shows whether a URL is currently flagged.

If you don't have Search Console set up for your site yet, do it now. It is free and also gives valuable SEO data.

3. Server-side scanners in your hosting account

Server-side scanners inspect the actual files on your hosting account, so they can catch hidden backdoors and infected files that external scans miss.

Many hosts provide tools in the control panel. Depending on your host, you may see options such as:

  • Imunify360 or ImunifyAV, which scan files and can often clean or quarantine malicious ones
  • ClamAV-based virus scanners
  • Proprietary malware scanners

In cPanel, look under the Security section for a scanner icon. In DirectAdmin, check the extra features or security area. If you can't find a scanner, ask your host's support team whether they scan accounts automatically.

4. Application-level scanners (WordPress plugins)

For WordPress, security plugins such as Wordfence, Sucuri Security and others can:

  • Compare core files with the official versions and flag changes
  • Check plugin and theme files against known-good versions from the repository
  • Look for known malware signatures and suspicious code patterns
  • Alert you to vulnerable plugins

These are useful, but remember that if an attacker has full access, a plugin running inside an infected site can be tampered with. Combine them with server-side scanning.

How to run a thorough check

Here's a practical routine for a small site:

  1. Run an external scan of your homepage and a few key pages.
  2. Check Google Search Console for security issues and unfamiliar pages in the indexing reports.
  3. Run your host's server-side scanner across the entire account, not just the main site folder. Include add-on domains and subdomains.
  4. If you use WordPress, run a security plugin's full scan, including core file integrity checks.
  5. Review users and recent changes: check for unknown admin accounts, recently modified files, and unexpected scheduled tasks (cron jobs) in your control panel.
  6. Check outgoing email if your host shows mail statistics, looking for unusual volume.

Schedule this. A monthly manual check plus automatic daily scanning, if your host or plugin offers it, is a sensible baseline.

What to do if malware is found

Finding malware is stressful, but a methodical approach works. Our website hacked recovery guide walks through the full process. In short:

  1. Don't panic-delete everything. Take a backup of the current infected state first, so you can investigate and don't lose content.
  2. Change passwords for your hosting account, FTP, database and site admin accounts, and turn on two-factor authentication. See strong passwords and 2FA.
  3. Clean or replace infected files. For WordPress, replace core files with fresh copies and reinstall plugins and themes from official sources rather than trying to edit infected copies.
  4. Look for backdoors in upload folders, unusual file names and recently modified files.
  5. Restore from a clean backup if you have one from before the infection, then update everything immediately.
  6. Find the cause: usually an outdated plugin, a weak password or a compromised computer. If you don't fix the entry point, the infection often returns.
  7. Request a review in Google Search Console once the site is clean if it was flagged.

If the infection is extensive, or you handle customer payment data, professional cleanup is worth considering.

Preventing reinfection

  • Keep CMS core, plugins and themes updated, as covered in our WordPress security checklist
  • Remove plugins and themes you don't use
  • Use strong, unique passwords and 2FA everywhere
  • Keep regular off-site backups following the 3-2-1 backup rule
  • Avoid "nulled" or pirated premium themes and plugins, which frequently contain malware
  • Scan your own computer too, since stolen FTP or admin credentials often come from infected devices

Wrapping up

Malware scanning works best in layers: external scans to see what visitors see, blocklist checks to see what search engines think, server-side scans to find hidden files, and application scans for CMS-specific issues. Run them regularly, act quickly on warning signs, and fix the root cause so a cleanup actually sticks.