Has my website been hacked? How to check, and what to do next

Last updated

The short answer

The surest signs are a warning from Google (in your search results, in the browser or in Search Console), pages on your site that you never wrote, and visitors being sent somewhere else. Check Search Console's Security issues report, search Google for site: and your domain, and look up your address on Google's Safe Browsing site status page. If it has been hacked: ask your host to contain it, take a copy, check whether customer data was exposed, change every password, clean or restore the site, update everything, then ask Google to review it.

The signs of a hacked website

Where to check, free

  1. Search Console's Security issues report. It lists the problems Google has found, with example addresses (Search Console Help). If you haven't set up Search Console, do it now: it is also where Google sends its warnings.
  2. A site: search. Type this into Google with your own domain, and look through the results for pages you don't recognize:
site:example.com
  1. Google's Safe Browsing site status. Enter your address on the Transparency Report to see whether Google currently lists it as unsafe.
  2. URL Inspection. For a page that looks fine to you but that Google flags, inspect it in Search Console to see what Google was shown. Hacked pages often show spam to search engines only.

Why it matters

What to do if it has been hacked

  1. Contain it, with your host. Tell your host, or a security specialist, straight away and ask them to isolate the site, often by taking it offline, so it can't keep harming visitors or exposing data. Many hosts also scan for malware, can restore an earlier copy and know what to look for on their servers.
  2. Take a copy before you clean. Download the site's files, database and logs as they are, and keep them somewhere safe. You may need them to find how the attacker got in, and to rescue content.
  3. Check whether customer data was exposed. If the site handled personal or payment details, ask a qualified adviser promptly whether you must tell customers or the authorities, and contact your payment provider. The FTC's data breach response guide sets out the steps. A clean website doesn't undo a leak.
  4. Change every password, from a device you trust. Hosting account, site admins, FTP or SFTP, the database and email. Remove users you don't recognize and turn on two-step sign-in wherever it is offered.
  5. Clean or restore. Restore a backup from before the hack, or have someone remove the injected files and code. On WordPress, the core folders (wp-admin and wp-includes) can be replaced with fresh copies of the same version; the theme and plugin files and .htaccess need a careful look, because they are where injected code usually hides (WordPress).
  6. Close the door. Update everything, and delete themes and plugins you don't use. Change the passwords again now the site is clean, and if a key or password was in a file the attacker could read, replace it.
  7. Ask Google to review. In the Security issues report, confirm you have fixed the problems and request a review. Google lifts its warning once the review finds the site clean.

How attackers usually get in

Most small-business sites aren't targeted by a person. Automated tools try the same known weaknesses on thousands of sites, so closing the common doors protects you from most of them.

Open doorHow to close it
Out-of-date or abandoned plugins and themesUpdate them, and replace any whose author has stopped maintaining it. Their security holes are published, which is what automated attacks look for (OWASP).
Old scripts with known holesUpdate the libraries your theme loads, such as an old copy of jQuery.
Files left where anyone can read themDelete backups, .env and .git folders and test pages from the public folder; turn off folder listings; switch off debug mode on the live site (OWASP).
Secret keys in the page's codeReplace the key, then keep it on the server so the browser never sees it.
Easy-to-find loginsKeep login pages out of search results and your menus, use strong unique passwords with two-step sign-in, and on WordPress close XML-RPC and the public list of usernames (Hardening WordPress).
Forgotten test copies of the sitePut staging and development sites behind a password, or delete them.

The settings that make a site harder to attack, platform by platform, are in website security settings by platform.

How the scan checks it

The scan looks from outside, as a visitor and a search engine do. It can't see inside your server, so a clean result is a good sign, not proof.

Checklist

Questions people ask

How do I know if my website has been hacked?
The common signs are a warning beside your site in Google's results or a red warning page in the browser, pages in a site: search that you never wrote, visitors being sent to another site, new admin users you didn't create, or a message from Google Search Console or your host. Search Console's Security issues report is the most direct place to look.
Why can't I see anything wrong when Google says my site is hacked?
Some hacks hide from the owner: they show spam only to search engines, only to visitors arriving from Google, or only on phones. This is called cloaking. Search Console's URL Inspection tool shows the page the way Google sees it.
How do I get a Google warning removed?
Clean the site and close the hole the attacker used first. Then, in Search Console's Security issues report, confirm you have fixed the issues and request a review. Google removes the warning once its review finds the site clean.
Should I just restore a backup?
A clean backup from before the hack is often the quickest way back, but restore it and then update everything and change every password before you put it live again. Otherwise the attacker comes back in the same way.
Does a clean scan mean my site hasn't been hacked?
No. A scan from outside sees what a visitor and a search engine see, and some hacks are only visible on the server. A clear blocklist result means that service didn't flag your address when it checked. It doesn't prove nobody reported the site, or that the site is clean.

What the free scan checks for this

These are the FocalScore checks that cover this guide's subject. Each one in your report says what it found, shows the evidence and gives the fix.

Sources

Last checked . Documentation, settings and rules change; if one of these pages now says something different, it is right and this guide is out of date. Tell us at info@focalscore.com.

  1. web.dev: How do I know if my site was hacked?
  2. Search Console Help: Security issues report
  3. Google Transparency Report: Safe Browsing site status
  4. WordPress: FAQ My site was hacked
  5. WordPress Developer Resources: Hardening WordPress
  6. OWASP Top 10 2025: Security misconfiguration
  7. OWASP Top 10 2025: Software supply chain failures
  8. FTC: Data Breach Response, A Guide for Business