Google PlusFacebook iconTwitter icon+44 113 260 4010 contact@branded3.com

How to use Google Alerts to find out if your site gets hacked

Every month thousands of websites get hacked into and have hidden links inserted into the pages by people wanting their spam sites to rank highly in the search engines.

Most SEO companies, including mine, see a good number of hacked websites, usually after the site owner contacts us wanting to find out why their Google traffic has suddenly dropped for no apparent reason.

Matt Cutts has stated that 2008 will be the year hacking and SEO collide:

2008 will be the year that hacking and search engine optimization (SEO) collide in a major way. By the end of the year, a nontrivial fraction of blackhat SEO will involve illegally hacking sites for links or landing pages.

One webhost will get a significant black eye as hundreds or thousands of customers’ websites are hacked. The growth of illegal-blackhat SEO will leave traditional blackhats with a difficult choice: risk doing something illegal or sit out.

Google doesn’t give you a warning when they see lots of links to black hat sites – they just stop sending traffic to the pages that contain them. If the hacker has only added the code to a few of your pages the traffic drop can be quite small and it becomes almost impossible to diagnose the problem.

Clearly what we need is some kind of easy to use method for site owners to get a notification as soon as these links are added. Because the hackers often hide the links from everybody apart from Google it’s clear that we need to leverage the Google spider to do the work for us.

Luckily Google Alerts allows us to create advanced search queries so we can set up an alert to monitor our websites for any terms that might appear when a hacker takes control. Of course we can’t monitor every term but it is a very good starting point. I must thank Vin from Digital Agencies for tipping me off about this trick.

To get started we need to think of a few likely spam terms that people might like to inject in our site and then use them to make up a search query:
viagra OR cialis OR levitra OR Phentermine OR Xanax site:blogstorm.co.uk

Next simply go to Google Alerts and enter the query above into the “Create a Google Alert” box and you will get an email whenever Google spots one of your chosen spam words on your site.

BY Patrick Altoft AT 10:16am ON Thursday, 26 June 2008

Patrick Altoft is Director of Search at Branded3 and has worked in the SEO industry for over 10 years. With experience across some of the worlds largest brands as well as startup businesses Patrick is well known in the industry and speaks regularly at the major SEO conferences and events. Follow Patrick on Twitter or Google+

Comments

  • Pingback: 7 Things to Keep in Mind When Assessing the Security Risk of Using WordPress as a CMS | Free WordPress Website Help | Ask WP Girl | Boulder, Colorado

  • http://tvcnet.com Jim

    An excellent explanation. Thanks!
    I’m linking to this from my site as well (nice Google karma).
    Best Wishes,
    Jim
    http://hackrepair.com

  • http://www.aannemersinfo.nl/ aannemer

    google alerts is a great wat for linkbuilding as well..

  • henry

    thanks for your article

  • http://www.teachers4uonline.com henry

    good article for all sites owners.

  • Pingback: SEO ROI » How In-House SEOs Can Add Value Beyond Search

  • Pingback: New Wordpress Hacking Strategy Using Cloaking to Target Google IP Addresses : Beginning Network

  • http://www.nintendowiifitconsole.co.uk/ Wii Accessories

    I found this when trying to protect my sites from further attack as I have just had my first experience of a virus taking down all my sites for over a week :-(. Thanks for sharing as its a great way to prevent, not cure!

  • Pingback: Google finally adds hacking notifications to Webmaster Tools

  • Pingback: Google Alerts « IT stuff 4 u

  • http://jobforblogger.blogspot.com forlan

    I must need Google Alert. I will use it.

  • http://www.deeho.co.uk Deeho SEO

    Google alerts offer many useful features, but this is by far and away one of the more practical as a real world solution. Hackers are a problem that are not going to go away, as their desire to destroy is almost a strong as our desire to create and build. Be vigilant people and we will beat them

  • http://www.presadifinica.net Presa di finica

    blogsearch function of Google is great as well for linkbuilding.

  • http://www.chotrul.com mark carter

    This is a great tip – many thanks for passing this on ….

  • http://www.technologyblogged.com Technology Jakk

    I find Google alerts to be adequate for what it is, however have found your post highly insightful. @ RTW They do provide a lot of security, especially ones who put a Codex on.

  • http://www.petsahead.co.uk Jonathan

    Love it!

  • Pingback: Comments Using Google Alerts For The Internet Marketer | URSTAFF

  • http://www.zervidesk.com/ ZerviDesk Systems India

    But what if the hacker is using millions of other spammy keywords.

    The better option is to always alert and have all the security updates in place and change the passwords frequently.

  • http://www.theskykid.com skykid

    Those links usually happen when people download pirated themes or scripts . Same things is valid for open source programs and tools which can contain hidden link-backs or back-doors if not downloaded from their official web sites. Thank you for the tip.

  • http://www.jaywhale.com Jay

    Good tips. Sadly this also happens when downloading templates for wordpress. The programmers often hide links back to their sites in div’s that are 900px to the left or right of the screen, so although the link is not seen by the user, it is seen by Google, and without taking the time to look at the source code of each webpage to see if this is happening, it was virtually impossible to quickly find these…until now :)

  • http://media-islam.or.id Agus Nizami

    Well, finally I have found the solution. At least some keywords don’t show up Cialis no more.
    You should go to webftp and find the files that contain Drugstore and eval (gzinflate(base64_decode(.
    Delete the files if the files are not wordpress file and remove the virus line in wordpress file such as wp-config.php.

    You could read the detail here:
    http://agusnizami.wordpress.com/2011/05/27/cialis-found-on-wordpress-google-search-and-the-solution-to-remove-the-virus/

  • http://www.seo-translator.com WebsiteTranslation

    Now, THAT is an interesting tip! Obviously the best is to make sure that your security is flawless, but as a last line of defense this is really excellent.

  • http://www.netcars.com/ Louis Rix

    Better late than never – appreciate the tip Patrick. Just setup the Google alert now. Just one question – After entering the search query do you enter site:(site) or insite:(site) ?

  • http://millerpages.co.uk KeithM

    Nice post and a useful tip. I think you also need to use a file compare tool fairly regularly. There are plenty of free ones out there. Also keep your eye on which query keywords are being used to hit your pages.

  • http://tanketal.se Karin

    Thanks
    both for the tip and the easy to follow explanation
    It will not prevent but it is great to get an early alert

  • http://www.ervaringen.nl Mike

    I was looking for a tool like this for a while. Its impossible to check all my websites manually for hack activity.

  • http://calldenverhome.com/ Frank

    Recently had this problem with one of my blog sites that we got hacked, and by the time it all got fixed with the alert it was too late. For the past couple months we have tried a number of different tactics to rebound from google penalizing this type of spam link.

    Finally we got a domain change and that has fixed it so that the blog is rebounding from a steep dive. It was a lot of work to get that blog set back up though. If any of you guys gets plagued by a hacker, act IMMEDIATELY on the spam alert. Otherwise change the domain quick.

    Just a Friendly piece of advice if you get hacked 8-)