Site hacked had 30 pages now has 3+ million! How to remove invalid pages?

swheat

Junior Member
Joined
Aug 16, 2011
Messages
106
Reaction score
4
Hi how can I get Google to remove the 3+ million pages that were added by a hacker?

In Google Search Console I submitted the URL here to clear current snippet in Google -
removals > temporary removals > clear cached url > remove all URLS with this prefix.

I've also submitted a new sitemap.xml

Is there anything I should do?

3.6m.JPG


I appreciate any help thank you!
 
fk you didn't have firewall or protection to your site?
 
They crack your hosting password or somthing else?
 
I think it might of been because chmod was 775 for files & directories. It's a WordPress website they managed to install plugin. The pages were like generated using file on root directory. They aren't pages in WordPress.
 
This happened to my site. It took months to clear from Google cache even when what I did worked


Install Wordfence and change the username and password to something nobody can guess.

Avoid using admin, user and the likes and use complex password e.g 1c$")/75'rfh$33-+8

You can get Wordfence pro on this site and you're good to go.
 
Hi how can I get Google to remove the 3+ million pages that were added by a hacker?

In Google Search Console I submitted the URL here to clear current snippet in Google -


I've also submitted a new sitemap.xml

Is there anything I should do?

View attachment 218999

I appreciate any help thank you!
find a common folder for these pages, and add it to your htaccess using 410 code to tell google that these pages are gone for ever.


You can get Wordfence pro on this site and you're good to go.

which version you using?
 
Last edited:
find a common folder for these pages, and add it to your htaccess using 410 code to tell google that these pages are gone for ever.

Hi @fb3003

Thanks for the 410 htaccess advice I am looking at implementing this now and also adding Disalow in robots.txt.

Please can you or someone advise on how to best implement this code?

I think the best tactic is to 410 all pages that contain a number OR .htm OR .html as none of the real pages have these in the URL. For example -

Would this code work?

Code:
Redirect 410 /*0*
Redirect 410 /*1*
Redirect 410 /*2*
Redirect 410 /*3*
Redirect 410 /*4*
Redirect 410 /*5*
Redirect 410 /*6*
Redirect 410 /*7*
Redirect 410 /*8*
Redirect 410 /*9*
Redirect 410 /*.html*
Redirect 410 /*.htm*

I've also pieced together a rewrite rule which might also work?

Code:
RewriteRule ^([0-9]+)$ - [G,L]

I am also thinking of adding Disallow to robots.txt like this -

Code:
Disallow: /*0*
Disallow: /*1*
Disallow: /*2*
Disallow: /*3*
Disallow: /*4*
Disallow: /*5*
Disallow: /*6*
Disallow: /*7*
Disallow: /*8*
Disallow: /*9*
Disallow: /*.htm
Disallow: /*.html

Any help is much appreciated!!
 
Better restore from a backup. Dealing with this manually would be a pain. Use themes and plugins from official sources only.
 
Better restore from a backup. Dealing with this manually would be a pain. Use themes and plugins from official sources only.

I've restored the site I now need to get Google to recrawl the website as it shows a hacked home page title in the SERP!
 
I've restored the site I now need to get Google to recrawl the website as it shows a hacked home page title in the SERP!
assuming you submitted your sitemap and have also google to reindex the homepage?
 
I've had a hacked site with 10K of hanked pages.

What I do is restore/rebuld the site from clean files and that's it. Seems working.
 
assuming you submitted your sitemap and have also google to reindex the homepage?

Yes I've done this in Google Search Console. I'm waiting for Google to crawl the site again, this is the last crawl date 22 Jul 2022, 17:59:55.

Are these unique pages or some random shit

Both the pages look like this -
 
Last edited:
Yes I've done this in Google Search Console. I'm waiting for Google to crawl the site again, this is the last crawl date 22 Jul 2022, 17:59:55.



Both the pages look like this -
Looks like some medicine name, good luck cleaning your site, my suggestion change your host.
 
Back
Top