"Is my website safe?" cannot be answered yes or no, and anyone who answers it that way is selling something. What you can get is an honest picture: whether your site is currently compromised, whether it is easy to compromise, and whether you could recover if it happened tomorrow. Those are three separate questions and most people only think about the first one.
Is it compromised right now?
Compromised sites usually do leave traces. Look for these:
- Search results that are not yours. Search site:yourdomain.com in Google. Pages about products you do not sell, in languages you do not use, are the classic sign of injected spam content.
- Google Search Console messages. Security issues and manual action notices appear there before you notice anything yourself. If you have never set it up, do that first — it is free and it is the only channel Google uses to tell you.
- Behaviour that depends on who is looking. Injected code often hides from logged-in administrators and from direct visits, and only triggers for visitors arriving from search on a phone. Test your site in a private window, on mobile data, arriving from a Google result.
- Files you did not put there. Unexpected PHP files in an uploads folder, recently modified core files, new administrator accounts, scheduled tasks you do not recognise.
- Outbound behaviour. Your domain appearing on a spam blocklist, or your host emailing you about mail volume, usually means something is sending mail through your server.
If several of these line up, treat it as a confirmed incident and skip to the recovery section.
Five questions that decide your real risk
Absent an active incident, your risk is mostly determined by five things. Answer them honestly.
- What is running, and is it patched? Most sites are broken into through known vulnerabilities in software that had an update available. Not a clever new attack — an old one, automated, against whoever has not updated. Core, plugins, themes, and the language runtime underneath them all count.
- How many people can change the site, and how do they log in? Every administrator account is a way in. An account with a password reused from somewhere that has been breached is a way in that requires no skill at all. Two-factor authentication on the handful of accounts that genuinely need admin rights removes most of this category.
- What does the site hold? A brochure site that takes no data and processes no payments has a bad day if it is defaced. A site holding customer records or card data has a legal problem, a notification obligation and a trust problem. Match the effort to the stakes.
- Is the plumbing exposed? Database admin tools reachable from the internet, a staging copy on a public subdomain with the same database, a .git directory or .env file served as a static file, a backup zip in the web root. These are self-inflicted and found by automated scanning within days.
- Could you restore? Not "do you have backups" — "have you restored one". A backup you have never tested, or one stored only on the same server, is a plan rather than a safeguard.
The things most often wrong on small business sites
From the pattern of what passive checks turn up, the recurring issues are mundane:
- HTTPS configured on the main domain but not on www, or the http version never redirected.
- No Strict-Transport-Security header, so the redirect can be bypassed on a first visit.
- No Content-Security-Policy, which means any script that gets injected runs with full access to the page.
- A version number advertised in a response header, matching software that is a year or more behind.
- Plugins installed for a campaign two years ago, still active, no longer maintained upstream.
- One shared administrator login that several people and an old agency all know.
None of these are exotic, and all of them are cheap to fix. That is the useful conclusion: for most small sites, "safe" is less about sophisticated defence and more about not leaving the obvious things undone.
If something is wrong: what to do first
- Preserve evidence before you clean. Take a full copy of the files and database as they are now, and download your server access logs. If you clean first you lose the only record of how they got in — and you will very likely be cleaned out again the same way.
- Change the credentials that matter, in order. Hosting control panel, domain registrar, SFTP and SSH keys, database user, then site administrator accounts. Rotate any API keys and tokens that were stored in files on the server.
- Restore from a known-good backup rather than hunting for injected code. Finding every modified file by hand is slow and you will miss one. Restore from before the compromise, then immediately apply all updates before putting the site back online.
- Close the door you came in through. Work out the entry point from the logs. If you cannot determine it, assume the most likely candidate — an unpatched component — and update everything.
- Ask Google to re-check. Once the site is clean, request a review in Search Console. Until you do, warnings can persist in search results and in browsers.
- Tell people if you have to. If personal data was exposed, you may have a notification duty depending on where you and your customers are. Find out rather than assume.
Two things that are not what people think
"Nobody would bother attacking us." Most attacks on small sites involve no decision about the target at all. A vulnerability is published, automated tools sweep broad ranges of the internet looking for the affected version, and whatever answers gets exploited. Your site is not chosen; it is simply reachable and unpatched. Obscurity is therefore not a defence, because obscurity assumes somebody is choosing.
"We have a security plugin, so we are covered." A plugin or a web application firewall is useful — it rate-limits logins, watches for changed files and blocks some common patterns. What it does not do is make an out-of-date component safe, give you a tested backup, or stop someone logging in with a password that leaked from another website. Treat it as one layer, not as the answer.
A realistic standard to hold yourself to
You will not make a website impossible to attack, and chasing that is a good way to spend money on the wrong things. A reasonable standard for a small business site is: everything patched within days of a release, a short list of named admin accounts with two-factor authentication, HTTPS enforced properly with HSTS, the common security headers set, nothing exposed in the web root that should not be, and a backup you have actually restored in the last six months. If all of that is true, you are in better shape than most, and the remaining risk is the kind you accept deliberately rather than discover afterwards.