=== After the Hack ===
Contributors: howitwork
Tags: hacked, spam, seo, 410, malware cleanup
Requires at least: 6.0
Tested up to: 7.1
Requires PHP: 7.4
Stable tag: 1.0.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Your site was hacked and you cleaned it, but the casino spam is still in Google. Answer those addresses with 410 Gone and track the recovery.

== Description ==

Removing the malware is only half of the job. Thousands of spam addresses can stay in search results for months after the site is clean, under your domain name.

After the Hack handles that second half:

* **Import the spam list** from a Search Console CSV export, or paste it.
* **Sort it automatically.** Each address is scored for casino and pharma words, random codes, foreign-script text and cut-off generated titles.
* **Answer with 410 Gone**, which tells search engines the page was removed on purpose.
* **Check every address** and spot spam that still loads, which is a sign the hack is not fully cleaned.
* **Publish a temporary sitemap** that invites Google to revisit the removed addresses.
* **Track the recovery.** See which addresses a crawler identifying as Googlebot has received the 410 for.
* **Add wildcard rules** for hacks larger than the 1,000 rows Search Console can export.

= It cannot remove a real page =

The 410 is only sent when WordPress has nothing to show at that address. If a real post or page is listed by mistake, it keeps loading normally. The one exception is spam that uses a query string on your home or search page, such as `/?casino=win`, which only ever matches the exact addresses you marked.

= What it does not do =

This is not a malware scanner and it will not clean an active infection. Clean the site first. It also cannot promise how quickly Google will drop a page: that often takes weeks and can take months.

== Installation ==

1. Install and activate the plugin.
2. Go to Tools > After the Hack and read the Recovery checklist tab.
3. Import your spam addresses, mark them as gone, and run the status check.
4. Under Speed up removal, publish the temporary sitemap and submit it in Search Console.

== Frequently Asked Questions ==

= Why 410 rather than 404? =

A 404 says the page was not found. A 410 says it was removed on purpose. Both lead to removal from the index, and a 410 is the clearer signal for pages that are never coming back.

= Should I block the spam in robots.txt? =

No. Google has to visit an address to receive the 410.

= Does a temporary sitemap of removed pages really help? =

It is a practical way to prompt recrawling, used by people cleaning up after these hacks, but it is not an official Google recommendation. Remove it when the cleanup is finished.

= Can I deactivate the plugin when I have finished? =

Yes, once the Pages report in Search Console no longer shows the spam as indexed. Addresses will then answer with your normal 404.

= How accurate is "Seen by Googlebot"? =

It records requests whose user agent says Googlebot. It does not verify the visitor's IP address, so treat it as a progress indicator. The Pages report in Search Console is the final word.

= What data leaves my site? =

None. The status check only requests addresses on your own site.

== Changelog ==

= 1.0.0 =
* First release.
