How to Handle a Hacked Website: A Step-by-Step Response

Hosting, Security & Maintenance3 min readBy the Monopage team

Finding out your site has been hacked is stressful. Signs include defaced pages, strange redirects, warnings in search results or browsers, unknown admin users, or your host suspending the site. A clear plan helps you act without making things worse.

Step 1: Stay calm and confirm

Check whether it really is a compromise. Look for unexpected changes, security warnings, and messages from your host. Search Console may show a security issue. Take screenshots and notes of what you see.

Step 2: Contain the problem

  • Contact your host immediately. Many have security teams and tools, and can tell you what they see.
  • Consider putting the site into maintenance mode or taking it offline briefly, particularly if it is attacking visitors or serving malware.
  • Change passwords for your hosting, CMS admin, database, FTP or SSH, email, and anything else connected, using a device you trust. See password managers for small teams.
  • Turn on two-factor authentication. See two-factor authentication for website accounts.
  • Remove unknown users and review who has access.

Step 3: Find out how it happened

Typical causes are outdated plugins, stolen or weak passwords, vulnerable themes, or compromised devices. Check logs with your host's help. Without understanding the entry point, you may be reinfected.

Step 4: Clean up or restore

Two broad options:

  1. Restore from a clean backup made before the compromise. Often the safest approach. Make sure the backup is truly clean, and apply updates before going live. See website backups: how and why.
  2. Clean the site manually or with a professional. Hidden backdoors are common, so incomplete cleanups often lead to repeat hacks. Consider getting professional help.

Then update everything: core software, plugins, and themes, and delete unused ones. See WordPress updates and plugins: how to manage them.

Step 5: Check for secondary damage

  • Spam pages or links injected into your site
  • Redirects that only appear for some visitors or on mobile
  • Changes to .htaccess or other server files
  • New scheduled tasks
  • Compromised email or DNS settings

Step 6: Deal with search and browser warnings

Once clean, request a review in the tool that flagged you, such as Search Console's security issues report, and explain what you fixed. Check that spam pages are removed and return proper not-found responses. See how to set up Google Search Console and 404 errors and soft 404s for SEO.

Step 7: Consider your obligations

If personal data may have been exposed, some laws require notifying regulators and affected people, sometimes within a short deadline. For example, GDPR can require notifying the authority within 72 hours in some situations. Rules vary. This is general information, not legal advice, so get qualified advice quickly if customer data may be involved. See GDPR and your website basics. Be honest with customers about what happened.

Step 8: Prevent a repeat

Learn from it

Write down what happened and what you changed. See how to keep a website changelog.

Common mistakes

  • Restoring without finding the cause
  • Changing only the admin password
  • Ignoring search warnings
  • Hiding the incident from affected customers

Understanding what your server is telling you can speed up diagnosis. Read HTTP status codes explained for website owners.