Problem · Security
Your website was hacked: in the first hour, contain the damage and keep a record
In the first hour, do not start deleting files. Write down what you see and when. Take the site offline properly, not just hidden from Google, and tell your host. Remove accounts you do not recognise and change every password: hosting, database, site admin and email. If your business is a company, CERT-In's directions require website intrusions to be reported within six hours. Cleaning and asking Google to lift any warning come after.

On this page
- Pages you did not write, links to other sites,
- or a browser warning before your site opens
Site compromised
The first hour, one door at a time
You notice pages, links or warnings on your site that you did not put there
-
1Have you written down what you see and when?
YesDo it now: what looks wrong, the time you noticed, what changed recently. Take screenshots.WordPress guidance 4
-
2Is the site still serving pages to visitors?
YesTake it offline properly, with a temporary-unavailable page served from outside the hacked server; ask your host if unsure.Google recovery guide 2
-
3Does your host not know yet?
YesTell them. They can check their other customers and help with recovery.Google recovery guide 3
-
4Are there logins you do not recognise, or passwords unchanged since the hack?
YesDelete unknown accounts and change every password; scan your own computer too.Google and WordPress 2,4
-
5Is your business a company, or could customer data be exposed?
YesReport to CERT-In within six hours, and plan the notices the data protection law requires.Indian rules 1,5
The damage contained and the attacker locked out; cleaning, fixing the hole and asking Google for a review come next
On this page
Before you touch anything, write down what happened
The natural reaction to a hacked site is to start deleting things. WordPress's own guidance for hacked sites says the opposite: stay calm, and make documentation the first step. Note what you are seeing that makes you think you were hacked, the time you noticed it and the time zone, and what changed recently, such as a new plugin, a theme change or a widget. That becomes the baseline of an incident report, useful whether you fix it yourself or bring in a professional 4.
The same guidance lists the clear signs of a hack: the site flagged by Google or Bing, the host disabling the site, warnings that it distributes malware, visitors' antivirus flagging it, reports that it is being used to attack other sites, users or changes you did not make, or changes you can see in the browser 4.
Take the site offline properly, and tell the host
Containment, in the first hour
-
Take the site fully offline
Stop serving pages, for example a temporary-unavailable (503) page served from outside the hacked server, so visitors are not exposed 2.
-
Do not rely on hiding it from Google
A block only stops search crawlers; visitors can still reach harmful pages 2.
-
Call your host
They can check whether other customers were affected and may help recover the site 3.
-
Lock out the attacker
Delete accounts you did not create, and change every password: hosting, FTP, database, administrators and the site's admin 2.
-
Scan your own computer
Attacks often start with stolen logins from the owner's own machine 4.
Google's recovery guide says that taking a compromised site completely offline lets you work with less interference from the attacker, keeps harmful files away from visitors, and is unlikely to affect your future search ranking if done temporarily during recovery 2. It warns that simply returning an error code from the hacked server is not enough, because harmful content can still be served with it 2. If you do not know how to take the site offline, your host does.
The reports Indian rules can require
CERT-In, India's national computer emergency response team, issued directions in April 2022 under section 70B(6) of the Information Technology Act. They require any service provider, intermediary, data centre, body corporate and government organisation to report the incidents listed in their annexure to CERT-In within six hours of noticing them or being told of them, by email, phone or fax; the list includes defacement of a website, intrusion into a website, and unauthorised changes such as inserted malicious code or links to other sites 1. A registered company is a body corporate; whether a sole proprietor or partnership is covered is a question for your lawyer or accountant, and reporting when unsure costs little.
Separately, if the hack may have exposed customers' personal data, such as names, phone numbers or order details, the Digital Personal Data Protection Act requires the business to inform the Data Protection Board and each affected person, in the form and manner the rules prescribe 5.
| Who | When | Why |
|---|---|---|
| Your host | At once | They can contain it and check other customers 3 |
| CERT-In | Within six hours, if the directions cover your business | Required by its April 2022 directions 1 |
| The Data Protection Board and affected customers | If personal data may be exposed | Required by the data protection law 5 |
| Google, through Search Console | After the site is clean | To request a review of any security warning 6 |
After the first hour: clean, close the hole, ask for a review
Google's guide says fixing a site yourself needs the ability to read code and use server tools; if that is not you, find a qualified professional, for example through referrals from experienced members of reputable help communities 3. Once the site is clean, Search Console's Security Issues report lets you request a review of any warning Google shows, and Google says a review can take from a few days to a few weeks 6.
Our view: the first hour is about containment and records, not cleverness. An owner who can say exactly what they saw, when, and which passwords were changed gives whoever cleans the site a head start.
The first hour, on one card
- Screenshots and notes: what, when, what changed recently.
- Site offline, served from outside the hacked server.
- Host told.
- Unknown accounts deleted; every password changed.
- Your own computer scanned.
- CERT-In told within six hours, if the directions cover you.
- Personal data exposure assessed.
Questions people ask
Will taking my site offline hurt my Google ranking?
Google says taking a site offline temporarily during recovery is unlikely to affect future ranking 2.
Do I have to report a hack to CERT-In?
CERT-In's directions require service providers, intermediaries, data centres, body corporates and government organisations to report listed incidents, including website defacement and intrusion, within six hours 1. Check with your lawyer or accountant whether your business form is covered.
How long does Google take to remove a hacked-site warning?
After you request a review in Search Console's Security Issues report, Google says it can take from a few days to a few weeks 6.
My site shows a 'Not secure' warning. Is that a hack?
Usually not; it is about the connection. Our guide on the Not secure warning explains it.
Sources
Every figure on this page, with where it came from.
- 1
Indian Computer Emergency Response Team (CERT-In), Ministry of Electronics and Information Technology, Directions under sub-section (6) of section 70B of the Information Technology Act, 2000 (28 April 2022).
Supports: Service providers, intermediaries, data centres, body corporate and government organisations shall report Annexure I incidents within 6 hours of noticing; email, phone, fax; Annexure I includes defacement of website or intrusion into a website and unauthorised changes such as inserting malicious code or links - 2
web.dev (Google), Quarantine your site (hacked sites recovery series).
Supports: Take the site offline, e.g. 503 from outside the compromised server; 4xx or 5xx from the hacked server not enough insufficient; temporary offline unlikely to affect ranking; contact hoster; delete illicit accounts; change passwords for FTP, database, system administrators and CMS accounts - 3
web.dev (Google), Build a support team (hacked sites recovery series).
Supports: Tell your hoster; hoster can check other customers and help recover; fixing yourself needs code and server skills; find a qualified professional through referrals from reputable communities - 4
WordPress.org Documentation, FAQ My site was hacked.
Supports: Indicators of compromise; stay calm; document what you see, the time and recent changes as the baseline incident report; scan the website and the local computer; check with the hosting provider - 5
Government of India, Ministry of Law and Justice, The Digital Personal Data Protection Act, 2023, section 8(6).
Supports: In the event of a personal data breach, the Data Fiduciary shall give the Board and each affected Data Principal intimation in the form and manner prescribed - 6
Google Search Console Help, Security Issues report.
Supports: After fixing, request a security review in the Security Issues report; a review can take from a few days to a few weeks
Read next
A site that is kept updated, backed up and watched is much harder to break into; that upkeep is part of our website care.