🔧 Fix Cloudflare OTTO Worker Redirect Diagnostic Failures

Camilo Aponte

Camilo Aponte

Last updated on Sep 30, 2026

Overview

When Cloudflare's OTTO Worker is installed on your www domain but a redirect forwards all traffic to the non-www version, the Worker never executes on incoming requests. The DNS diagnostic then reports a missing header because it checks the www URL, which immediately redirects before the Worker can inject the required response header. This article walks you through identifying and resolving that specific failure.

How to Confirm This Is Your Issue

Before making any changes, verify that this redirect scenario is the actual cause of your diagnostic failure:

  1. Open a terminal or use an online tool such as curl to request your www URL: curl -I https://www.yourdomain.com
  2. Check the response. If you see a 301 or 302 redirect pointing to https://yourdomain.com (non-www), the Worker is being bypassed.
  3. In your Search Atlas dashboard, go to OTTO SEO (left sidebar) and open your site's OTTO settings. Confirm the diagnostic error references a missing header — not a Worker script error.

If both conditions are true, follow the steps below.

Step 1 — Review Your Worker Route Configuration

A Worker route must match the URL that actually serves content, not the URL that redirects away. Log in to your Cloudflare dashboard and review your OTTO Worker's route assignments:

  1. Navigate to Workers & Pages and locate your OTTO Worker.
  2. Review the routes currently assigned to the Worker.
  3. Confirm that a route exists for your non-www domain: yourdomain.com/*
  4. If only the www route exists (www.yourdomain.com/*), add a route for the non-www domain, selecting the correct zone, and save your changes.
  5. Keep the www route in place as well so both domains are covered.

The Worker must be assigned to the domain that actually responds to requests — in a www-to-non-www redirect setup, that is the non-www domain.

Step 2 — Verify Worker Permissions and API Token Scope

Even when routes look correct, the Worker can silently fail to execute if the API token used during installation lacks the necessary permissions. Check your Cloudflare API token settings to confirm the token associated with your OTTO integration has sufficient permissions to manage Worker routes and scripts across the relevant zone. If permissions appear incomplete, update the token accordingly.

If you are unsure which permissions are required or the issue persists after reviewing your route and token configuration, please contact our support team via the chat icon in your Search Atlas dashboard so we can investigate your specific setup.