How malware gets onto a website

There are three common routes: an outdated plugin or theme with a known security flaw, a guessed or stolen password for the admin area or FTP, and pirated “free” versions of paid plugins with malicious code bundled in. Most attacks are carried out by automated bots that try thousands of websites at once. They are not looking for interesting companies; they are looking for websites with a hole.

Signs of infection

  • visitors on mobile or from Google are redirected to scam pages,
  • unfamiliar pages appear under your site in Google, for example for drugs or casinos,
  • the browser or Google shows a warning that the site is dangerous,
  • your hosting provider blocks the site because it is sending spam,
  • an unknown user appears in the admin area.

The owner often notices nothing. The malware may, for example, show itself only to visitors from Google or only on mobile.

Why it matters

A hacked website loses customer trust and search rankings. If Google flags the site as dangerous, traffic falls almost to zero. For an online shop there is also the risk of a customer data leak, which is a GDPR problem too.

A real-world example

A guesthouse from Senec noticed that bookings had stopped coming in. It turned out that mobile visitors were being redirected to a scam page with a fake prize. The attacker had got in through an old plugin. The site had to be cleaned, restored from a clean backup, all passwords changed, and a request made through Search Console to remove the warning.

How to protect yourself

  • Regular updates for everything running on the site.
  • Strong passwords and two-factor authentication for administrators.
  • A firewall and regular security scans.
  • Backups stored off the server, so there is something to restore a clean site from.
  • No pirated versions of plugins or themes.

I handle website security and monitoring as part of website maintenance.