> ## Documentation Index
> Fetch the complete documentation index at: https://docs.hadoseo.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Enable Cloudflare Proxy (Orange Cloud) with Hado SEO

> Add Cloudflare's DDoS protection and WAF on top of Hado SEO prerendering

## Overview

By default, Hado SEO requires **DNS only** mode (gray cloud) during initial setup for DNS verification and SSL provisioning. Once your domain is verified and working, you can enable Cloudflare's proxy (orange cloud) to layer Cloudflare's security features on top of Hado SEO.

```
Without Cloudflare proxy:
  Visitor → Hado SEO → Your App

With Cloudflare proxy:
  Visitor → Cloudflare → Hado SEO → Your App
```

## Why Enable Cloudflare Proxy?

* **DDoS protection** from Cloudflare's network
* **Web Application Firewall (WAF)** for additional security
* **IP masking** so your origin IP isn't exposed via DNS lookups

<Info>
  Hado SEO already includes a global edge network, SSL, and compression. Cloudflare proxy adds a security layer on top, not a performance one.
</Info>

## Prerequisites

* Your domain is already set up in Hado SEO with **DNS verified** and **SSL active**
* Your site is loading correctly through Hado SEO
* Your domain's DNS is managed by Cloudflare

## Step-by-Step Setup

<Steps>
  <Step title="Verify Hado SEO is working">
    Before enabling the orange cloud, confirm everything works:

    1. Visit your domain in a browser and verify your site loads
    2. Check your [Hado SEO Dashboard](https://hadoseo.com/dashboard) shows **DNS Configured**
    3. Test with the [SEO Bot Crawler Test](https://hadoseo.com/free-seo-bot-crawler-test) to confirm prerendering works
  </Step>

  <Step title="Set Cloudflare SSL/TLS to Full (Strict)">
    This is the most important step. Cloudflare must connect to Hado SEO over HTTPS.

    1. Go to your [Cloudflare Dashboard](https://dash.cloudflare.com)
    2. Select your domain
    3. Go to **SSL/TLS** in the sidebar
    4. Set the encryption mode to **Full (Strict)**

    | Mode              | Works? | Notes                              |
    | ----------------- | ------ | ---------------------------------- |
    | **Off**           | No     | No encryption                      |
    | **Flexible**      | No     | Causes redirect loops              |
    | **Full**          | Yes    | Connects to Hado over HTTPS        |
    | **Full (Strict)** | Yes    | Best option, validates certificate |

    <Warning>
      Using **Flexible** mode will cause an infinite redirect loop because Hado SEO enforces HTTPS. You must use **Full** or **Full (Strict)**.
    </Warning>
  </Step>

  <Step title="Disable Bot Fight Mode">
    Cloudflare's bot management can block search engine crawlers before they reach Hado SEO.

    1. Go to **Security** → **Bots** in the Cloudflare sidebar
    2. Turn **off** Bot Fight Mode
    3. If you have Super Bot Fight Mode (Pro+), ensure **Verified Bots** are set to **Allow**

    <Warning>
      If Bot Fight Mode is enabled, Cloudflare may challenge or block Googlebot, Bingbot, and other crawlers. This defeats the purpose of prerendering.
    </Warning>
  </Step>

  <Step title="Enable the orange cloud">
    1. Go to **DNS** → **Records**
    2. Click the gray cloud icon next to your A records to toggle it orange
    3. Save each record

    | Type | Name | Value          | Proxy Status     |
    | ---- | ---- | -------------- | ---------------- |
    | A    | @    | `137.66.32.95` | Proxied (orange) |
    | A    | www  | `137.66.32.95` | Proxied (orange) |
  </Step>

  <Step title="Verify everything still works">
    After enabling the proxy:

    1. Visit your site in a browser
    2. Run the [SEO Bot Crawler Test](https://hadoseo.com/free-seo-bot-crawler-test) to confirm prerendering still works
    3. Check your [Hado SEO Analytics](/dashboard/analytics) over the next 24 hours to confirm bot visits are being tracked
  </Step>
</Steps>

## Recommended Cloudflare Settings

### Caching

Cloudflare does **not** cache HTML by default, so bot detection works correctly out of the box. Hado SEO serves different content based on User-Agent (prerendered HTML for bots, passthrough for humans), and since HTML isn't cached by Cloudflare, each request reaches Hado SEO properly.

No changes needed for most sites. If you've added custom cache rules for HTML, make sure they don't interfere with bot-specific responses.

### Security Settings

| Setting                 | Recommended                   | Why                                    |
| ----------------------- | ----------------------------- | -------------------------------------- |
| SSL/TLS Mode            | Full (Strict)                 | Prevents redirect loops                |
| Bot Fight Mode          | Off                           | Allows search engine bots through      |
| Under Attack Mode       | Off (use only during attacks) | Challenges all visitors including bots |
| Browser Integrity Check | On (default)                  | Safe to keep enabled                   |
| Always Use HTTPS        | On                            | Matches Hado SEO's HTTPS enforcement   |

### Settings to Avoid

<AccordionGroup>
  <Accordion title="Don't enable Under Attack Mode permanently" icon="shield">
    Under Attack Mode shows a JavaScript challenge to every visitor. Search engine bots can't solve these challenges and will fail to reach your prerendered pages.

    Only enable this during an active DDoS attack, and disable it afterward.
  </Accordion>

  <Accordion title="Don't cache HTML responses" icon="database">
    If you've set up custom Page Rules or Cache Rules that cache HTML (`Cache Everything`), Cloudflare may serve a cached human response to a bot (or vice versa).

    Either exclude HTML from caching or remove `Cache Everything` rules for your domain.
  </Accordion>

  <Accordion title="Don't use Cloudflare Workers that modify responses" icon="code">
    Cloudflare Workers that rewrite HTML, inject scripts, or modify headers can interfere with prerendered content and bot detection.

    If you use Workers, ensure they pass through requests to Hado SEO without modification.
  </Accordion>
</AccordionGroup>

## Troubleshooting

<AccordionGroup>
  <Accordion title="Redirect loop (ERR_TOO_MANY_REDIRECTS)" icon="circle-exclamation">
    **Cause:** Cloudflare SSL/TLS is set to **Flexible** instead of **Full (Strict)**.

    **Fix:** Go to Cloudflare → SSL/TLS and change to **Full (Strict)**.
  </Accordion>

  <Accordion title="Bots not being prerendered" icon="circle-exclamation">
    **Cause:** Cloudflare's Bot Fight Mode or Super Bot Fight Mode is blocking crawlers.

    **Fix:**

    * Disable Bot Fight Mode in Security → Bots
    * For Super Bot Fight Mode, set Verified Bots to **Allow**
    * Check Cloudflare's Firewall Events log to see if bots are being challenged
  </Accordion>

  <Accordion title="Site loads but analytics show no bot visits" icon="circle-exclamation">
    **Cause:** Cloudflare might be caching HTML or blocking bots silently.

    **Fix:**

    1. Run the [SEO Bot Crawler Test](https://hadoseo.com/free-seo-bot-crawler-test) to check prerendering
    2. Check Cloudflare Firewall Events for blocked requests
    3. Ensure no Cache Everything rules are active for HTML pages
    4. Wait 24-48 hours since bot visits are not immediate
  </Accordion>

  <Accordion title="SSL certificate errors" icon="circle-exclamation">
    **Cause:** Cloudflare can't validate Hado SEO's SSL certificate.

    **Fix:**

    * Ensure SSL/TLS is set to **Full** (not Full Strict) as a temporary workaround
    * Verify your domain's SSL is active in your Hado SEO dashboard
    * If issues persist, temporarily switch back to gray cloud and contact [support@hadoseo.com](mailto:support@hadoseo.com)
  </Accordion>
</AccordionGroup>

## Reverting to DNS Only

If you need to disable Cloudflare proxy:

1. Go to Cloudflare **DNS** → **Records**
2. Click the orange cloud icon to toggle it back to gray
3. Save each record
4. Changes take effect within a few minutes

<CardGroup cols={2}>
  <Card title="Cloudflare Pages Integration" icon="cloud" href="/integrations/cloudflare-pages">
    Set up Hado SEO with Cloudflare Pages
  </Card>

  <Card title="DNS Setup Guide" icon="globe" href="/guides/dns-setup">
    DNS configuration for all providers
  </Card>
</CardGroup>
