Emergency cleanup guide

Cloaking Removal Guide

Step-by-step instructions to remove speed optimization scams and restore your website's Google compliance

Immediate Action Required

If cloaking has been detected on your website, follow these emergency steps immediately to minimize damage to your SEO and prevent further penalties:

1

Stop all development work - Prevent further damage

2

Backup your website - Save current state before changes

3

Document the cloaking - Screenshot evidence for disputes

4

Notify stakeholders - Inform team of the situation

5

Begin removal process - Follow platform-specific guides below

Universal Removal Steps

Regardless of your platform, these comprehensive steps apply to all websites and will help you identify and remove cloaking systematically:

1

Identify Cloaking Code

Search your website's code for these common cloaking indicators:

References to "Lighthouse", "PageSpeed", "Chrome-Lighthouse" in JavaScript
navigator.userAgent checks with conditional logic
navigator.webdriver or navigator.plugins.length checks
Heavily obfuscated or encoded JavaScript (eval, atob, fromCharCode)
MutationObserver with script manipulation
Service Worker registration with caching logic
Libraries like Yett.js or similar script blockers
2

Remove Suspicious Files

Delete or disable these common cloaking components:

Speed optimization plugins that promise unrealistic scores
Custom JavaScript files with obfuscated code
Modified .htaccess rules that detect user agents
Service worker files (sw.js, service-worker.js) if suspicious
Third-party scripts from unknown CDNs
3

Clean Your Code

Review and clean these areas:

Remove inline JavaScript that checks for testing tools
Delete conditional loading logic based on user agents
Remove base64 encoded content serving different resources
Clean up modified performance API implementations
Restore original lazy loading implementations
4

Verify Removal

Confirm cloaking is completely removed:

Run another scan with Cloaxr to verify clean status
Test your site in different browsers and devices
Compare PageSpeed scores with real user experience
Check Google Search Console for crawl issues
Monitor Core Web Vitals for consistency

Platform-Specific Removal Guides

Choose your platform below for detailed, step-by-step removal instructions tailored to your specific CMS or website technology:

WordPress Removal Guide

1
Access WordPress Admin Dashboard

Log in to your WordPress admin panel
Navigate to Plugins → Installed Plugins
Take a screenshot of installed plugins for reference

2
Identify and Remove Suspicious Plugins

Look for plugins with names like "Speed Booster", "PageSpeed Optimizer", "Turbo Boost"
Check recent installations that coincide with score improvements
Common culprits: WP Fastest Cache (if modified), Autoptimize (with suspicious custom rules)
Deactivate suspicious plugins first, then delete them completely

3
Check Theme Files

Go to Appearance → Theme Editor
Review header.php for injected scripts before </head>
Check footer.php for scripts before </body>
Examine functions.php for wp_enqueue_script calls with suspicious files
Look for obfuscated JavaScript in template files

4
Clean Database

Use phpMyAdmin or database plugin like WP-CLI
Search wp_options table for suspicious JavaScript
Look for base64 encoded content in option values
Check transients and meta fields for injected code

5
Clear All Caches & Verify

Clear WordPress cache plugins
Purge CDN cache if using one
Clear browser cache and test in incognito mode
Reset any server-side caching (Redis, Memcached)
Verify removal with another Cloaxr scan
Shopify Removal Guide

1
Access Shopify Admin Panel

Log in to your Shopify admin dashboard
Navigate to Apps section in the sidebar
Document all installed apps with screenshots

2
Audit and Remove Suspicious Apps

Identify apps claiming instant speed improvements
Check app permissions - look for "modify theme files" access
Common suspects: Speed boosters, PageSpeed optimizers
Uninstall apps that were installed around the time scores improved
Check app reviews for mentions of penalties or issues

3
Clean Theme Code

Go to Online Store → Themes → Actions → Edit code
Check theme.liquid for injected scripts in <head> and before </body>
Review all .liquid files in snippets folder
Look for base64 encoded scripts or obfuscated JavaScript
Check layout files for conditional logic based on user agents

4
Review Theme Settings

Check theme customization settings for injected code
Remove any custom CSS/JS that checks for testing tools
Verify theme hasn't been modified by apps
Consider reverting to a clean theme backup if available
Webflow Removal Guide

1
Access Webflow Designer

Log in to your Webflow account
Open your project in the Designer
Navigate to Project Settings

2
Check Custom Code Areas

Review Site Settings → Custom Code tab
Check Header Code and Footer Code sections
Look for Page-level custom code on individual pages
Remove any scripts that reference PageSpeed, Lighthouse, or user agents

3
Audit Third-Party Integrations

Check all third-party embeds and widgets
Review any custom HTML embed elements
Remove suspicious speed optimization scripts
Verify all external JavaScript sources

4
Clean and Republish

Remove all suspicious custom code
Clear any conditional loading logic
Publish your site to apply changes
Test the site in different browsers
Squarespace Removal Guide

1
Access Squarespace Settings

Log in to your Squarespace account
Go to Settings → Advanced → Code Injection
Check both Header and Footer injection areas

2
Remove Injected Code

Remove any suspicious JavaScript from Header injection
Clear Footer injection code that references speed testing
Check individual page headers for custom code
Remove any third-party speed optimization scripts

3
Check Custom CSS

Navigate to Design → Custom CSS
Look for CSS that hides elements conditionally
Remove any styles that detect user agents
Check for media queries targeting specific tools

4
Review Extensions

Check Settings → Extensions for speed-related tools
Remove any suspicious third-party integrations
Verify all remaining extensions are legitimate
Wix Removal Guide

1
Access Wix Editor

Log in to your Wix account
Open your site in the Editor
Go to Settings in the site dashboard

2
Check Custom Code

Navigate to Settings → Custom Code
Review all custom code snippets
Remove any code that references speed testing tools
Check individual page settings for custom code

3
Audit Apps and Integrations

Go to App Market → Manage Apps
Identify any speed optimization apps
Remove suspicious third-party applications
Check for custom HTML elements with injected scripts

4
Review Tracking Codes

Check Settings → Tracking & Analytics
Remove any suspicious tracking codes
Verify Google Analytics and other legitimate tools only
Clear any conditional loading scripts
Magento Removal Guide

1
Access Magento Admin Panel

Log in to your Magento admin dashboard
Navigate to System → Configuration
Check Content Management settings

2
Check Extensions and Modules

Go to System → Web Setup Wizard → Extension Manager
Identify speed optimization extensions
Disable suspicious modules from System → Configuration → Advanced
Remove extensions via Composer or file system

3
Review Theme Files

Check app/design/frontend/[theme] directory
Review template files for injected JavaScript
Check layout XML files for suspicious blocks
Examine skin/js directory for obfuscated scripts

4
Clean Custom Code

Check System → Configuration → Design → HTML Head
Remove custom JavaScript that detects user agents
Clear suspicious code from footer sections
Flush Magento caches after changes
Next.js / React Removal Guide

1
Audit Dependencies

Check package.json for suspicious speed optimization packages
Review node_modules for unknown dependencies
Use npm audit to check for security issues
Remove any packages that claim to boost PageSpeed scores

2
Check Custom Components

Review all custom React components
Look for conditional rendering based on user agents
Check useEffect hooks for speed testing detection
Examine any dynamic imports or code splitting logic

3
Review Next.js Configuration

Check next.config.js for suspicious modifications
Review _app.js and _document.js files
Look for custom middleware that detects bots
Check public directory for suspicious JavaScript files

4
Clean Build Process

Remove any build-time code injection
Check webpack configuration for modifications
Clear .next build directory and rebuild
Verify no environment variables inject cloaking code
Laravel / PHP Removal Guide

1
Check Middleware and Routes

Review app/Http/Middleware for user agent detection
Check routes/web.php for conditional logic
Examine any custom middleware that modifies responses
Look for bot detection in service providers

2
Review Blade Templates

Check resources/views for injected JavaScript
Look for @if statements based on user agents
Review layout files for conditional scripts
Examine any dynamically loaded assets

3
Audit Configuration Files

Check .env file for suspicious environment variables
Review config/ directory for custom settings
Look for caching configurations that serve different content
Check composer.json for unknown packages

4
Clean Controllers and Services

Review controller methods for cloaking logic
Check service classes for user agent detection
Remove any response modification based on request headers
Clear application cache after changes
BigCommerce Removal Guide

1
Access BigCommerce Control Panel

Log in to your BigCommerce admin panel
Navigate to Storefront → Script Manager
Review all installed scripts

2
Remove Suspicious Scripts

Delete any third-party speed optimization scripts
Remove scripts that reference PageSpeed or Lighthouse
Check individual page scripts
Clear any conditional loading logic

3
Check Theme Files

Go to Storefront → My Themes → Current Theme → Customize
Review template files for injected code
Check footer and header templates
Look for user agent detection in Handlebars templates

4
Review Apps and Integrations

Check Apps → My Apps for speed-related applications
Remove any suspicious third-party apps
Verify remaining integrations are legitimate
Clear BigCommerce caches after changes
Drupal Removal Guide

1
Access Drupal Admin

Log in to your Drupal admin panel
Navigate to Extend → Modules
Review installed modules for speed-related functionality

2
Remove Suspicious Modules

Uninstall modules claiming PageSpeed improvements
Check custom modules in sites/all/modules
Remove any modules with obfuscated code
Disable speed optimization modules before uninstalling

3
Check Theme Files

Review active theme templates
Check .tpl.php files for injected JavaScript
Examine theme's template.php file
Look for conditional logic based on user agents

4
Review Custom Code

Check sites/default/settings.php for modifications
Review any custom hooks in .module files
Clean sites/all/libraries of suspicious scripts
Clear Drupal caches after changes
Joomla Removal Guide

1
Access Joomla Administrator

Log in to your Joomla admin panel
Navigate to Extensions → Manage → Manage
Review installed extensions

2
Remove Suspicious Extensions

Uninstall speed optimization plugins/components
Check third-party extensions for cloaking functionality
Remove any extensions with obfuscated code
Look for recently installed speed-related extensions

3
Check Template Files

Go to Extensions → Templates → Templates
Review active template's index.php file
Check for injected JavaScript in template files
Examine any custom template modifications

4
Review System Configuration

Check System → Global Configuration → Site settings
Review any custom JavaScript/CSS additions
Clear Joomla cache from System → Clear Cache
Verify .htaccess file hasn't been modified
Custom HTML / Static Website Removal Guide

1
Access Website Files

Connect to your web server via FTP, SFTP, or hosting panel file manager
Download a complete backup of your website files
Access the root directory (public_html, www, or similar)

2
Check HTML Files

Open each HTML file in a text editor
Look for suspicious <script> tags in the <head> section
Check for JavaScript before the closing </body> tag
Search for base64 encoded content or obfuscated scripts
Remove any scripts that reference "PageSpeed", "Lighthouse", or user agent detection

3
Review JavaScript Files

Check all .js files in your website directory
Look for obfuscated or minified code that wasn't created by you
Search for files with names like "speedboost.js", "optimizer.js", or similar
Remove any JavaScript files that contain user agent detection logic
Check for service worker files (sw.js, service-worker.js) and review their contents

4
Check CSS Files

Review all CSS files for conditional styles
Look for media queries that target specific user agents
Remove any CSS that hides elements from testing tools
Check for embedded JavaScript within CSS comments or data URLs

5
Review .htaccess File

Check your .htaccess file for suspicious rewrite rules
Look for user agent detection and conditional redirects
Remove any rules that serve different content to bots vs users
Backup the original .htaccess before making changes

6
Clean and Upload

Upload the cleaned files back to your server
Clear any server-side caches (if applicable)
Test your website in different browsers
Run another Cloaxr scan to verify clean status
Monitor your site performance to ensure normal operation

After Removing Cloaking

Once you've successfully removed all cloaking code, follow these essential steps for recovery and prevention:

Recovery Steps

1

Submit Reconsideration Request: If you received a manual action from Google, submit a detailed reconsideration request through Search Console

2

Monitor Search Console: Watch for crawl errors, indexing issues, or additional warnings over the next few weeks

3

Track Rankings: Document your ranking positions and organic traffic to measure recovery progress

4

Implement Legitimate Optimization: Focus on real performance improvements like image optimization

5

Regular Monitoring: Schedule monthly scans to ensure cloaking doesn't return through updates

Important Considerations

Expect Temporary Score Drops: Your PageSpeed scores will likely decrease after removing cloaking

Recovery Takes Time: It can take weeks or months for Google to restore your rankings

Document Everything: Keep records of what was removed for potential legal action

Consider Professional Help: If cloaking is deeply embedded, hire a reputable SEO professional

Need Professional Help?

If you're struggling with cloaking removal or want expert assistance to ensure complete cleanup, our team can help. We provide professional cloaking removal services with guaranteed results.