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
- A warning from Google. A note under your listing in the search results, a red full-page warning in Chrome, or a message in Search Console saying the site is hacked or harmful (web.dev).
- Pages you never wrote. Search results for your domain showing pages selling pills, replica goods or gambling, often in another language.
- Visitors sent elsewhere. The site looks fine when you type its address, but visitors who arrive from Google, or on a phone, end up on another site.
- Changes nobody made. Admin users you didn't create, plugins you didn't install, files with odd names on the server, or an extra owner in Search Console.
- Problems elsewhere. Your host suspends the account or warns about the server sending spam, your emails start bouncing, or a customer's antivirus blocks the site.
Where to check, free
- 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.
- 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- Google's Safe Browsing site status. Enter your address on the Transparency Report to see whether Google currently lists it as unsafe.
- 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
- Customers are warned away. A browser warning stops most visitors before they see your page, and a blocklist can also stop your emails being delivered.
- Your search listing fills with spam. Pages an attacker adds compete with your real ones and can take your place in results.
- Your visitors are at risk. A hacked site can collect what they type into forms, or try to install harmful software on their devices.
What to do if it has been hacked
- 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.
- 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.
- 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.
- 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.
- 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-adminandwp-includes) can be replaced with fresh copies of the same version; the theme and plugin files and.htaccessneed a careful look, because they are where injected code usually hides (WordPress). - 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.
- 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 door | How to close it |
|---|---|
| Out-of-date or abandoned plugins and themes | Update 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 holes | Update the libraries your theme loads, such as an old copy of jQuery. |
| Files left where anyone can read them | Delete 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 code | Replace the key, then keep it on the server so the browser never sees it. |
| Easy-to-find logins | Keep 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 site | Put 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
- Malware / blocklist status: it asks Google's Web Risk service whether your address is listed as malware, phishing or unwanted software. When that lookup can't be made, the finding says it was not run; it never reports an all-clear it didn't get.
- Family and office web filters: it looks your domain up on Cloudflare's malware-filtering service, which many home, school and office networks use, and reports if it is blocked there.
- Add-ons and libraries: it reads the versions of the plugins, themes and scripts your pages show, and flags ones that are out of date, abandoned or have known vulnerabilities.
- Exposed files and leaks: it checks for readable
.gitand.envfiles, backups, folder listings, error pages that show debug detail, secret keys in your scripts and public test sites. - WordPress and logins: it checks XML-RPC, the public list of usernames, and whether login pages are in search results or linked from your pages.
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
- Search Console is set up, and its Security issues report is empty.
- A site: search for your domain shows only pages you wrote.
- Google's Safe Browsing site status shows no problem.
- Every plugin and theme is up to date and still maintained; unused ones are deleted.
- No backups, .env or .git files, test pages or folder listings are publicly readable.
- No secret key appears in your site's scripts.
- Every admin account is yours, with a strong password and two-step sign-in.
- A recent backup is kept somewhere other than the server.
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.
- Malware / blocklist status
- Family and office web filters let your site through
- Your add-ons are up to date
- WordPress add-ons are maintained
- Known vulnerabilities
- Exposed sensitive files
- No credentials in JavaScript
- Error pages leak no debug detail
- Directory listings disabled
- Exposed staging subdomains
- WordPress XML-RPC closed
- WordPress usernames not listed
- Admin pages kept out of search
- Your login page isn't advertised on the site
- Exposed software version
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.
- web.dev: How do I know if my site was hacked?
- Search Console Help: Security issues report
- Google Transparency Report: Safe Browsing site status
- WordPress: FAQ My site was hacked
- WordPress Developer Resources: Hardening WordPress
- OWASP Top 10 2025: Security misconfiguration
- OWASP Top 10 2025: Software supply chain failures
- FTC: Data Breach Response, A Guide for Business
More guides
- How to get your business recommended by ChatGPT and other AI assistants
- Why can't ChatGPT see my website? 5 reasons and how to fix them
- robots.txt for small businesses: what to allow, what to block
- What is IndexNow, and why does it matter for your website?
- The pages every small-business website needs
- How to turn more website visitors into enquiries
- Why your site is slow, and what to fix first
- How your business shows up in Google: titles, descriptions and headings
- One address for each page: www, https, canonical tags and redirects
- A sitemap for any site, including one built by hand
- Making your site usable by everyone
- Making your site work on a phone
- Security headers for a small business website: what to set, by platform
- Stop people sending email as your business: SPF, DKIM and DMARC
- Cookies and consent: what your site sets and when you need a banner
- How your links look when people share them
- Getting your business details right for Google Maps and AI assistants
- What is GEO (generative engine optimization)? A plain-English guide
- llms.txt: what it is, and does your business need one?
- AI crawler blocked? Fixing 403, 404 and 405 errors for GPTBot, ClaudeBot and PerplexityBot
- How to see if ChatGPT visits your website
- GEO vs SEO: what's the difference for a small business?
- AI SEO for small businesses: where to start
- Answer engine optimization (AEO), explained
- SPF record: what it is and how to set one up
- DMARC record: what it is and how to set one up
- DKIM record: what it is and how to set it up
- Why do my emails go to spam? How to check SPF, DKIM and DMARC
- Content Security Policy (CSP) for a small business website
- Website caching and CDNs: what they are and do you need one?
- security.txt: what it is and how to add one to your site
- What is DNSSEC, and should you turn it on?
- CAA record: what it is and how to set one up
- Largest Contentful Paint (LCP): why your page feels slow and how to fix it
- Local business schema: structured data for a small business, with a template
- Accessibility statement: what to write, with a template
- Trust badges and testimonials that help a website win customers
- Why isn't my website showing up on Google? How to get it there
- Google Business Profile: a checklist to make it match your website
- Custom 404 page: what a good one does, and the soft 404 trap
- Meta description length: how long should it be?
- Image alt text: what to write, with examples
- Broken links: how to find and fix them on your website
- Website audit checklist: a free check-up for a small business site
- Why does my website say 'Not secure'? How to fix it
- Is my website ADA compliant? An accessibility checklist for US small businesses
- Core Web Vitals explained: LCP, INP and CLS in plain English
- Interaction to Next Paint (INP): why your site feels slow to tap, and how to fix it
- Cumulative Layout Shift (CLS): why your page jumps while it loads, and how to stop it
- What should a small business privacy policy include? A checklist
- Contact form emails not arriving? Find where enquiries get lost
- Website monitoring: catch downtime, broken enquiries and expired certificates
- Moving or redesigning your website: a checklist so nothing gets lost
- How to audit a WordPress website: a checklist for owners
- Why isn't my business showing up on Google Maps?
- Does ChatGPT recommend your business? How to check, and how to fix what it gets wrong
- Why isn't my website getting customers? A three-question diagnosis
- How to get more Google reviews without breaking Google's rules
- Google Search Console for a small business: set it up and read the three reports that matter
- Who owns your domain and website? How to check, and how to get them back
- How to show up in Google AI Overviews and AI Mode: what Google's own guide asks for
- What is a good PageSpeed score? What the number means for a small business site
- How much should a small business website cost, and what to check before you pay the final invoice
- Is my website down, or is it just me? What to check, in order
- Is my SEO company actually doing anything? How to check, and how to spot a scam email
- Should I redesign my website or just fix it?
- Does your website still need an FAQ page now that Google's FAQ rich results are gone?