Skip to content
WP Cloud
WP Cloud
    • For Hosts
    • For Agencies
    • For Registrars
    • For Native Hosting
    • Performance
    • Security
    • Real-Time Automated Failover
    • Vertical Scaling and Bursting
    • WordPress Management
    • PanelAlpha Integration: White-Label WordPress Control Panel for Hosts
    • EasyEngine Panel Integration: Visual WordPress Management for WP Cloud
    • FAQs
    • WP Cloud API
    • Partner Portal
    • Documentation
    • New Partner Guide
    • Pressable
    • Convesio
    • Porkbun
    • PanelAlpha
    • Ivapix
    • UNC Greensboro
    • Impressive Hosting
    • Blog
    • Performance Benchmarks
  • Connect With Us
  • Login ↗
Start Here ↗
  • Solutions

    • For Hosts
    • For Agencies
    • For Registrars
    • For Native Hosting
    • Featured Partners

    Features

    • Performance
    • Security
    • Real-Time Automated Failover
    • Vertical Scaling and Bursting
    • WordPress Management

    Integrations

    • PanelAlpha Integration
    • Easy Engine Panel Integration

    Resources

    • Documentation
    • WP Cloud API
    • FAQs
    • Partner Portal
    • New Partner Guide
    • Announcements
    • Changelog
  • Case Studies
    • PressableA case study about how WP Cloud supports Pressable to power millions of page views daily.
    • Convesio
    • Porkbun
    • PanelAlpha
    • Ivapix
    • UNC Greensboro
    • Newspack
    • Inverse Paradox
  • Insights
    • Podcast
    • BlogWP Cloud blog page with latest news and updates about the platform.
    • Performance Benchmarks
  • Connect With Us
  • Login ↗
Start Here ↗

Browse

    • WP Cloud platform overview
    • Onboard and launch with WP Cloud
    • WP Cloud Partner Portal
    • Get support from WP Cloud
    • WP Cloud glossary
    • API Documentation
    • Manage and secure API keys
    • Client SSH
    • WP Cloud API quick start
    • Webhooks
    • Run bulk tasks across sites
      • Manage site domains and aliases
      • Domain verification records
      • TLS certificates
      • Manage custom TLS certificates
      • Cloudflare and WP Cloud
    • Clone a site
    • Configure resources, site type, and billing with site meta
    • Delete a site
    • Persistent data
    • Staging sites
    • Migrate a site to WP Cloud
      • SSH and SFTP access models
      • Client SSH
      • User SSH and SFTP access
      • Database credentials
      • phpMyAdmin
      • ABSPATH
      • Default wp-config.php
      • Site constants
      • Configure redirects and headers with custom-redirects.php
      • Akismet and Jetpack
      • Blocked and unsupported plugins
      • PHP lifecycle and supported versions
      • Symlinks and managed software
      • WordPress versions
      • Install Composer and WP-CLI packages
      • Manage platform software with WP-CLI
      • Useful WP-CLI commands
    • Transactional email
    • WordPress multisite
    • Cron scheduling
    • Decoupled and headless WordPress
      • Edge Cache preload
      • WooCommerce cart caching
      • Page Cache
      • Edge Cache
      • Object Cache
      • Image transformation
      • Offload image sub-sizes
    • Configure lightweight 404s for static files
      • Edge Rules overview
      • Edge Rule types
      • Edge Rule conditions
      • Verify Edge Rules
      • Edge Cache preload
      • WooCommerce cart caching
      • Edge Cache
    • Edge request logs
      • DDoS protection
      • Defensive Mode
      • Rate limiting
      • Network and web application firewalls
      • Bot protection
      • Password protection
      • HTTP and security headers
      • PHP filesystem access permissions
      • Scan a site for malware
    • Backups overview
    • Create an on-demand backup
    • Restore a backup
    • Jetpack backups
      • Error logs
      • Web server logs
      • Edge request logs
    • Usage reporting
    • Metrics
    • Application performance monitoring
    • Automated failover
    • IP ranges
    • Origin and edge servers
    • Server specifications and settings
    • EasyEngine integration
    • PanelAlpha integration
      • White labelling and co-marketing WP Cloud
      • WP Cloud logos
      • Terms of Service & Compliance
      • Prohibited content
      • Copyright infringement and takedown notifications
    • WP Cloud billing
    • WP Cloud for agencies and site networks
    • WP Cloud partner support options
    • Troubleshoot Page and Edge Cache
    • Troubleshoot HTTP 429 and 599 errors
    • WP Cloud HTTP status codes
    • Troubleshoot site performance
    • Cache slow database queries
    • Troubleshoot duplicate core files, wp-config.php, and wp-admin 403 errors
    • Troubleshoot email delivery
    • Repair Yoast indexables
    • Troubleshoot PDF thumbnail generation
    • Troubleshoot TLS certificate provisioning

Updates

  • Changelog
  • WP Cloud Status
  • Announcements
Documentation/Security/Traffic protection/Defensive Mode

Defensive Mode

LAST UPDATED

5 months ago

    Defensive Mode uses browser challenges to reduce unwanted automated traffic reaching a site. WP Cloud also challenges certain traffic independently of Defensive Mode. Seeing a “Checking your browser” page does not by itself mean that manual or Automatic Defensive Mode is active.

    Defensive Mode works with WP Cloud’s platform-level DDoS protection and requires Edge Cache.

    How Defensive Mode works

    WP Cloud uses the same challenge system in these situations:

    SituationWhat triggers the challenge
    Manual Defensive ModeA partner enables Defensive Mode through WP-CLI or the API for 30 minutes through seven days.
    Automatic Defensive ModeWP Cloud temporarily enables Defensive Mode after a resource-limit event recorded internally as HTTP 599.
    Traffic classificationWP Cloud identifies a request pattern with a very high probability of being malicious, fake, or spoofed, such as a spoofed crawler. Neither manual nor Automatic Defensive Mode needs to be active.

    Most challenges are automated browser checks that use proof of work. A visitor briefly sees the browser-check page, then the browser completes the challenge and redirects to the requested page. The usual automated check may take up to five seconds. WP Cloud can escalate to a harder challenge, which may require an action such as selecting a checkbox.

    A legitimate visitor whose request matches a suspicious pattern can continue after passing the challenge. API clients, webhooks, uptime monitors, and other automated clients may be unable to complete a browser challenge.

    Challenge responses use HTTP 403. A request that fails or cannot complete the challenge does not reach the requested page. HTTP 429 indicates rate limiting. It is a different response from a challenge.

    Many traffic patterns and fingerprints can trigger a classification challenge. A challenge can occur even when neither manual nor Automatic Defensive Mode is active.

    WP Cloud allows certain recognized legitimate traffic through Defensive Mode to help keep essential ecommerce operations working. If real users or an essential service receives an unexpected challenge, follow Report unexpected challenges.

    The normal Defensive Mode crawler exceptions also apply to Edge Rules that challenge requests. Edge Rule challenges can operate while manual and Automatic Defensive Mode are inactive.

    The platform’s challenge system cannot be fully disabled. Ending Defensive Mode does not stop challenges triggered by traffic classification. WP Cloud Support can review false positives and assess whether an exception or another adjustment is appropriate.

    Test with an accurate User-Agent

    Use a specific, accurate User-Agent for every service you build, including uptime monitors, scheduled content syncs, webhooks, and API integrations. This applies whether requests come from a server or your computer. Replace library defaults, such as Python or Go HTTP library User-Agents, with your service’s own identifier.

    For example, a monitor could send ExampleMonitor/1.0, and a sync service could send ExampleContentSync/2.0. Use your own service name and version.

    Never impersonate a browser, Googlebot, or another service by copying its User-Agent.

    For example, a curl request with Googlebot’s User-Agent from outside Google’s network is spoofed crawler traffic. Expect a challenge and HTTP 403. This test does not show how WP Cloud handles real Googlebot requests. Impersonating other well-known service providers can also trigger spoofed-traffic challenges.

    An accurate User-Agent helps distinguish legitimate automation from abuse, but does not bypass challenges or rate limits. If your service still receives unexpected challenges, provide the request details below to Support.

    When to use Defensive Mode

    Use Defensive Mode during a suspected bot or DDoS event when unwanted traffic is still reaching the site or using PHP resources. Check Metrics, web server logs, and the site’s normal traffic pattern before and after enabling it.

    Keep Defensive Mode active only as long as needed. Check important site, API, webhook, monitoring, and checkout workflows after enabling it.

    Manage Defensive Mode with WP-CLI

    The installed wp edge-cache command accepts durations in minutes, hours, or days. The supported range is 30 minutes through seven days.

    Enable Defensive Mode for a duration:

    wp edge-cache defensive-mode --time=<time>Code language: HTML, XML (xml)

    For example:

    wp edge-cache defensive-mode --time=35m
    wp edge-cache defensive-mode --time=2h
    wp edge-cache defensive-mode --time=3d

    End it early:

    wp edge-cache defensive-mode --end

    Check the current Edge Cache and Defensive Mode state:

    wp edge-cache status

    Run wp edge-cache without a subcommand to see the usage installed on the site. The current command uses defensive-mode; do not use the obsolete defensive_mode form.

    Manage Defensive Mode through the API

    Use the Configure Defensive Mode endpoint to set the state for a site. WP Cloud partners can use this endpoint to provide Defensive Mode controls in their own dashboards.

    Supply the expiration as a Unix timestamp at least 30 minutes and no more than seven days in the future. A value of 0 disables Defensive Mode. The site-level route uses the primary domain by default. Use the domain-specific route documented in the same API group when the setting should apply to another domain on the site.

    Use the Get Defensive Mode status endpoint to retrieve the current ddos_until value. A future timestamp records when the mode is set to end; 0 means it is not active.

    Automatic Defensive Mode

    WP Cloud temporarily enables Automatic Defensive Mode after a resource-limit event recorded internally as HTTP 599. A 599 means a PHP connection was not available in time. It does not require CPU usage to reach its limit.

    See Understand PHP workers and backlog for a six-worker example and guidance on adding capacity or optimizing the site.

    Automatic Defensive Mode reduces unwanted requests reaching WordPress to protect the site’s resources. This can help legitimate requests reach the site instead of being resource limited. Requests that receive a challenge must still pass it before continuing.

    WP Cloud may enable Automatic Defensive Mode again or extend it if conditions do not improve. A legitimate visitor is challenged no more than once per hour while Automatic Defensive Mode is active.

    Check the site after enabling Defensive Mode

    After enabling Defensive Mode:

    1. Check wp edge-cache status or the API status endpoint.
    1. Open the site in a logged-out browser. If challenged, confirm that the browser passes the challenge and loads the requested page.
    1. Test important automated clients, including payment-provider callbacks. A client without a browser may be unable to complete the challenge.
    1. Compare request volume, rate-limit metrics, PHP use, and visitor errors with the period before you enabled it.
    1. End Defensive Mode when the additional challenge is no longer needed, then repeat the checks.

    If legitimate traffic still receives HTTP 429 responses, or WP Cloud records HTTP 599 errors during the event, use Troubleshoot HTTP 429 and 599 errors.

    Report unexpected challenges

    Contact WP Cloud Support if real users or essential services, such as payment-provider callbacks, receive a challenge that they should not encounter. Provide the following details together for each example request:

    • The correct Atomic Site ID and affected domain.
    • The exact timestamp with the time zone, preferably UTC.
    • The request URL.
    • The complete User-Agent header.
    • The source IP address. This is essential for finding the exact request.
    • What failed and how it affected the visitor or service. Include any third-party proxy or headless setup involved in the request.

    Request counts or reports that many sites are affected do not identify which requests failed for legitimate users. Logs also contain expected blocks, challenges, and rate limits.

    The timestamp, source IP, URL, and User-Agent together let Support locate the exact request, investigate why it was challenged, and assess possible adjustments. Without these details, identifying a false positive takes longer and may not be possible.

    Previous DDoS protection
    Next Rate limiting

    Related Guides

    • DDoS protection

      Learn how WP Cloud routes, filters, and mitigates denial-of-service traffic before it reaches WordPress.

      2 Min.

      READ

    • Rate limiting

      Understand how WP Cloud classifies excessive requests, when HTTP 429 responses are expected, and when…

      4 Min.

      READ

    • Network and web application firewalls

      Understand WP Cloud inbound access, outbound firewall rules, and web application firewall responses.

      3 Min.

      READ

    On this page

      Contact support

      Contact us with Support issues and questions related to WP Cloud, the WP Cloud Atomic API, API-key IP allow list changes, Station, and more.

      Check the FAQs

      Have questions? Please visit our FAQ to learn more.

      An Automattic venture

      Work With Us

      Press

      Privacy Policy

      © 2021-2026 Automattic Inc.

      Notifications