Cloudflare · Nuxt Skew Protection · Nuxt SEO

[NuxtSEO Pro](https://nuxtseo.com/ "Home")

- [Modules](https://nuxtseo.com/docs/nuxt-seo/getting-started/introduction)
- [Tools](https://nuxtseo.com/tools)
- [Pro](https://nuxtseo.com/pro)
- [Learn SEO](https://nuxtseo.com/learn-seo/nuxt) [Releases](https://nuxtseo.com/releases)

[Sign In](https://nuxtseo.com/auth/github)

[Nuxt SEO on GitHub](https://github.com/harlan-zw/nuxt-seo)

[User Guides](https://nuxtseo.com/docs/skew-protection/getting-started/introduction)

[API](https://nuxtseo.com/docs/skew-protection/api/use-skew-protection)

[Releases](https://nuxtseo.com/docs/skew-protection/releases/v1)

Skew Protection

- [Switch to Skew Protection](https://nuxtseo.com/docs/skew-protection/getting-started/introduction)
- [Switch to Nuxt SEO](https://nuxtseo.com/docs/nuxt-seo/getting-started/introduction)
- [Switch to Robots](https://nuxtseo.com/docs/robots/getting-started/introduction)
- [Switch to Sitemap](https://nuxtseo.com/docs/sitemap/getting-started/introduction)
- [Switch to OG Image](https://nuxtseo.com/docs/og-image/getting-started/introduction)
- [Switch to Schema.org](https://nuxtseo.com/docs/schema-org/getting-started/introduction)
- [Switch to Link Checker](https://nuxtseo.com/docs/link-checker/getting-started/introduction)
- [Switch to SEO Utils](https://nuxtseo.com/docs/seo-utils/getting-started/introduction)
- [Switch to Site Config](https://nuxtseo.com/docs/site-config/getting-started/introduction)
- [Switch to AI Ready](https://nuxtseo.com/docs/ai-ready/getting-started/introduction)

Search…```k`` /`

v1.1.1

- [Discord Support](https://discord.com/invite/275MBUBvgP)

### Getting Started

- [Introduction](https://nuxtseo.com/docs/skew-protection/getting-started/introduction)
- [Installation](https://nuxtseo.com/docs/skew-protection/getting-started/installation)

### Core Concepts

- [Check for Update Strategy](https://nuxtseo.com/docs/skew-protection/guides/update-strategies)
- [Update Notifications](https://nuxtseo.com/docs/skew-protection/guides/immediate-updates)
- [Performance](https://nuxtseo.com/docs/skew-protection/guides/performance)
- [Persistent Storage](https://nuxtseo.com/docs/skew-protection/guides/storage-configuration)
- [Notification UI](https://nuxtseo.com/docs/skew-protection/guides/ui-examples)
- [Cookie Consent](https://nuxtseo.com/docs/skew-protection/guides/cookie-consent)
- [View Active Connections](https://nuxtseo.com/docs/skew-protection/guides/live-connections)
- [Tracking User Pages](https://nuxtseo.com/docs/skew-protection/guides/route-tracking)

### Providers

- [External Providers](https://nuxtseo.com/docs/skew-protection/providers/external)
- [Cloudflare](https://nuxtseo.com/docs/skew-protection/providers/cloudflare)

Providers

# Cloudflare

[Copy for LLMs](https://nuxtseo.com/docs/skew-protection/providers/cloudflare.md)

[Cloudflare](https://cloudflare.com) has several deployment options for Nuxt applications:

| Deployment Option | [Update Strategy](https://nuxtseo.com/docs/skew-protection/guides/update-strategies) | [Storage](https://nuxtseo.com/docs/skew-protection/api/config#storage-storageoptions) |
| --- | --- | --- |
| [**Cloudflare Durable Objects**](#cloudflare-durable-objects) (recommended) | [WebSocket](https://developer.mozilla.org/en-US/docs/Web/API/WebSocket) (real-time) | Cloudflare KV |
| [**Cloudflare Workers / Pages**](#cloudflare-workers--pages) | Polling | Filesystem or Cloudflare KV |
| [**NuxtHub**](#nuxthub) | Polling (WebSocket with Durable) | Filesystem |

**Cloudflare Durable Objects** is recommended for the best user experience, as it enables instant update notifications via WebSockets.

## [Long-Lived Asset Storage](#long-lived-asset-storage)

When using Cloudflare directly, your local wrangler instance writes files to your default Cloudflare KV namespace during build time. As a fallback and when using NuxtHub, the module can also use filesystem storage with CI/CD caching.

For filesystem storage, see [Storage Configuration](https://nuxtseo.com/docs/skew-protection/guides/storage-configuration#filesystem-storage) for setting up caching in your CI/CD pipeline.

### [KV Binding](#kv-binding)

To use a dedicated KV namespace for Nuxt Skew Protection, create a KV namespace in your Cloudflare dashboard and bind it to your Worker or Pages project as `SKEW_PROTECTION`.

Then configure the module to use the binding:

nuxt.config.ts

```
import { defineNuxtConfig } from 'nuxt/config'

export default defineNuxtConfig({
  // ...
  nitro: {
    // ...
    cloudflare: {
      wrangler: {
        kvNamespaces: [
          { binding: 'SKEW_PROTECTION', id: 'your-kv-namespace-id' } // Get ID from Cloudflare dashboard
        ]
      }
    }
  },
})
```

## [Cloudflare Durable Objects](#cloudflare-durable-objects)

Cloudflare Durable Objects support **WebSockets** for real-time update notifications, giving instant updates to users.

nuxt.config.ts

```
import { defineNuxtConfig } from 'nuxt/config'

export default defineNuxtConfig({
  modules: ['nuxt-skew-protection'],

  nitro: {
    preset: 'cloudflare-durable',
    experimental: {
      websocket: true, // Required for WebSocket strategy
    },
  },
})
```

WebSocket strategy requires `nitro.experimental.websocket: true` and the `cloudflare-durable` preset.

## [Cloudflare Workers / Pages](#cloudflare-workers-pages)

Cloudflare Workers / Pages use **polling** for update detection since they don't support persistent connections.

nuxt.config.ts

```
import { defineNuxtConfig } from 'nuxt/config'

export default defineNuxtConfig({
  modules: ['nuxt-skew-protection'],

  nitro: {
    preset: 'cloudflare',
  },

  skewProtection: {
    updateStrategy: 'polling', // Auto-detected
  },

  experimental: {
    checkOutdatedBuildInterval: 5 * 60 * 1000, // 5 minutes
  },
})
```

## [NuxtHub](#nuxthub)

[NuxtHub](https://hub.nuxt.com) simplifies Cloudflare deployment by automatically managing KV namespaces, databases, and other resources. By default, the module uses **filesystem storage** which works with NuxtHub deployments.

nuxt.config.ts

```
export default defineNuxtConfig({
  modules: [
    '@nuxthub/core',
    'nuxt-skew-protection',
  ],

  hub: {
    kv: true, // Enable KV for your app
  },

  skewProtection: {
    // Uses filesystem storage by default - no configuration needed!
  },
})
```

### [Real-Time Updates with NuxtHub](#real-time-updates-with-nuxthub)

To enable real-time updates with NuxtHub, enable `websocket` in your hub configuration:

nuxt.config.ts

```
export default defineNuxtConfig({
  modules: [
    '@nuxthub/core',
    'nuxt-skew-protection',
  ],

  nitro: {
    experimental: {
      websocket: true,
    },
  },

  hub: {
    kv: true,
    websocket: true, // Enable WebSocket support
  },
})
```

For storage, see [Storage Configuration](https://nuxtseo.com/docs/skew-protection/guides/storage-configuration#filesystem-storage) for setting up caching in your CI/CD pipeline.

[Edit this page](https://github.com/nuxt-seo-pro/nuxt-skew-protection/edit/main/docs/content/3.providers/6.cloudflare.md)

[Markdown For LLMs](https://nuxtseo.com/docs/skew-protection/providers/cloudflare.md)

Did this page help you?

[External Providers Use third-party WebSocket providers for real-time update notifications on any platform.](https://nuxtseo.com/docs/skew-protection/providers/external) [v1.0.0 Release notes for Nuxt Skew Protection v1.](https://nuxtseo.com/docs/skew-protection/releases/v1)

On this page

- [Long-Lived Asset Storage](#long-lived-asset-storage)
- [Cloudflare Durable Objects](#cloudflare-durable-objects)
- [Cloudflare Workers / Pages](#cloudflare-workers-pages)
- [NuxtHub](#nuxthub)

[GitHub](https://github.com/harlan-zw/nuxt-seo) [ Discord](https://discord.com/invite/275MBUBvgP)

### [NuxtSEO](https://nuxtseo.com/ "Home")

- [Getting Started](https://nuxtseo.com/docs/nuxt-seo/getting-started/introduction)
- [MCP](https://nuxtseo.com/docs/nuxt-seo/guides/mcp)

Modules

- [Robots](https://nuxtseo.com/docs/robots/getting-started/introduction)
- [Sitemap](https://nuxtseo.com/docs/sitemap/getting-started/introduction)
- [OG Image](https://nuxtseo.com/docs/og-image/getting-started/introduction)
- [Schema.org](https://nuxtseo.com/docs/schema-org/getting-started/introduction)
- [Link Checker](https://nuxtseo.com/docs/link-checker/getting-started/introduction)
- [SEO Utils](https://nuxtseo.com/docs/seo-utils/getting-started/introduction)
- [Site Config](https://nuxtseo.com/docs/site-config/getting-started/introduction)
- [Skew Protection](https://nuxtseo.com/docs/skew-protection/getting-started/introduction)
- [AI Ready](https://nuxtseo.com/docs/ai-ready/getting-started/introduction)

### [NuxtSEO Pro](https://nuxtseo.com/pro "Nuxt SEO Pro")

- [Getting Started](https://nuxtseo.com/pro)
- [Dashboard](https://nuxtseo.com/pro/dashboard)
- [Pro MCP](https://nuxtseo.com/pro/docs/getting-started/mcp-setup)

### [Learn SEO](https://nuxtseo.com/learn-seo "Learn SEO")

Nuxt

- [Mastering Meta](https://nuxtseo.com/learn-seo/nuxt/mastering-meta)
- [Controlling Crawlers](https://nuxtseo.com/learn-seo/nuxt/controlling-crawlers)
- [Launch & Listen](https://nuxtseo.com/learn-seo/nuxt/launch-and-listen)
- [Routes & Rendering](https://nuxtseo.com/learn-seo/nuxt/routes-and-rendering)
- [Staying Secure](https://nuxtseo.com/learn-seo/nuxt/routes-and-rendering/security)

Vue

- [Vue SEO Guide](https://nuxtseo.com/learn-seo/vue)
- [Mastering Meta](https://nuxtseo.com/learn-seo/vue/mastering-meta)
- [Controlling Crawlers](https://nuxtseo.com/learn-seo/vue/controlling-crawlers)
- [SPA SEO](https://nuxtseo.com/learn-seo/vue/spa)
- [SSR Frameworks](https://nuxtseo.com/learn-seo/vue/ssr-frameworks)
- [SEO Checklist](https://nuxtseo.com/learn-seo/checklist)
- [Pre-Launch Warmup](https://nuxtseo.com/learn-seo/pre-launch-warmup)
- [Backlinks & Authority](https://nuxtseo.com/learn-seo/backlinks)

### [Tools](https://nuxtseo.com/tools "SEO Tools")

- [Social Share Debugger](https://nuxtseo.com/tools/social-share-debugger)
- [Robots.txt Generator](https://nuxtseo.com/tools/robots-txt-generator)
- [Meta Tag Checker](https://nuxtseo.com/tools/meta-tag-checker)
- [HTML to Markdown](https://nuxtseo.com/tools/html-to-markdown)
- [XML Sitemap Validator](https://nuxtseo.com/tools/xml-sitemap-validator)
- [Schema.org Validator](https://nuxtseo.com/tools/schema-validator)
- [Keyword Idea Generator](https://nuxtseo.com/tools/keyword-generator)
- [Keyword Research](https://nuxtseo.com/tools/keyword-research)
- [SERP Analyzer](https://nuxtseo.com/tools/serp-analyzer)
- [Domain Rankings](https://nuxtseo.com/tools/domain-rankings)

Copyright © 2023-2026 Harlan Wilton - [MIT License](https://github.com/harlan-zw/nuxt-seo/blob/main/license) · [mdream](https://mdream.dev)