Skip to article content

You think your website has been hacked: what to check and how to coordinate the response

Signs that your website may have been hacked, what to review without touching anything yet, and how to coordinate the response with your technical team without losing information.

What is making you suspect your website has been compromised?

Not every site behaving oddly has been compromised. Before triggering a full response, pin down which signal first made you suspicious. These are the ones that usually show up first on a business website:

  • Searching for your site in Google shows a “This site may be dangerous” warning. That notice comes from Google Safe Browsing, not from your visitors.
  • Opening the homepage or a specific page ends up in a different address with ads, downloads or content in another language.
  • You see text, links, products or blog entries you have not published. Sometimes they only appear on mobile or when visitors arrive from a search engine.
  • Your hosting provider emails you about unusual activity, high resource use or a temporary block on your account.
  • Strange emails come from your domain, or you receive bounces for messages you never sent.
  • A customer or visitor tells you something odd happens when they open your site.
  • New users appear in the administration panel that nobody on your team created.

Note the first signal you noticed, when you saw it and from which device. Those three pieces of information are worth more than rechecking every suspicion at once. If you have not yet mentioned anything to your technical team, this is a good time to do so.

What “being hacked” really means (and what it does not)

In plain terms, a security incident is anything that affects who can reach your website, the information it holds or whether it works as usual. It does not always mean someone walked in through a back door; sometimes it is a plugin flaw, a misconfiguration or a credential leaked elsewhere.

Reference guides such as NIST SP 800-61 and the advisories from the Spanish national cybersecurity agency INCIBE separate a real incident from internet background noise. Keeping this distinction in mind helps:

  • It is an incident when someone has been able to modify content, log in without authorisation, inject code, access or expose customer data, or use your site to redirect visitors elsewhere.
  • It is not an incident in itself to receive dozens of failed login attempts each day (almost every website does), to see traffic spikes from a specific country via a legitimate link, or to notice PHP errors shown only to administrators.

Drawing this line is not about minimising the issue. It helps decide which response fits: maintenance work, a deeper review or urgent containment.

Before touching anything: preserve information

The most common mistake when discovering an intrusion is reacting blindly. Logging in, deleting the odd file, changing a password, restoring yesterday’s backup. Any of those may be the right step, but only in order and once you have saved something you cannot retrieve later.

Both the NIST SP 800-61 response guide and INCIBE advisories emphasise that preservation comes before clean-up. For a small business website that translates into simple actions:

  • Before restoring anything, ask your technical team or hosting support for a copy of the current state: files and database. You will not use it to republish; you need it so you can look afterwards at what the site looked like when you found the problem.
  • Also request the access logs from the last few days (server and admin panel logs if available). OWASP notes that these records are the main source for understanding how and when someone got in.
  • Take screenshots of what you see: the altered homepage, the Google warning, the hosting emails, the list of unknown users. Note the time of each one.
  • Write down what you noticed: date, time, URL, device, what you were doing when the issue appeared.

This is what separates an ordered response from an improvised one. You do not need a cybersecurity team to do it properly.

Who should take part in the response

It depends on the size of your company and on the contracts you have in place, but a small business website usually involves four roles:

  • You or the person responsible for the website. You coordinate the response and decide what is communicated to customers, what is published while the investigation runs and when the incident is considered closed.
  • Your technical team or maintenance provider, whether internal, an agency or a freelancer. They review files, apply patches and carry out corrections.
  • Hosting support. Their team can see things that neither you nor whoever maintains your website notice from the admin panel: server processes, complete logs and unusual network activity. They are often the most useful contact in the early hours.
  • A legal advisor or Data Protection Officer if your website holds customer or subscriber information. The Spanish data protection authority AEPD guidance on breach notification states that, when a security incident affects personal data and poses a risk to the individuals, you have 72 hours from awareness to notify. Not every incident reaches that threshold, but each one deserves an informed decision.

You do not need all four from minute one. You do need their contact details ready before you need them, and you need to agree out loud who notifies whom.

What to check first

Building on what you already preserved, these checks tend to provide clearer answers earliest. The table is not an automatic diagnosis: each signal needs context, but it helps you choose where to start.

Common signals and where to look
Observed signalWhere to lookWhat it may indicate
Google warning when searching for your siteSearch Console Security Issues report.Google has detected compromised content on some of your pages and lists the affected URLs.
Redirects to pages that are not yours.htaccess, the active theme and recently modified files.Injected code to divert traffic, especially from search engines or mobile devices.
Unknown users in the admin panelList of users with administrator or editor roles.Someone has created credentials with high privileges or has access to create them.
Resource spikes or intermittent slownessHosting dashboard and server access logs.Processes running without your authorisation, mining scripts or mass mailings.
Strange emails sent from your domainMail server logs and headers from returned messages.Someone uses your domain to send mail without going through your credentials.

If the panel shows accounts you do not recognise, it is a good moment to review who has access to your site and with which permissions. That review usually answers several questions on its own.

If the intrusion is confirmed: contain before cleaning

When the checks confirm the intrusion is real, the priority is to contain the damage without losing the ability to understand what happened. At this stage, the technical team usually does the following (the exact order depends on the case):

  1. Take the site offline for visitors if it is redirecting to dangerous content. A “we will be back shortly” message is better than keeping the traffic diverted. Weigh this up carefully: if the incident is contained and the public is not at risk, taking the site down also has a cost.
  2. Close all active sessions and change passwords for the admin panel, the hosting account, FTP and the database. Do not reuse previous passwords and do not keep them only on a local sheet that may already be compromised.
  3. Update the affected components when the source is identified (a plugin, a theme, a tool version). If you do not know what to update, waiting and reviewing calmly is better than updating everything and losing traceability.
  4. Decide between fixing in place or restoring a backup. Restoring is fast, but if the backup was also compromised (it can go unnoticed for days), you end up back where you were. Before recovering anything, check the backup’s date and what it includes.
  5. Do not declare the site clean until someone with the right technical judgement has reviewed the theme, the CMS core and files that should not have changed recently. Removing visible content is only part of the job.

What to avoid: deleting in a hurry without saving the previous state, formatting the hosting account as a first measure, or publishing a statement before you understand the scope.

An example

Fictional example: a services company opens its website first thing in the morning and the homepage shows banners for a casino. Clicking any menu item sends the browser to a page in another language.

The person responsible switches the site to maintenance mode so it is no longer public and alerts whoever maintains the website. Before deleting anything, they ask the hosting provider for a full copy of the current state and the access logs from the previous fifteen days. They screenshot the browser and keep the emails that flagged the unusual activity.

Reviewing the logs, they locate repeated access to a theme file from an unknown IP address. Whoever maintains the website compares that file with a clean copy and finds a snippet of injected code that created the redirects. In parallel, they close active sessions and change the admin panel and hosting passwords.

They verify that the database has not been touched and that customer credentials were not stored in the compromised files. With that information, the legal advisor concludes there is no significant risk to personal data and no notification to AEPD is required. They keep the site under observation for a week before considering the incident closed.

On a different website, with a different database and a different type of information, the same sequence could require a formal notification and a message to customers. That is why each case is assessed on its own data, not with a universal recipe.

How to tell the incident is over

Having your website open again does not mean the incident is closed. These are the signs that usually accompany an orderly recovery:

  • The Google Safe Browsing warning has disappeared after requesting a review in Search Console and the affected URLs are clean again.
  • Access logs do not show suspicious activity for a reasonable observation period (one or two weeks, depending on the case).
  • Key files (theme, CMS core, .htaccess) match a trusted version and files that should not have changed still carry their original timestamps.
  • The list of users with panel access matches your expectations and new credentials have been communicated through channels you control.
  • Outgoing email from your domain has returned to its usual pattern, without bounces to addresses you never wrote.

If the response was urgent, keeping the site under observation matters as much as cleaning it. Once the incident is closed, it can be worth running a preventive review to understand what other exposures you may have and in what order to address them.

If you would like us to review it with you

A website incident is easier to manage with someone technical looking at it alongside you. If you prefer not to do it alone, tell us what you have seen and we can help you decide what to do next. If you need us to investigate, we will explain the proposed work and agree the timeframe with you before we begin.

If your intention is not to respond to an incident but to run a preventive security review, starting with a security report usually fits better. Our security area gathers the rest of the related pieces.