Malware that may cause Google to blacklist your website – Update

Are you facing the issue of Google blacklisting your or your clients’ website? Yes? I too experienced the same. Then you must probably look for this below blocks of code. The bad code! >:o The code, what possibly does is redirects to a non-existing website address/ link which causes the affected website to get blacklisted by major search engines (as far as i understood the code). This is one major issue on course of SEO (Search Engine Optimization) and SEPR (Search Engine PageRank), which vital for all types of websites and no one wants their website to be downgraded or blacklisted.

The PHP Code

Javascript within PHP

malware code in Iframe (Aug 26, 2013 Updated)

For this above Iframe code, you need to delete the line from the file it contains and ‘counter.php’ file which resides in the same directory.

If your website is built with Joomla (irrespective of its version), you will find it in ‘index.php’ page within template directory. All you could do is remove and increase your security of blocking file rewrite by any uninvited guests to our website.

For WordPress site, look into ‘footer.php’. And the solution to stop it happening in future; use the below code in


for further reading on WordPress documentation



install ‘Sucuri SiteCheck Malware Scanner‘ to check for any further malicious code or damages php files. And if you wonder why i recommend this particular plugin, then please go through the post of Syed Balki of points out the reasons to use sucuri wordpress plugin.


if you want to disable file editing option in WordPress then add the below code in


The reason for this is because WordPress sites are vulnerable to crash even if you miss a single comma while editing theme or plugin file(s).
Well, I hope you might have an idea by now of what runs when there is some malicious code in your theme or template file(s) and the ways to resolve this major security issue.

Screenshot of Sucuri SiteCheck Malware scanner plugin’s checklist
sucuri malware check plugin

And as usual, thanks for reading,
Keep sharing!


Post Author: Shreyo

is a developer & involved in project management; loves to learn, guide and keep himself updated on UI/UX and WordPress. He is also an amateur photographer mostly macro shots.