Zevonix Cloud
Menu
Home › Blog

What to Check When a Malware Scan Flags a Website File

6 min read

Illustration of a magnifying glass examining a file beside a simple server folder.

If you are wondering what to check when a malware scan flags a website file, start by slowing down and recording what the alert actually says. A flagged file may need attention, but the alert alone may not explain what the file does, how it was detected, or whether it is malicious. Deleting it before investigating can remove useful evidence or affect how the site works.

The goal is to understand the finding, preserve what may help with an investigation, and agree on a safe next step with your hosting provider or security professional.

Record the full alert before changing anything

Save the alert or take a screenshot, and note the details below. If the scanner has a report page, save or export the relevant information if that option is available.

Keep the original alert wording. A short label such as “infected file” may leave out details the scanner provides elsewhere. For background on how scanner alerts are presented, see Wordfence’s alert documentation.

Notebook and folder arranged beside a small shield-shaped paperweight.

Understand whether the alert names a file or a page

A file path identifies an item stored on the server, such as a plugin file, theme file, image, or script. A web address, or URL, points to content visitors can reach in a browser. A URL in an alert might lead to a page that displays unwanted content, while a file path points to a location that may contain code or data. One alert can mention both, but they are not interchangeable.

Ask the scanner provider or host to clarify what was detected and where. A finding might refer to a known malicious pattern, a change from an expected software file, suspicious content, or a page that has been altered. The exact meaning depends on the scanner and its evidence. Google’s malware and unwanted software guidance can help explain how security issues may appear in search-related reports, but it does not replace investigating the specific file on your site.

Check the file’s role and the scanner’s evidence

Before deciding what to do, find out what the file is supposed to do and why it was flagged. Consider these questions:

A changed file is not automatically malicious. Site owners and developers may customize files, and extensions can include code a scanner does not recognize. On the other hand, a familiar filename is not proof that a file is safe. Ask the provider to explain the basis for the detection and, where appropriate, compare the file with a trusted original that matches the installed version. Wordfence’s WordPress cleanup guide describes investigation steps for WordPress findings.

Preserve evidence and avoid blind deletion

Do not delete, rename, or edit the flagged file just to make the alert disappear. Changing it can affect the site and may make it harder to understand what happened. Before cleanup, ask your host or security provider how to preserve a backup or snapshot and whether relevant access and error logs can be retained. Record the alert and its time before anyone changes the file.

Keep evidence in a secure place, and do not send passwords, private keys, database credentials, or configuration files that contain secrets in an ordinary support message. If a provider needs access or additional material, ask for a safe way to share it.

If there are signs of wider compromise, the site is inaccessible, or you cannot tell what the file does, hand the investigation to your hosting provider or a qualified security professional. A security alert deserves prompt attention, but hurried cleanup can make the situation harder to assess. If you already made a change and the site is now broken, this guide on what to check when a site remains broken after a restore may help you organize the next steps.

What to send your web host

A clear message helps the provider understand what you need without guessing. Include the scanner name, exact alert wording, full path or URL, detection time and time zone, and any safe-to-share signature or snippet. Mention recent site changes and symptoms. Then ask specific questions:

You can adapt this message:

Subject: Request to investigate website malware alert
A scanner flagged this item: [paste the exact alert]. The reported path or URL is [paste it], and the alert was recorded at [time and time zone]. Recent site changes include [brief details]. Please confirm what evidence triggered the detection, whether this is a server file or a public URL, and whether it can be compared with a trusted original. Please advise how to preserve the file and relevant records before any change, check for related findings, and recommend a safe remediation and follow-up check. I have not intentionally changed or deleted the flagged item. [Adjust this sentence if you have.]

If the alert may be a false positive

Ask the scanner provider what specifically matched and whether the result can be reviewed. A false positive is possible, but it is better to confirm that with evidence than to dismiss the alert based on a familiar filename or an otherwise normal-looking website. A site can appear normal while a particular file still needs investigation.

If a clean, trusted copy for the same software version is available, ask whether a comparison can help resolve the finding. Do not replace a file with one from an unrelated version or an untrusted source. If the scanner allows you to submit a finding for review, follow its process and keep a copy of the alert while you wait.

Frequently asked questions

Should I delete a file as soon as a scanner flags it?

Usually, do not delete it blindly. First record the alert and ask your host or security provider how to preserve the file and investigate the finding. If there is an urgent risk, follow the provider’s incident guidance.

How can I compare a suspicious WordPress file with its original?

Ask for a comparison with a trusted copy that matches the installed WordPress, theme, or plugin version. A difference can point to a change that needs review, but it does not by itself prove the file is malicious.

What records should I save before a file is changed?

Keep the scanner report, exact alert wording, full path or URL, detection time and time zone, any shown signature or snippet, relevant recent change details, and site symptoms. Ask your host whether a backup or snapshot and relevant access or error logs can be retained.

What if I cannot tell what the file does?

Do not guess or remove it just to clear the alert. Ask your hosting provider or a qualified security professional to investigate the file, related findings, and relevant records.

Take the next step carefully

A useful response to a malware alert begins with the evidence: what was flagged, where it is, when it was detected, and why the scanner considers it suspicious. Preserve that information and ask for investigation before making a change you cannot easily undo. If you need help understanding a website security finding, contact your hosting provider with the alert details and ask what they can review.