Understanding Search Engine Security Warnings and Malware Protection
Search engines are very proactive when it comes to protecting internet users. Every day they scan millions of websites for viruses, spyware, and other malicious software that could endanger website visitors. If a search engine detects malware on your website, it will flag it as a risk and notify all potential visitors. The warning will be shared across various products, so it's important to clear your website of malware and take all necessary precautions to avoid it in the future.
It is understandable to be concerned if your site gets flagged for malware, especially if you are unfamiliar with malware details and security warnings. Because of the warnings users begin to see, most will not enter your website and may never try again. This will inevitably result in a significant decrease in web traffic, the demise of online profits, and a negative impact on search engine rankings. Your website could even get blocked for users of certain browsers.
Every day, thousands of websites are added to security warning lists. Security warnings, diagnostic pages, and hack indicators can be difficult for most website owners to comprehend. Fortunately, you're reading a guide that will inform and assist you in understanding everything you need to know to clear your site of malware and how to keep it safe and secure for as long as possible.
What is Malware?
Malware is an abbreviation for malicious software, which is any software intentionally designed to harm servers, computers, or computer networks.
Malicious software comes in various forms, including scripts, executable applications, and executable files. Hackers who deploy such malware have a variety of goals. Here's what they can do to your site for their own benefit:
-
Redirect your website elsewhere to steal your traffic;
-
Obtain sensitive information from your website or its visitors;
-
Steal money from your website;
-
Inject links that lead to their website to improve their SEO score;
-
Create spam pages;
-
Delete or replace data with the idea of getting ransom money in exchange for giving it back;
-
Make fraudulent purchases on your website;
-
Launch denial of service attacks.
Malware can infect a website after a successful brute force attack, Cross-Site Scripting (XSS) attack, or SQL injection attack. XSS attacks allow attackers to inject client-side scripts into web pages that other users view. Attackers may exploit cross-site scripting vulnerabilities to circumvent access controls like the same-origin policy.
SQL injection is a web security vulnerability that allows attackers to interfere with an application's database queries. Attackers can view data that they are generally not able to retrieve. That may include data from other users or anything else the application can access. The attacker can often modify or delete this data, causing persistent changes (damage) to the application's content or behavior.
Malware can also infect your website via a content management system, theme, or plugin vulnerability. There are many types of malware, including:
-
Spyware
-
Adware
-
Viruses
-
Keyloggers
-
Ransomware
-
Trojans
-
Worms
-
Rootkits
What are Security Warnings (Blocklists)?
Search engines have a goal to provide all users with a secure online experience. They constantly invest resources to identify and flag all potentially malicious websites and add them to their warning lists. By doing so, they warn anyone who attempts to access an infected website. They advise users to proceed cautiously and notify the site's owner of the problem. The fewer users who visit an infected website, the less effective the malware will be.
When a search engine flags a website, that website may be removed from its index. Simply put, it may no longer appear in search results. When a website is blocked, it can lose a significant percentage of its organic traffic, which can be disastrous for sales and overall revenue.
Common Indicators of a Flagged Site
These are a few things that can happen when visiting an infected or flagged website or things your host or computer will do to prevent the malware from causing any damage.
-
Your computer's antivirus blocks a website partially or entirely;
-
Search engine results say, "This site may be hacked";
-
When you visit the website, you get stopped on the warning page;
-
For the sake of shared server security, your web host can shut down your website after, typically, notifying you about it first;
-
SEO spam links and redirects will start appearing in Search Engine Result Pages (SERP);
-
Unexpected changes to files or the addition of unfamiliar ones;
-
Safe-browsing warning page displays before reaching the site.
Check If Your Site Has Security Warnings
If you want to find out your website's security status, you can use various online security scanners. They will check for security warnings and visible malware incursions. If you are using WordPress, there are excellent plugins that can help as well. You can install security plugins to automate security scans.
Another WordPress plugin that can help you is Wordfence. It is one of the most popular WordPress security plugins and comes in both a free and a premium version. Fortunately, the free version should work well for most malware situations.
Once you have installed and activated a security plugin, you can run a malware scan.
Additionally, if you need help with WordPress, please visit our thorough WordPress tutorial section.
Reasons for Sites to Get Flagged
Sites get flagged when authorities find irregularities they believe to be malware. Malicious software can come in many forms: phishing schemes, trojan horses, email, pharma hacks, or information scraping. In most cases, website owners are unaware they have been hacked.
It is in the search engine's best interest not to display infected results, mainly because they don't want their integrity damaged. There are various categories for warnings, depending on why the website is flagged. Some websites are flagged for having phishing links, others for having spam, or, more generally, for having malware.
Security Warning Examples
These are some of the warning messages reserved for malware warnings:
-
Suspicious site
-
The Site Ahead Contains Malware!
-
This website has been reported as unsafe
-
The site ahead contains harmful programs
-
This page is trying to load scripts from unauthenticated sources
-
Deceptive site ahead
-
Is this the right site?
Not all browsers use the same security APIs to determine whether or not a website is safe. The warnings are there to alert you the website has been flagged due to getting hacked or having malware. Proceed with caution if you continue to the website.
The message differs slightly when using different browsers, such as Mozilla Firefox or Microsoft Edge. Still, in general, it says similar warnings.
How to Review Warning Status
Work with Search Console to Review Security Warnings
Search engines must protect all users from potentially harmful websites that appear in their search results. A website repeatedly flagged for malicious behavior is subject to reviews. The warning page and the warning next to your website in search results are intended to discourage visitors from entering your website. People are cautious and do not want harm done to their devices, so the warnings typically work.
You should utilize search engine webmaster tools as a website owner. These tools provide a way to determine whether your site is being flagged for malware or phishing content.
Find Out What Is Flagged
You can and should determine the precise reason for security warnings on your website. Firstly, you must add your website to search engine webmaster tools.
Once you are done, look for security issues on your website's webmaster tools page. The URLs that were detected and identified as malware can be found here. If the URL is a directory (folder), each page in it must be malware-free.
Here are a few examples:
-
gallery.example.com/pages/page1.html – Only the page1.html file has to be cleaned up;
-
gallery.example.com/pages/ – Everything inside the /pages directory has to be malware-free;
-
gallery.example.com – The entire gallery.example.com website is infected and has to be cleaned up;
-
example.com – The entire domain and all its subdomains have to be cleaned.
Those examples can help you narrow your search to specific site sections.
Determine When and Why the Warning Happened
The following task is to determine when the suspicious content was last discovered. These dates are listed next to the URLs in the detected issues section.
If you want search engines to be aware of your most recent changes, you must request a security review through the webmaster tools. Because of this, they will rescan your website within a few days. To do so, go to the security issues section and click the appropriate button to submit your site.
Search Result Malware Warnings
When your website appears in search results, warnings may indicate whether your site contains spam or redirects. They can also be activated when your compromised website is used to infect visitors with malicious software via drive-by downloads. Although your site may not yet display the full warning page, these warnings may appear in search results. That could mean malicious scripts are being loaded from third-party websites, such as malvertising. Malvertising, or malicious advertising, is the use of malicious advertisements to spread malware and compromise systems.
Scan Your Site for Malware
You can scan your site for malicious payloads, malware locations, security issues, and warning status with major authorities using free online tools. To check your website for hacks and security warnings, do the following:
Visit a security scanning website and enter your website URL.
Click to scan your website.
If the site is infected, note any payloads and file locations found by the scanner.
View website security status to see if other authorities have flagged you.
How to Fix Security Warning Symptoms
There are two main places where malware can reside: a website's files and its database. Below you will find some advice on how to handle both those cases.
Remove File Infections
Removing files is the easier of the two ways to eliminate malicious content. However, we must warn you that removing a file is not a surefire way of cleaning your website. Sometimes it will work, but other times the infection will be deeply rooted and may require more than the deletion of files. Our services come with security features which can help with the process. Nonetheless, we always advise our customers to contact professionals regarding the security of their websites.
File Replacement
If you use a CMS such as WordPress or Joomla!, you can rebuild the site using fresh, uninfected copies of the core files and plugins directly from the official repositories (or by using applications installers in your control panel).
Additionally, custom files can be replaced with a recent backup as long as the files in the backup are not infected themselves. Fortunately, Hostmargin provides regular backups for clients.
Malicious Domains and Payloads
If security scanners detect malicious domains or payloads, you can begin searching for those files on your server. The discovery date can help you narrow down your search to files that were modified around that time.
To manually remove a malware infection from your website files (NOT database), follow these steps:
-
Log into your server via sFTP or SSH;
-
Create a backup of the site before making changes;
-
Search your files for references to the malicious domains or payloads you noted;
-
Identify recently changed or unfamiliar files;
-
Restore any suspicious files with copies from the official repository or a clean backup;
-
Replicate customizations made to your files;
-
Double-check to verify the website is still operational after your changes.
To avoid detection, hackers frequently change malicious sites. As a result, security issue pages may mention malicious or intermediary domains that are no longer visible on your site because new domains have replaced them.
If you can't find the malicious content, try looking for the domain names listed on the diagnostic page.
Manually removing malicious code from website files can be exceptionally hazardous. Do not perform any actions without a backup. If you are not entirely sure, you should seek assistance from a professional. Do not overwrite your CMS configuration files. On WordPress, this includes the wp-config.php or wp-settings.php files.
How to Clean Hacked Database Tables
To remove a malware infection from your website database, use your database admin panel to connect to the database. Most hosting companies offer database management tools.
To manually remove a malware infection from your database tables:
-
Log into your database admin panel;
-
Backup the database before making changes;
-
Search for suspicious content (spammy keywords, links);
-
Open the specific table that contains suspicious content and manually remove it;
-
Test to verify the site is still operational after changes;
-
Remove any database access tools you may have uploaded.
Prevent Reinfection
Hackers almost always leave a way to re-enter your website: backdoors, such as malicious admin users, PHP web shells, and overlooked vulnerabilities. That can lead to your website getting flagged again.
Review User Accounts
Make sure that user accounts are not overlooked. Often stolen passwords are what allow hackers to re-enter your website. If you want to clean up your user accounts, follow these steps:
-
Confirm all website user accounts are valid, including CMS users, FTP/SFTP/SSH users, database administration panels, etc.;
-
Change the passwords for all users;
-
Enable two-factor authentication (2FA).
Identify Backdoors
Backdoors are often embedded in files with similar names to CMS core files but located in the wrong directory. Attackers can also inject backdoors into legitimate files.
Backdoors commonly include the following PHP functions:
-
str_rot13;
-
base64;
-
eval;
-
gzuncompress;
-
create_function;
-
exec;
-
assert;
-
system;
-
preg_replace (with /e/);
-
stripslashes;
-
move_uploaded_file;
All backdoors must be removed to clean a website hack successfully. Otherwise, your website will get reinfected quickly and added to security warnings.
Secure Computing
Do not exclude the possibility that infections can jump from a computer to your site by using CMS or file transfer apps. You need to secure all computers used to access your website — have all users scan their personal devices with an antivirus program to find out if there are any infections.
Here are some security programs we recommend:
Free options:
-
Malwarebytes
-
Avira
-
Microsoft Security Essentials
Paid options:
-
F-Secure
-
BitDefender
-
Kaspersky
Remove Your Website From Security Warnings
Once you have fixed everything, it is time to clear the security warnings and return your website to working order!
Get Webmaster Tools Access
To remove security warnings, you must let search engines know you have completely cleared the infection. You must have a webmaster tools account to do this.
To verify ownership of your website in webmaster tools:
-
Open the appropriate webmaster tools website;
-
Click on Get Started;
-
You will be directed to a quick guide;
-
Type in your site's URL and click Continue;
-
Follow the verification process as instructed.
Other Security Warning Lists
Search engine safebrowsing is not the only website warning system. Many other authorities also maintain security warning lists.
Antivirus programs and other search engines also want to warn their users when a website is dangerous. Each has its own console and review process. To remove your site from their warning lists, you must follow some steps to let them know your website is clean.
Use security scanners to check your website for malware in the first step. The results will indicate if some of the top authorities have flagged your site. The review process is similar across different platforms. For example, many security providers have review submission forms, and search engines have webmaster tools for which you should sign up.
Other popular security authorities include:
-
McAfee SiteAdvisor
-
Norton SafeWeb
-
BitDefender
-
Spamhaus
-
ESET
Request a Security Review
If you don't request a review, search engines may decide you haven't finished your site cleanup. When you order a review, you are telling them that you are ready for them to rescan your site. They may limit repeat offenders to a single review request every 30 days. Remember that you should not try to trick the system — this may lead to not passing the review process. Ensure that your site is clean before you proceed with the review.
The process will be similar for other security warning lists.
Protect Your Brand
After you have submitted the security warning removal request, it may take a few days for the review to complete and have your site reindexed.
If the title and description of your pages were infected with spam, it may take some time for your search results to clear up. The reason for that is search engines don't crawl websites every day.
Fortunately, in webmaster tools, you can ask to refresh certain pages and the links on those pages.
To make search engines recrawl your site:
-
Use the URL inspection tool at the top of the webmaster tools;
-
Click the request indexing button.
That will ensure search engines can view your website without errors and resubmit it for indexing if successful. If the webmaster tools encounter any errors, you must review them and ensure your website is accessible to search engine bots.
That will instruct search engines to crawl your homepage and any links on it. If any other pages show in search results with spam in the title and description, you can also crawl those pages separately.
Remove Spam URLs
If spam pages were removed from your site, search engines might have already indexed them. When removed from your site, the spam pages can create 404 (Not Found) errors. You can use removal tools to tell search engines these spam pages should be removed from their index.
To remove spam URLs causing 404 errors:
-
Navigate to the index tab in webmaster tools;
-
Click the removals section;
-
Click the new request button;
-
Enter the URLs of spam pages that have been removed;
-
Click continue.
How to Prevent Future Hacks & Security Warnings
Focus on Website Protection
Consider taking additional steps to harden and protect your website to prevent future security warnings. Those include applying updates, maintaining a good website backup strategy, managing user privileges, and implementing website security controls.
The number of exploited vulnerabilities grows daily. Trying to keep up with that can be a daunting task. Website Firewalls were invented to provide a perimeter defense system surrounding your website.
Benefits of using a website firewall:
-
Prevent a Future Hack: A website firewall stops infections from reaching your website by detecting and blocking known hacking methods and behaviors;
-
Virtual Security Updates: Hackers tend to exploit vulnerabilities in plugins and themes, and unknown ones are constantly emerging. A good website firewall will patch the holes in your website software even when you haven't applied security updates;
-
Block Brute Force Attacks: A website firewall should stop anyone from accessing your admin or login page if they are not supposed to be there. That way, brute force automation will fail at guessing your password;
-
Mitigate DDoS Attacks: Distributed Denial of Service attacks attempt to overload your server or application's resources. By preventing DDoS attacks, a website firewall makes sure your site is available even if you are being attacked with a high volume of fake visits;
-
Performance Optimization: Most WAFs will offer caching for faster global page speed. That keeps your visitors happy and is proven to lower bounce rates while improving website engagement, conversions, and search engine rankings.
With Hostmargin, you also get comprehensive security features and other powerful extras.
Additionally, if you use WordPress, you should always use the latest version of WordPress.
Summary
If your website is ever flagged with security warnings, then your traffic will drop dramatically. It can also cause damage to your reputation, as search engines actively warn visitors to stay away from your website.
Fortunately, there are ways to monitor security status. All we have shared in this guide should help you remove your website from warnings as quickly as possible.