Hacked Trades Website: What Google Says and How to Clean Up Without Losing Rankings

Hacked Trades Website: What Google Says and How to Clean Up Without Losing Rankings

A hacked site can send your visitors to spam pages without you seeing it. Google lists hacked content in its spam policies. This guide shows the four types it names and a safe order for cleaning up.

I am Robiul Alom Ronju, Founder of Nexranking. The Google points below come from the pages linked in Sources. My own advice is marked as mine.

Hacked trades website: Google spam policy and clean-up order
Built from Google Search Central and Search Console Help.

What hacked content is

Google defines hacked content as content placed on your site without permission because of security weaknesses. It gives searchers poor results and can install harmful content on their devices. Owners often do not know it is there.

The four types Google names

  • Code injection: harmful JavaScript added to existing pages, or iframes.
  • Page injection: new spam or harmful pages added, often for manipulation or phishing.
  • Content injection: hidden text, hidden links or cloaking added so that search engines see it but you do not.
  • Redirects: code that sends some visitors elsewhere, depending on referrer, user agent or device.

Why you might not see it

Google notes that a result in search can redirect while a direct visit does not. That is why a hacked trades site can look fine when the owner types the address but send customers to spam from Google. Check by clicking through from a search result in a private window, and check on a phone.

A safe clean-up order

This is my own advice, based on Google’s guidance.

Order

  • Take a full backup of the site as it is, for evidence.
  • Put the site in maintenance mode if it is sending visitors to harmful pages.
  • Change every password and remove unknown users.
  • Find and remove injected files, pages and database entries.
  • Update the CMS, themes and plugins and remove ones you do not use.
  • Check the Security issues report in Search Console and fix every listed issue.

After the clean-up

Fix the problem across the whole site, not just the sample URLs. Then use the review request in Search Console, covered in the Security issues report guide. Do not delete the injected URLs without a plan: see 404, 410 and soft 404.

Signs that something is wrong

  • Customers say they were sent somewhere strange from Google.
  • Search results for your brand show titles you did not write.
  • Search Console lists a security issue or a manual action.
  • New users or files appear that nobody on your team created.
  • Your host sends a malware or suspension notice.

Keep it from happening again

This is my own advice. Remove plugins and themes you do not use, update the rest, use strong unique passwords with two-step sign-in, and limit who has admin access. A clean site that is never updated is only clean until the next weakness is found.

A worked example

Illustrative example, not a client case. A plumber’s site shows fine to him, but customers report being sent to a gambling page from Google. He finds a code injection in a theme file and 300 spam pages. He removes both, updates everything, changes passwords and requests a review in Search Console.

Mistakes I see

  • Cleaning only the pages Google lists as examples.
  • Not changing passwords after the clean-up.
  • Leaving old plugins installed.
  • Testing only by typing the address.
  • Requesting a review before every issue is fixed.

Need a second pair of eyes? Ask for an audit.

How do I know if my site is hacked?

Check the Security issues report in Search Console and click through from a search result on a phone. Redirects may only affect some visitors.

Will hacked content hurt rankings?

Google says policy-violating sites may rank lower or not appear in results.

Should I delete the spam pages?

Remove them and fix the cause. Plan what status code they return afterwards.

Can I fix it myself?

Often a host or security specialist is safer. Do not leave it half done.

Sources