Google marks the error, “This site ahead contains harmful programs” when they find any suspicious code that could be malware or trojan.
As part of our Server Management Services, we assist our customers with several WordPress queries.
Today, let us see how to fix this error.
This site ahead contains harmful programs
This error warns users to be careful and implies that the website is hacked and Google has marked it insecure.
However, even after the fix, the error still shows up.
Major causes of this error include:
- Distributes malicious code. It can spread from the infected website to website visitors and can even to other websites.
- Shows ads from low-quality advertising networks.
In order to find malicious code on the site, our Support Techs suggest the following steps:
First and foremost, we need to change all WordPress passwords. This includes WordPress user accounts, WordPress hosting account, FTP or SSH user accounts and WordPress database password. Hence, if one of these passwords compromise, the hackers will fail to use it to regain access.
Next, either using a plugin or manually through phpMyAdmin and FTP we create a complete WordPress backup. Hence, if something happens during the cleanup, we can still revert back to the infected state of the website.
After that, remove the malware from the site. In addition, we can restore the files from a clean backup.
We can also check the site using Google’s safe browsing analysis tool.
In order to do so, add the site’s domain name as the query parameter to the URL: https://www.google.com/safebrowsing/diagnostic?site=YourDomain.com
Solution
Initially, we need to ensure we have a complete backup of the WordPress site.
Removing malware and recovering a website is a very complicated task. Though we clean the site thoroughly, the malicious code can come back until we find and remove the backdoor placed on our site.
Backdoor is a method to bypass normal authentication and gain the ability to remotely access the server undetected.
Finding the backdoor is not an easy task either. It could be a compromised password, unsafe file permissions, or a cleverly disguised file.
Backdoors on a WordPress install are most commonly in the folders:
- Themes
- Plugins
- Uploads directory
- wp-config.php
- Includes folder
In order to clean the backdoor, our Support Techs suggest the below steps:
-
Search the Uploads Directory
We execute the following command via SSH:
find uploads -name “*.php” -print
The uploads folder is for media files in most cases. However, if there is a .php file that is in there, it needs to go.
-
Delete Inactive Themes
Deleting the inactive themes is the best thing we can do.
-
.htaccess File
In some cases, the redirect codes can add in the .htaccess File. We can delete the file and it will recreate itself.
If it does not, go to the WordPress admin panel, Settings » Permalinks » Save. It will recreate the .htaccess file.
-
wp-config.php file
We can compare this file with the default wp-config-sample.php file. If we find anything that is out of place, get rid of it.
-
Database Scan for Exploits and SPAM
An easy trick is to scan the database. The database stores their bad PHP functions, new administrative accounts, SPAM links, etc.
Once we remove the backdoor, we still need to thoroughly check all files and databases for any malicious code.
If we are absolutely certain that the website is clean, we can ask Google to remove the warning from search results.
In order to do so, we need Google’s Webmaster tools. In there, click on the security issues section.
It will list the security issues Google found on the website. In addition, we will see the links to resources on clean-up on the site.
Once we fix the issues, click on the checkbox and request a review.
[Stuck with the error still? We are here for you]
Conclusion
In short, the error, This site ahead contains harmful programs occurs when Google finds any suspicious code. Today, we saw effective ways our Support Techs employ in order to fix it.
0 Comments