What does Google say about SEO? /
Quick SEO Quiz

Test your SEO knowledge in 5 questions

Less than a minute. Find out how much you really know about Google search.

🕒 ~1 min 🎯 5 questions

Official statement

When investigating malware, avoid opening infected pages in a browser. Instead, examine the source code directly via server access to understand how the malware operates.
4:14
🎥 Source video

Extracted from a Google Search Central video

⏱ 7:23 💬 EN 📅 30/10/2013 ✂ 6 statements
Watch on YouTube (4:14) →
Other statements from this video 5
  1. 1:08 Comment Google Safe Browsing détecte-t-il les malwares et impacte-t-il votre référencement ?
  2. 1:38 Pourquoi les sites légitimes redirigent-ils parfois vers des pages malveillantes sans que vous le sachiez ?
  3. 2:40 Comment vérifier si un site est vraiment infecté par des malwares selon Google ?
  4. 5:48 Wget et cURL suffisent-ils vraiment pour détecter toutes les redirections malveillantes ?
  5. 6:18 Comment Google Webmaster Tools détecte-t-il les malwares et faut-il vraiment compter sur sa révision ?
📅
Official statement from (12 years ago)
TL;DR

Google recommends never opening infected pages in a browser during a malware investigation. Examining the source code directly via server access helps understand how the malware operates without risking re-execution or spreading. This precaution reduces the risk of compromising your work environment and ensures a cleaner forensics analysis.

What you need to understand

Why does Google advise against opening infected pages in a browser?

When an SEO malware infects a site, it often executes client-side through JavaScript or server-side via injected PHP. Opening the page in a browser triggers these potentially dangerous scripts. The main risk: contaminating your own machine, capturing your session cookies, or worse, spreading the infection if you are logged into the server via FTP or SSH.

Modern SEO malwares detect user-agent and IP to adapt their behavior. When facing Googlebot, they display pharmaceutical spam or cloaking. When facing a regular visitor, they redirect to malicious sites. Analyzing via browser gives a partial view and exposes your diagnostic environment.

What investigation method does Google favor?

Direct access to the server via SSH, SFTP, or the file manager provided by your host allows you to examine the source code without executing it. You can grep the PHP files for suspicious functions like base64_decode, eval, gzinflate, or preg_replace with the /e modifier. This forensic approach reveals backdoors, hidden files, and injections in the .htaccess.

Command line tools like find, grep, and diff become your best allies. Comparing files from the infected site with a clean CMS installation quickly detects suspicious changes. This method bypasses obfuscation techniques that only trigger in a browser execution context.

How does the malware hide from investigators?

Evading techniques are sophisticated. A malware can check the HTTP referer, browsing history, or even the time of day before activating. Some scripts only inject content if the request comes from a search engine, rendering the infection invisible in direct browsing.

Database injections often escape file analysis. A malware can modify the wp_posts or wp_options tables under WordPress to inject malicious JavaScript. Examining server-side source code must therefore include a dump and analysis of the database, not just files.

  • Never open a suspicious page in your main browser, even in private browsing
  • Favor SSH/SFTP access to examine source files without executing them
  • Use grep and find to detect dangerous PHP functions: eval, base64_decode, exec, system
  • Compare site files with a clean CMS installation to identify changes
  • Also analyze the database: malware often injects code into text fields

SEO Expert opinion

Is this recommendation actually followed in practice?

Let's be honest: the majority of malware audits I've observed start by opening the page in Chrome. Rushed SEOs want to see immediately what Google indexes, understand the cloaking, and check if the spam displays. However, this approach exposes them to real risks, especially if the malware targets WordPress admin accounts or FTP sessions.

Serious agencies use dedicated virtual machines or cloud sandboxes to investigate safely. But this infrastructure comes at a cost. Freelancers and small teams often navigate without a safety net. The issue: a sophisticated malware can detect a VM and remain dormant, skewing the analysis.

What limitations does command-line analysis have?

Server access requires technical skills that not all SEOs possess. Grep and regex are powerful but require practice. A polymorphic malware that changes its signature with each infection escapes classic patterns. Nested or hex-encoded obfuscated injections require multiple decoding passes.

Some shared hosts limit SSH access or prohibit executing system commands. In these cases, investigation becomes seriously complicated. GUI tools like Wordfence or Sucuri scan files but sometimes miss sophisticated injections hiding in system files or temporary directories. [To be confirmed]: Google does not specify how to proceed when server access is restricted or impossible.

When does this rule not suffice?

Pure client-side malwares, which execute only in injected JavaScript after HTML rendering, sometimes require dynamic analysis. A headless browser in a controlled environment then becomes essential. Malicious code can be injected via compromised CDNs or malicious ads, invisible in the initial source code.

Attacks by external negative SEO, such as spam backlinks or content scraping, leave no trace on your server. The investigation must then focus on Google Search Console, backlink tools, and duplicate content alerts. Google's advice strictly applies to on-site infections, not external threats.

Warning: a site cleaned of its malware can remain penalized for weeks if Google has not received a reconsideration request via Search Console. Technical cleaning is not enough; communication with Google is essential.

Practical impact and recommendations

What concrete actions should be taken when malware is suspected?

First reflex: do not touch anything in a browser. Immediately access your host via the administration panel and download a complete copy of the site and database. This forensic backup will allow you to analyze at your leisure without risking worsening the situation.

Use the command line to search for suspicious patterns. A simple grep -r "eval(base64_decode" . in the root directory often reveals PHP injections. Compare file modification dates: a modified index.php from last week when your CMS hasn't been updated smells bad.

What critical mistakes must be avoided?

Never delete a suspicious file without identifying all backdoors. Modern malwares install multiple simultaneous backdoors: cleaning an infected file without removing the initial infection vector guarantees reinfection within 48 hours. I've seen sites cleaned fifteen times that reinfected because a compromised upload.php file remained active.

Avoid automatic cleaning tools without understanding what they do. Some security plugins delete legitimate files or break functionalities. Manual analysis takes time but remains the most reliable. And above all, never reconnect via FTP or WordPress admin from a potentially compromised machine.

How can you verify that the cleaning is complete and lasting?

After cleaning, change all passwords: FTP, SSH, database, CMS admin, and host. A malware may have captured your credentials. Install a monitoring plugin that alerts on any file modification. Check for suspicious cron jobs that could re-inject code at regular intervals.

Submit a reconsideration request in Google Search Console once the site is clean, documenting the corrective actions taken. Google can take several weeks to lift a manual penalty for malware. Monitor your rankings and organic traffic: a sudden drop post-cleaning may signal reinfection or collateral damage from the cleaning.

  • Access the server via SSH/SFTP, never via browser for a suspicious page
  • Backup the entire site and database before any intervention
  • Use grep to search for eval, base64_decode, gzinflate, preg_replace in PHP files
  • Compare files with a clean CMS installation to identify changes
  • Change all passwords after cleaning: FTP, SSH, database, admin
  • Submit a reconsideration request in Google Search Console with detailed documentation
Malware investigation requires technical rigor and caution. Analyzing server-side source code protects your environment while revealing infection mechanisms. These operations remain complex and time-consuming: in the face of a serious or recurring infection, support from an SEO agency specializing in security can make the difference between superficial cleaning and lasting eradication. An expert eye identifies attack vectors, secures the site long-term, and accelerates the lifting of Google penalties.

❓ Frequently Asked Questions

Peut-on utiliser un navigateur en mode navigation privée pour investiguer un malware ?
Non, la navigation privée ne protège que contre l'enregistrement local de l'historique et des cookies. Elle n'empêche pas l'exécution de scripts malveillants qui peuvent exploiter des vulnérabilités de votre navigateur ou capturer des informations système.
Quels sont les fichiers PHP les plus souvent ciblés par les malwares SEO ?
Les fichiers index.php, header.php, footer.php et functions.php sous WordPress sont les cibles privilégiées. Les malwares injectent également du code dans .htaccess pour des redirections et créent des fichiers cachés avec des noms aléatoires dans wp-content ou wp-includes.
Comment différencier un fichier légitime obfusqué d'un malware ?
Les CMS légitimes n'obfusquent jamais leur code core. Si vous trouvez du base64_decode ou eval dans des fichiers WordPress, Joomla ou Drupal natifs, c'est suspect. Comparez avec une installation propre téléchargée depuis le site officiel.
Un malware peut-il survivre à une réinstallation complète du CMS ?
Oui, si la base de données reste infectée ou si des fichiers malveillants subsistent dans les répertoires uploads, cache ou temp. Une réinstallation propre nécessite de restaurer uniquement les contenus légitimes après vérification, pas un simple écrasement des fichiers core.
Combien de temps Google met-il à lever une pénalité après nettoyage d'un malware ?
Entre une semaine et plusieurs mois selon la gravité et la récurrence de l'infection. Une demande de réexamen bien documentée dans Search Console accélère le processus. Sans demande explicite, Google peut maintenir la pénalité indéfiniment même après nettoyage.
🏷 Related Topics
Domain Age & History AI & SEO

🎥 From the same video 5

Other SEO insights extracted from this same Google Search Central video · duration 7 min · published on 30/10/2013

🎥 Watch the full video on YouTube →

Related statements

💬 Comments (0)

Be the first to comment.

2000 characters remaining
🔔

Get real-time analysis of the latest Google SEO declarations

Be the first to know every time a new official Google statement drops — with full expert analysis.

No spam. Unsubscribe in one click.