Spam pages being redirected to 404s but sill indexed
-
Client had a website that was hacked about a year ago. Hackers went in and added a bunch of spam landing pages for various products. This was before the site had installed an SSL certificate.
After the hack, the site was purged of the hacked pages and and SLL certificate was implemented. Part of that process involved setting up a rewrite that redirects http pages to the https versions.
The trouble is that the spam pages are still being indexed by Google, even months later. If I do a site: search I still see all of those spam pages come up before most of the key "real" landing pages. The thing is, the listing on the SERP are to the http versions, so they're redirecting to the https version before serving a 404.
Is there any way I can fix this without removing the rewrite rule?
-
In addition to the above, you can request removal from Google's index in Search Console
https://support.google.com/webmasters/answer/1663419?hl=en
As noted, the removal is temporary (90 days), but if you've removed the pages and any links to them, then they won't reappear.
What I would do is just check that your sitemap is up to date, and there aren't any legacy sitemaps hanging about that might still reference the pages, and also run a crawl of your site to ensure that there aren't any remaining links to these pages hanging about.
-
You could also redirect those pages with a 301 directly to the 404 page. Or you could block those pages on robots.txt if you don't need them anymore.
-
I'd recommend putting all of the urls to deindex into a sitemap, set LASTMOD date to something recent and submit for google to recrawl.
If possible, set the status codes on those pages to 410 as well.
Got a burning SEO question?
Subscribe to Moz Pro to gain full access to Q&A, answer questions, and ask your own.
Browse Questions
Explore more categories
-
Moz Tools
Chat with the community about the Moz tools.
-
SEO Tactics
Discuss the SEO process with fellow marketers
-
Community
Discuss industry events, jobs, and news!
-
Digital Marketing
Chat about tactics outside of SEO
-
Research & Trends
Dive into research and trends in the search industry.
-
Support
Connect on product support and feature requests.
Related Questions
-
Blog page won't get indexed
Hi Guys, I'm currently asked to work on a website. I noticed that the blog posts won't get indexed in Google. www.domain.com/blog does get indexed but the blogposts itself won't. They have been online for over 2 months now. I found this in the robots.txt file: Allow: / Disallow: /kitchenhandle/ Disallow: /blog/comments/ Disallow: /blog/author/ Disallow: /blog/homepage/feed/ I'm guessing that the last line causes this issue. Does anyone have an idea if this is the case and why they would include this in the robots.txt? Cheers!
Technical SEO | | Happy-SEO2 -
After I 301 redirect duplicate pages to my rel=canonical page, do I need to add any tags or code to the non canonical pages?
I have many duplicate pages. Some pages have 2-3 duplicates. Most of which have Uppercase and Lowercase paths (generated by Microsoft IIS). Does this implementation of 301 and rel=canonical suffice? Or is there more I could do to optimize the passing of duplicate page link juice to the canonical. THANK YOU!
Technical SEO | | PFTools0 -
How to Redirect all inactive Feed to a specific Wordpress page
Hi Guys, I've been doing much cleaning on my blog lately and deleted numerous categories including their posts with low quality content. After deleting the categories, Google Webmaster Tools is reporting some 404 errors about the RSS Feeds for the deleted categories. I've created a 404.php file inside my theme and placed the following code header("HTTP/1.1 301 Moved Permanently");
Technical SEO | | Trigun
header("Location: http://www.mysite.com/My404Page/", true, 301);
exit();
?> this have catched all 404 errors and redirected them to the specific page. Unfortunately, it could not catch the inactive feed urls. Is there a way to do this so that all inactive feeds will be redirected to my 404 page? Thanks in advance....0 -
Any issues with lots of pages issuing 301 redirects?
Hi all, I'm working on a site redesign and it is possible the new site could issue a lot of 301 redirects as we may migrate from one forum solution to another. Is there any issue with crawlers getting a lot of 301 redirects from a site? Thanks Nick
Technical SEO | | nickswan0 -
Will changing page extensions from .html to .php require a redirect?
Hi. We are launching a new website and our .html page extensions will be replaced with a .php page extension. Example: www.theideapeople.com/web_design.html (current url) www.theideapeople.com/web_design.php (new url) Will this require any special treatment to maintain the page SEO ranking? Does it make a difference if you use a .html or .php? Thank you for your help and insight! Jay
Technical SEO | | theideapeople0 -
Dealing with hundreds of spam pages caused by a hacker
A couple of my sites have recently been hacked with the hacker managing to overwrite lots of my pages with their own spam products and also adding in lots of (hundreds) pages that they have created themselves. I have rectified this in so far as removing folders that the hacker used to over write my pages so my original pages are now back showing the correct content and also removed all the hundres of new pages that they had managed to instantly add. I appreciate that google will find and re-crawl all my genuine pages so the correct content is being displayed and indexed for them but what is the best method for dealing with the hundreds of extra spam ages that google had managed to crawl but have now been deleted so there are loads of 404 page not founds in google?
Technical SEO | | Wardy0 -
Is a 302 redirect the correct redirect from a root URL to a detail page?
Hi guys The widely followed SEO best practice is that 301 redirects should be used instead of 302 redirects when it is a permanent redirect that is required. Matt Cutts said last year that 302 redirects should "only" be used for temporary redirects. http://www.seomoz.org/blog/whiteboard-interview-googles-matt-cutts-on-redirects-trust-more For a site that I am looking at the SEO Moz Crawll Diagnostics tool lists as an issue that the URL / redirects to www.abc.com/Pages/default.aspx with a 302 redirect. On further searching I found that on a Google Support forum (http://www.google.com/support/forum/p/Webmasters/thread?tid=276539078ba67f48&hl=en) that a Google Employee had said "For what it's worth, a 302 redirect is the correct redirect from a root URL to a detail page (such as from "/" to "/sites/bursa/"). This is one of the few situations where a 302 redirect is preferred over a 301 redirect." Can anyone confirm if it is the case that "a 302 redirect is the correct redirect from a root URL to a detail page"? And if so why as I haven't found an explanation. If it is the correct best practice then should redirects of this nature be removed from displaying as issues in the SEO Moz Crawll Diagnostics tool Thanks for your help
Technical SEO | | CPU0 -
On Page 301 redirect for html pages
For php pages youve got Header( "HTTP/1.1 301 Moved Permanently" );
Technical SEO | | shupester
Header( "Location: http://www.example.com" );
?> Is there anything for html pages? Other then Or is placing this code redirect 301 /old/old.htm http://www.you.com/new.php in the .htaccess the only way to properly 301 redirect html pages? Thanks!0