If Google detects that your site has been compromised, Google will tell you about it in Webmaster Tools (to ensure that you’re notified quickly, you can have your Message Center messages forwarded to your email account). If the hacker inserted malware into your site, Google also identify your site as infected in our search results to protect other users.If your site has been hacked or infected with malware, you should act quickly to repair the damage. Google recommends reviewing therecommendations provided by the organization antiphishing.org.

Whatever your platform or type of infection, Google recommends the following steps:

[faq title=”” open1st=”0″ openAll=”0″]

[faq_item title=”Quarantine your site” number=”1″]

It’s extremely important that you take action to prevent your site from infecting others and to prevent hackers from further abusing the system.

  • Take your site down immediately. It’s extremely important that you take action to prevent your site from infecting others.
  • Contact your web hoster. If the attack affects other sites they host, they may already be taking steps to address the problem.
  • Change the passwords for all users and all accounts (for example, FTP access, administrator account, content management system authoring accounts). Check your users: It’s possible that the hacker created one or more new accounts. Password guidelines.

If you have access to your server, Google recommends configuring it to return a 503 status code. Taking your site offline is better than using robots.txt to prevent it from being crawled.

[/faq_item]

[faq_item title=”Assess the damage” number=”2″]

Once you’ve locked down your site, you’ll need to identify the scope and scale of the damage that’s been caused. Google recommends the following steps:

  • Visit the Google SafeBrowsing diagnostics page for your site (http://www.google.com/safebrowsing/diagnostic?site=www.example.com) (replace www.example.com with the URL of your own site) to see specific information about what Google’s automatic scanners have found.
  • Scan your computer using an up-to-date scanning program to identify any malicious code the hackers might have added. Be sure to scan all your content, not just text-based files, as malicious content can often be embedded in images.
  • If your site has been infected with malware, check the Malware page in Webmaster Tools. (On the site dashboard, click Health and then click Malware.) This page lists sample URLs from your site that have been identified as containing malicious code. Sometimes hackers will add new URLs to your site for their nefarious purposes (for example, phishing).
  • Use the URL Removal tool in Webmaster Tools to request removal of hacked pages or URLs. This will prevent the hacked pages from being served to users.
  • Report phishing pages to the Google Safe Browsing team.
  • Use the Fetch as Google tool in Webmaster Tools to detect malware that might be hidden from the users’ browsers, but served to Google’s search engine crawler.
  • Review the antiphishing.org recommendations on dealing with hacked sites.
  • If you have other sites, check to see if these have also been hacked.

If you have access to your server, follow these additional steps:

  • Check to see if any open redirects in your site have been exploited.
  • Check your .htaccess file (Apache) or other access control mechanisms depending on your website platform for any malicious changes.
  • Check your server logs to see when files were hacked (bearing in mind that hackers can alter your logs). Look for suspicious activity such as failed sign-in attempts, command history (especially as root), or unknown user accounts.[/faq_item]

[faq_item title=”Clean your Website” number=”3″]Clean up your content, removing any pages that were added, any spammy content, and any suspicious code identified by virus scanners or the Malware Details tool. If you have backups of your content, consider deleting your content entirely and replacing it with your last known good backup (once you’ve checked to make sure it’s clean and free of hacked content). You can check whether you’ve completely cleaned out the hacked content by using the Fetch as Google tool in Webmaster Tools.If you have access to your server, Google recommends the following steps:

  • Update any software packages to the latest version. Google recommends doing a complete reinstall of your OS from a trusted source to be sure that you’ve removed everything the hacker may have done. Also make sure to reinstall or update blogging platforms, content management systems, or any other type of third-party software installed.
  • Once you feel confident that your site is clean, change your passwords again.
  • Get your system back online. Change your server’s configuration so that it no longer returns a 503 status code and perform any other necessary steps to make your site publicly available.
  • If you used the URL Removal tool to request removal of any URLs that are now clean and ready to appear again in search results, use the same tool to revoke your request.

[/faq_item]

[faq_item title=”Ask Google to review your website” number=”4″]

Once you’re sure that all malicious code has been removed, you can request a malware review of your site. Google will check your site and, if no malware is detected, will remove the warning label that appears in your site’s listing on the search results page.

  1. On the Webmaster Tools Home page, select the site you want.
  2. Click Site Status, and then click Malware.
  3. Click Request a review.

Once it’s confirmed that your site is clean, it can take up to a day or so for the malware warning to be removed from your site in search results.

If the hackers put spam on your site

Once your site is completely free of spam, you can ask Google to reconsider it for inclusion in search results.To request reconsideration of your site:

  1. Sign in to Webmaster Tools with your Google Account.
  2. Make sure you have added and verified the site you want reconsidered.
  3. Request reconsideration of your site.

[/faq_item]

[/faq]

USEFUL RESOURCES

Here are some resources to help clean things up and prevent reinfection of your site.