2

I have a WordPress website which was hacked couple of days ago. I have tried to add up some security. By following couple of tutorials, I have updated my robots.txt file. But now my website is not appearing in Google at all, not even single link of website.

Here is my current robots.txt file.

#
User-agent: *
Disallow: /cgi-bin
Disallow: /wp-admin
Disallow: /wp-includes
Disallow: /wp-content/plugins/
Disallow: /wp-content/cache/
Disallow: /wp-content/themes/
Disallow: */trackback/
Disallow: */feed/
Disallow: /*/feed/rss/$
Disallow: /category/*

All the links of my website were showing in the Google search, but now not even single link of website.

Before: when I typed site:example.com it was appearing. But after the robots.txt update, it is not appearing when I type site:example.com

  • Did the site have malware or viruses on it as the result of the hack? Google sometimes removes sites if those are found on the site. You would need to submit a reconsideration. – Simon Hayter May 9 '17 at 9:42
  • I'd remove wp-includes from robots.txt because that is where the js and css are. Google needs to crawl those to properly render your site. That shouldn't effect the pages indexed though. I agree with Simon, Google is probably reacting to the hack rather than to the robots.txt change. – Stephen Ostermiller May 9 '17 at 13:06
2

When you say it's not appearing in Google, did you mean in a search result or it's not indexed by Google.

Regardless, the following should help you troubleshoot.

Google Crawl Status:

Type site:example.com in Google and see if pages are indexed by Google. If yes move to next steps.

Google Webmaster Tools:

  • Check if there is warning from Google about infection/hack.
  • Robots.txt: Use fetch as Google in Webmaster and see if Google can read your pages.
  • If all good with Fetch as Google is all good then, make sure your site is clean and you may request Google to check.

This should help you investigate this.

| improve this answer | |
  • 1
    When I type this site:example.com it was appearing before but after updating robots.txt, now when I type this site:example.com it is not appearing .. – Valar M May 9 '17 at 7:08
  • Note: When you change your robots.txt, generally it will not have an instant impact on what Google has crawled. So, do this way, use fetch as Google and if all good then, just ensure your site is clean and leave it for some time and Google should crawl unless there are other reasons why Google might have removed from the index. – TopQnA May 9 '17 at 7:12
  • One caveat. Using a site: directive only shows indexed pages that are not subject to SERP filters. GSC is the only authoritative metric for pages indexed. For example, if there is a SERP penalty, those individual pages that are penalized will not show using a site: directive. This is why site: and GSC show different metrics. – closetnoc May 9 '17 at 15:08

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.