Current Page

How to Enable Cloudflare for Your Shopify Store

How to Enable Cloudflare for Your Shopify Store

How to Enable Cloudflare for Your Shopify Store

How to Enable Cloudflare for Your Shopify Store

How to Enable Cloudflare for Your Shopify Store

Jan 23, 2026

If you're running a Shopify store, you might think your customization and optimization options are limited. But there's a powerful setup that many Shopify merchants overlook: proxying your store through your own Cloudflare account. This configuration, known as Orange-to-Orange (O2O), lets you leverage Cloudflare's full suite of performance and security features while keeping your Shopify store running smoothly.

With your own Cloudflare zone, you gain access to powerful security features:

  • DDoS Protection: Shield your store from distributed denial-of-service attacks

  • Web Application Firewall (WAF): Block malicious traffic and suspicious requests before they reach your store

  • Bot Management: Reduce fake traffic and protect against credential stuffing and inventory hoarding

  • Rate Limiting: Prevent abuse by controlling request frequency from specific sources

  • Real-time analytics: Understand visitor patterns and geographic distribution

  • Security analytics: Monitor blocked threats and suspicious activity

  • Performance metrics: Track load times and identify optimization opportunities

In this guide, we'll walk you through the setup process, explain the benefits, and show you how this configuration opens the door to advanced optimization tools like Optux AI.

Prerequisites

Before you begin, make sure you have:

  • A Shopify store with a custom domain

  • A Cloudflare account (free plan works fine)

  • Access to your domain's NS settings

Step 1: Add Your Domain to Cloudflare

If your domain isn't already on Cloudflare:

  1. Log in to your Cloudflare dashboard

  2. Click Add a Site

  3. Enter your domain name

  4. Select a plan (Free works for O2O)

  5. Update your domain's nameservers to the ones Cloudflare provides

  6. Wait for DNS propagation (usually a few minutes to a few hours)

Step 2: Connect Your Domain to Shopify

In your Shopify Admin:

  1. Go to SettingsDomains

  2. Click Connect existing domain

  3. Enter your custom domain

  4. Follow Shopify's verification steps

Step 3: Configure DNS Records in Cloudflare

This is the key step that enables O2O. In your Cloudflare dashboard:

  1. Navigate to DNSRecords

  2. Delete any existing A records or CNAME records for your root domain and www subdomain

  3. Create new CNAME records with the following settings:

    Type

    Name

    Target

    Proxy Status

    CNAME

    @

    shops.myshopify.com

    Proxied (orange cloud)

    CNAME

    www

    shops.myshopify.com

    Proxied (orange cloud)

Step 4: Verify the Configuration

Once you save your DNS records, you should see a Shopify icon appear next to the CNAME record values in your Cloudflare dashboard. This confirms that O2O is properly configured.

Important Considerations

Use CNAME Records, Not A Records

O2O only works with CNAME records pointing to shops.myshopify.com. If you use A records with Shopify's IP address, you won't get the O2O benefits.

Checkout Path Protection

Cloudflare automatically protects the /checkout path on Shopify stores. Certain Cloudflare features are disabled on checkout pages to ensure a smooth and secure purchasing experience for your customers.

SSL Configuration

With O2O enabled, Cloudflare handles SSL between visitors and the edge, while Shopify manages SSL for the connection to their servers. Make sure your Cloudflare SSL/TLS setting is set to Full or Full (Strict) to avoid redirect loops.

CAA Records

If you have CAA (Certificate Authority Authorization) records configured, ensure they allow the certificate authorities that Shopify uses. Refer to Shopify's documentation for the current list of required CAs.

Integrating Optimal UX for Flicker-Free A/B Testing

Once your Shopify store is proxied through Cloudflare, you can take advantage of Optux AI. Unlike traditional A/B testing tools that use JavaScript to modify pages after they load (causing the dreaded "flicker" effect), Optux AI applies changes while the HTML is in transit—before the page reaches your visitor's browser.

Why This Matters for Shopify Stores

Traditional JavaScript-based A/B testing creates several problems:

  • Flicker Effect: Visitors see the original page briefly before variations load

  • Slower Page Speed: Testing scripts add to page weight and execution time

  • Inaccurate Results: Ad blockers and privacy tools can interfere with tracking

  • SEO Impact: Search engines may index the wrong version of your pages

With Optux AI and the Cloudflare O2O setup, these problems disappear. Changes happen at the edge, so:

  • Pages load with the correct variation from the start

  • No additional JavaScript delays

  • Tracking is more accurate and immune to ad blockers

  • Search engines see consistent content

Follow the installation instructions to setup Optux AI for your Shopify store.

Read more:

How to Enable Cloudflare for Your Shopify Store

Unlock faster performance, enhanced security, and seamless A/B testing integration for Shopify stores

Jan 23, 2026

📁 A/B testing

📁 Server-side testing

📁 Installation

📁 Cloudflare

📁 Cloudflare

Autopilot Mode: How Multi-Armed Bandits Maximize Your Conversion Rates

Discover how multi-armed bandit algorithms revolutionize A/B testing by automatically reallocating traffic to winning variants while your test runs

Oct 14, 2025

📁 A/B testing

📁 Split testing

Server-Side vs Frontend-Side A/B Testing: Understanding Your Implementation Options

Compare server-side and client-side A/B testing methods. Explore performance impacts, flickering issues, and how to choose the right implementation.

Oct 14, 2025

📁 A/B testing

📁 Patching

📁 Server-side testing

📁 Client-side testing

📁 Client-side testing

Conversion Tracking: A Complete Guide to Experiment Goals

Conversion tracking forms the backbone of successful A/B testing, and Optux.ai provides a comprehensive goal system that measures what matters most to your business. From simple button clicks and form submissions to complex custom JavaScript events and scheduling integrations with HubSpot and Calendly, the platform offers seven distinct goal types that capture every meaningful user interaction. By automatically tracking these conversions and applying statistical analysis to determine winning variants, Optux.ai transforms raw user behavior data into actionable insights that drive website optimization decisions, all while maintaining flicker-free performance and accurate attribution that's immune to ad blockers and privacy settings.

Aug 31, 2025

📁 A/B testing

📁 Split testing

📁 Targeting