Скорость и безопасность

Website hacked: what to do in the first hours and how to prevent a repeat

Change your hosting, site admin, and email passwords right away, save a copy of the infected files for analysis, and restore a clean version from backup. Then close the vulnerability, or the hack will happen again. Most important: do not delete evidence and do not put off changing credentials.

Monolith Studio editorial team4 min read

Signs of a hack

  • The browser or Google warns that "this site may be dangerous"
  • Your pages with spam in a foreign language or about casinos and pills appear in search results
  • Visitors are redirected to unfamiliar sites, especially on phones
  • Unknown users or files have appeared in the admin panel
  • The host blocks the site for sending spam or excessive load
  • Search Console sent a security issue notification
  • The site suddenly slowed down and file contents changed without your involvement

Action plan

  1. Change all credentialsimmediately

    Passwords for hosting, the admin panel, the database, FTP, and email. Turn on two-factor authentication wherever it is available.

  2. Save a copy of the infected site1 hour

    You need it to find the entry point and to show the host what happened. Store it off the server.

  3. Take the site offline during the work1 hour

    Turn on a "maintenance" page so you do not infect visitors or damage your reputation.

  4. Restore a clean version2–4 hours

    Preferably from a backup made before the hack. Then update the system and plugins to the latest versions.

  5. Find the cause1–2 days

    An old plugin, a weak password, stolen access, a vulnerable theme. If you do not find the cause, the hack will return.

  6. Notify search enginesafter cleanup

    After cleanup, submit a review request in Search Console to remove the warning.

Why sites get hacked

Most often it is not a personal attack but automated brute-forcing. Bots look for sites with old versions of the system and plugins, weak passwords, and exposed folders. Small businesses are attractive because nobody watches their sites closely.

The attacker's goal is to use your site: to host spam pages for someone else's promotion, send emails from your domain, redirect visitors, or steal form data. That is why an infected site often keeps working normally, and the owner hears about the problem from a customer.

How to protect yourself in advance

Updates
The system, themes, and plugins are updated on a schedule, and unused ones are removed.
Backups
The backup is stored off the server, tested for restoration, and made daily.
Access rights
Every employee and contractor gets a separate account, and access is revoked for former ones.
Monitoring
Alerts about file changes and site downtime go to your phone.

Check adjacent systems too

If your site password matches the one for your email or ad account, change those as well. A site hack is often just the first step toward more serious access.

What to check a week after cleanup

Do not relax after the site is restored: attackers often leave a hidden backdoor and come back a few days later. Check the list of admin users, recently modified files, scheduled jobs on the server, and outgoing email. Any unfamiliar entry is a reason to investigate.

Also make sure no spam pages remain in search: a site: query in Google will show suspicious URLs, and Search Console lets you request their removal. If the site accepted payments or customer data, assess whether you need to notify users and your bank, and document the steps you took.

Shall we discuss your project?

Tell us in a few words what you need, and we'll suggest a solution and calculate the cost.

Discuss your project

FAQ

Can I just delete the malicious code?

That is risky: some malware leaves hidden copies and backdoors. It is more reliable to restore a clean version and update everything.

Do I need to tell customers?

If personal data from forms or an account area may have leaked, notify users and review the requirements of the personal data law. If in doubt, consult a lawyer.

How long does it take to recover your reputation in search?

After cleanup and a review request, warnings are usually lifted within a few days, while rankings take longer to come back.

Didn't find your question? Message us and we'll reply within one business day.

Ask a question

Website security

Your site was hacked or is acting strange

Message us — we will look at what happened and help you recover.

Call+7 708 758 18 60Message usWhatsApp
CityAktobe · we work across all of Kazakhstan

Get a quote

We'll reply within 15 minutes with an approximate price.