Sites are being hacked left right and center on the internet now in order to help boost the ranking of illegal pills websites and other quite dodgy sites. Having your site hacked is really quite bad and you may find your traffic from search engines slip quite rapidly.
How to identify if your site is being hacked
Webmasters can easily check to see if their website is beign used to pedal these bad website quite easily. By doing a site: search on google you can find webpages that should not be there like: example.com/buy-pharmacy-pills-online If you did not create this page then it is most likely that you site has been hacked and most of the time there will be millions more of these hidden pages. These website will not show anything odd when you click them as these pages have been designed to be hidden for normal users and will just simply show your homepage content or something else but these pages will show google bots and other search engines bots spam and links to pharmacy sites though. Search engines bots are clever and can identify when a site has been hacked like this but there corse of action is not to simply ignore the spam pages but to penalize the whole site so you must fix your site if you do not want your rankings to slip or you site to be completely deinedxed from the search engines.
So why do people hack sites? Well for backlinks as backlinks help sites in the search engines rank. To maximise the effect of the spam pages the hackers will use other hacked website to link to the bad pages on your site this means your site will be included in a sort of hacked website link network with sometimes hundreds of thousands of spam links pointing to your site this can really damage your site rankings even after you have tried to fix your site and have stopped the creation of these pages.
How do websites get hacked?
If you use WordPress or another content management system that you have not updated ina long while there maybe security flaws in it which are now known and used by hackers to gain access to your admin dashboard and thus are able to inject nasty code into your site. So make sure you are always upto date!
Nothing is always as it seems and you dont get something for free especially on the internet and you sart downloading and uploading free themes and plugin you find from of any old website on the internet make sure that it is 100% secure and safe and that there is not any hidden and malicious code that could be used to hack your site. Only use themes and plugin you trust and are well known. Never ever used nulled scripts on your website as these are packed with viruses.
You must make sure that to fully recover after being hacked that you:
Make sure that all of the spammy hidden pages send out a 404 error, this will mean that all the spammy hacked links pointing to the hacked pages will be discounted.
You may also want to use a link checker tool and disavow all the spammy links by domain
Let the other hacked website pointing to your site know that there site has also been hacked this will mean the links will be completely deleted. great!
If manual action has been taken and your site penalized or deindexed, File a reconsideration request if you site was hacked to google and other search engines expalining what has happened and what you have done to fix it and make sure it never happens again.