πŸ“„
Webhosting

Scanning and removing malware from your website

πŸ“… 16 November 2026 ✏️ 16 November 2026 ⏱ 5 min leestijd

Suspect malware on your website? Here’s how to scan your site, recognize the symptoms, and remove malicious code step by step.

A slow website, strange redirects, or a Google warning in search results: these are often signs that your website is infected with malware. This article shows you how to recognize malware, how to scan for malicious code, and how to safely remove it without leaving your site vulnerable again.

How to recognize malware on your website

Malware manifests itself in various ways. Sometimes it’s immediately obvious, sometimes it goes unnoticed for weeks while visitors or Google have already picked up on it.

  • Your website redirects visitors to strange sites (often ads, gambling websites, or phishing)
  • Google displays a “This site may harm your computer” warning in search results
  • Unknown pages or files appear in your file manager that you didn’t upload yourself
  • Your website suddenly becomes slow or puts heavy load on the server without a clear reason
  • Strange admin accounts or users that you didn’t create
  • Visitors’ browsers or virus scanners show a warning when visiting your site
πŸ’‘ Tip: Also check your email spam folder and your hosting notifications. Many providers automatically send a warning if suspicious scripts are running on your account.

Scanning your website for malware

Before removing anything, you first need to know exactly what’s infected. A targeted scan prevents you from accidentally deleting healthy files or overlooking something.

Use the following methods to detect malware:

  • Online scanner: check your domain with an external malware scanner that views your site from the outside, as a visitor would see it
  • File comparison: compare your CMS files (for example, WordPress core files) with a clean, original version. Discrepancies are suspicious
  • Checking log files: in your hosting environment you’ll find access logs and error logs. These often show suspicious requests or attempts to execute scripts
  • Detecting modified files: look for files that have been recently modified at times when you made no changes

In Plesk you can find access logs and error messages clearly organized, which makes it easier to see which files were accessed around the time of infection.

Removing malware step by step

Once you know which files are infected, you can clean them up in a targeted way. Work systematically so you don’t overlook anything.

1

Make a backup first

Even though it sounds contradictory, first make a backup of the current (infected) situation. This way you can always retrieve files if you accidentally delete too much.

2

Take the site offline or put it in maintenance mode

Prevent visitors from seeing malicious content while you’re cleaning up.

3

Remove suspicious files and code

Delete unknown files and clean infected files by removing the malicious code. Watch for hidden code at the bottom of existing files, or at the beginning or end of lines.

4

Replace core files with clean versions

Download a clean, original version of your CMS and replace the core files. Keep only your own content, images, and settings.

5

Check the database

Malware sometimes also hides in the database, for example in posts, widgets, or settings. Search the database for suspicious script code.

6

Change all passwords

Change passwords for your CMS, FTP/SFTP, databases, and hosting account. An infection often means login credentials have been leaked or guessed.

7

Request a review from Google

If your site was on a blacklist or had a warning in search results, request a review after cleaning up so the warning disappears.

πŸ’‘ Tip: Not sure if you’ve cleaned everything properly? Restore your last known clean backup instead of continuing to search for remnants of malicious code.

Preventing reinfection

Cleaning up is one thing, preventing it from happening again is just as important. Most infections arise from outdated software, weak passwords, or insecure file permissions.

  • Always keep your CMS, plugins, and themes up to date
  • Use unique, strong passwords and enable two-factor authentication where possible
  • Set file permissions correctly so scripts cannot unnecessarily write to sensitive folders
  • Make regular automatic backups, so you can quickly restore to a clean version in case of a new infection
  • Consider a security solution that actively monitors suspicious activity and malware

A reliable hosting environment also helps: with web hosting that includes daily backups, you can quickly restore to a clean version of your site in case of an infection. If you’re considering switching to a different hosting provider, also check out the options for switching to Tandata.

Frequently asked questions

Can I remove malware myself without technical knowledge?

Simple cases, such as a single infected file, can often be resolved yourself by replacing core files. For more complex infections in the database or spread across many files, it’s wise to get help from a specialist or your hosting provider.

Why was my website infected when I didn’t do anything wrong?

Many infections occur through vulnerabilities in outdated plugins, themes, or CMS versions, not through something you knowingly did wrong. Regular updates prevent most cases.

How do I know for sure my site is completely clean again?

Compare all your files with a clean, original version, search the database for suspicious code, and run a scan after cleaning up. If in doubt, restore a clean backup.

Can malware also affect my email?

Yes, infected websites are sometimes abused to send spam through the associated email accounts. Therefore, also check your email hosting for suspicious sending activity.

Conclusion

Removing malware requires a structured approach: first scan and assess the scope, then clean up in a targeted way, and finally tighten passwords and security to prevent reinfection. Regular updates and reliable backups make the difference between an annoying incident and a long-term problem.

View web hosting β†’

Was dit artikel nuttig?