Quick Answer
Move authoritative DNS to Cloudflare first, preserving email and unrelated services while keeping every Shopify-pointing record DNS-only. Verify the store and certificates before considering O2O. Cloudflare documents an optional Shopify O2O configuration, but Shopify’s own guidance says proxy/O2O setups are unsupported. Choose that optional path only with an informed support decision, a named troubleshooting owner and a tested DNS-only rollback.
Cloudflare can manage a Shopify domain’s DNS without sitting in front of its storefront traffic. Changing nameservers, enabling a storefront proxy and adding security rules are three separate changes.
1. Understand the two providers’ positions
Shopify’s Cloudflare connection guide directs records pointing to Shopify to DNS only. Its domain troubleshooting guidance explicitly includes O2O among unsupported proxy configurations.
Cloudflare’s Shopify provider guide documents O2O on any Cloudflare zone plan. It describes routing through your Cloudflare zone before Shopify’s zone and directs customer-zone troubleshooting to Cloudflare.
These positions should remain visible in the decision. A configuration documented by Cloudflare is not a promise of Shopify Support coverage. Shopify’s developer guidance also recommends avoiding request proxies, citing extra network work and potential stale-content problems. Do not assume that another proxy automatically improves storefront performance.
Choose DNS-only when you need the standard Shopify-supported connection. If there is a specific reason to evaluate O2O, document that reason, who will maintain it, how failures will be investigated and how the baseline will be restored.
2. Preserve the existing domain and service inventory
Confirm the registrar, current authoritative nameservers, exact Cloudflare account, connected Shopify domains and mail provider. Export the active DNS zone and save the current storefront records, nameservers, DNSSEC state, redirects and Cloudflare settings before making changes.
Include email MX records, their targets, SPF/DKIM/DMARC, verification records, CAA, service subdomains and intentional delegated zones. Cloudflare’s automatic record scan can miss custom names, so compare it with the full active inventory.
Keep mail and other non-web service hostnames DNS-only. Moving the storefront’s DNS authority should not change where mail is delivered. Do not enable Cloudflare Email Routing as a substitute for an existing mailbox provider.
For a separate cPanel-hosted website, our cPanel DNS migration guide covers its hosting records, local mail-routing checks and service validation.
Save a working recovery record for each storefront hostname: record type, name, destination, proxy status and related rules. Keep the previous DNS service available during the cache transition.
3. Migrate authoritative DNS with a DNS-only baseline
Add the apex domain to Cloudflare and reconcile the required records. Use the values shown for the intended store in Shopify and current official help. The standard example below reflects Shopify’s published connection values:
Storefront record
- Apex A, name @
-
Supported DNS-only baseline:
23.227.38.65, DNS only. Preserve a legitimate regional address assigned by Shopify rather than replacing a healthy store-specific value blindly. - Apex AAAA, name @
-
Supported DNS-only baseline:
2620:0127:f00f:5::, DNS only, subject to the store’s current official instructions. - www CNAME
-
Supported DNS-only baseline:
shops.myshopify.com, DNS only.
Resolve conflicting records only for the exact storefront name being configured. Preserve unrelated subdomains, email and verification data. Shopify’s Cloudflare guide explains that Cloudflare handles the CNAME target as a fully qualified name, so a trailing period is not required in that interface.
Remove a wildcard record that points to Shopify, preserving unrelated service records. Review CAA authorization too. If CAA records are present, Shopify’s help specifies certificate issuance by Let’s Encrypt, Google and SSL.com. Do not delete an organization’s entire CAA policy without reviewing the services it covers.
Handle any old DNSSEC delegation before changing nameservers. Follow the current provider and registrar’s process, verify removal of the old DS at the parent authority and allow the cached DS lifetime to expire. A registrar screen alone is not parent-zone evidence. Cloudflare’s DNSSEC documentation describes the old-delegation and new-delegation distinction.
Change registrar delegation to the exact Cloudflare-assigned nameservers using its primary-zone setup procedure. Check activation and public authority independently. Cloudflare nameservers prove DNS authority; they do not, by themselves, prove that storefront traffic is proxied.
In Shopify, confirm the existing domain connection and complete an ownership-verification TXT record only if the admin requests it. Use the exact account-provided value. Wait for the relevant DNS and certificate states to settle, then verify the storefront, domain redirects and independent email delivery. A healthy DNS-only migration is a valid stopping point.
4. Prepare settings before enabling O2O
Complete this review before saving any proxied storefront record. Once that record is enabled, existing redirects, cache settings and edge code can affect customer traffic immediately.
- HTTPS and certificate validation
-
Keep Always Use HTTPS off for Shopify O2O. Cloudflare warns that it interferes with HTTP certificate validation. If a separate redirect is needed, preserve an exception for
/.well-known/acme-challenge/*and validate the actual redirect behavior. Do not assume that disabling this one switch makes every existing redirect safe. - Origin encryption
-
Keep end-to-end HTTPS and avoid Flexible. Full (strict) additionally validates the origin certificate’s trust, hostname and validity. Choose the mode against the provider’s current routing requirements and a valid origin certificate; Full and Full (strict) are not identical validation settings.
- Caching
-
Do not add broad Cache Everything behavior. Keep personalized cart, checkout, account and app-proxy HTML out of shared caching, and preserve certificate-validation requests. Cloudflare’s O2O compatibility guidance generally discourages customer-zone HTML caching because it can conflict with the SaaS provider’s cache.
- Scripts, redirects and edge code
-
Keep Rocket Loader off; Cloudflare lists it as incompatible with O2O. Keep untested HTML or script rewrites off at the baseline. Review existing Workers, Snippets, redirects, WAF and bot settings. Cloudflare documents Workers and Snippets as disabled on
/checkoutfor Shopify; that limited behavior does not establish compatibility for every other app route.
Retain a before-and-after settings record. An older Cloudflare zone may already contain rules created for a different site. Do not assume that an empty-looking storefront record means there is no inherited behavior.
5. If justified, enable O2O on one exact hostname
Proceed only after the baseline works, the support decision is recorded and the settings review above is complete. Identify the connected storefront hostname you will change, such as www.example.com, and save its working DNS-only configuration.
Cloudflare’s provider guide specifies a proxied CNAME targeting shops.myshopify.com to enable its Shopify O2O routing. It describes a Shopify icon beside the recognized record. Apply the documented configuration to one intended hostname, then validate it before considering another.
An apex CNAME uses Cloudflare CNAME flattening. When changing an apex from the DNS-only A/AAAA baseline, remove only the conflicting storefront address records for that exact name. Keep its MX, TXT and other valid records. Do not create a second competing routing configuration or replace mail records with storefront settings.
Verify Cloudflare’s provider recognition, traffic evidence in your own zone, Shopify’s domain status and HTTPS for every changed hostname. A generic server: cloudflare response header is insufficient: Shopify already uses Cloudflare. An orange cloud or a successful homepage load alone does not test the full store.
If recognition, certificates or routing differ from the intended result, stop and investigate through the designated support route. Do not add security or cache rules to an unverified proxy setup.
6. Test customer tasks and installed integrations
Run the same checks before and after the optional proxy change, using authorized test accounts and data. Include desktop, phone and private sessions.
| Customer or system path | Validation |
|---|---|
| Domains and redirects | Primary and alias hostnames, HTTP/HTTPS behavior, certificates and Shopify domain status. |
| Browse and search | Product, collection, search, filters and important content or language routes used by the store. |
| Cart | Add, update and remove items; confirm the expected state in the same session and isolation from another session. |
| Checkout entry | Reach the expected checkout without loops, challenges or broken assets. Do not place a paid live order as routine connectivity QA. |
| Customer accounts | The actual sign-in, account and recovery routes supported by the store. |
| Installed integrations | Relevant app-proxy routes, subscriptions, reviews, tracking and other implemented features, using their supported test methods. |
Check received form messages and account notifications where relevant. Review browser failures and the corresponding Cloudflare events together. A form confirmation or a successful API response does not automatically establish a completed downstream business action.
Record any exclusions from the test. For example, a checkout-entry check does not verify payment authorization, tax calculations or every fulfillment integration. Use a separate authorized test plan when those tasks need coverage.
7. Observe normal behavior before adding enforcement
Allow the owner to review ordinary customer and integration traffic before proposing additional security rules. Define the actual problem, affected paths, methods, expected automation and the evidence needed to judge a change. Use available observation tools and plan-appropriate controls before enforcing a rule.
Do not copy another store’s thresholds, broad geographic restrictions or exceptions. A rule that appears to reduce unwanted requests can also interrupt a payment callback, app request or legitimate customer. Review the relevant event evidence and repeat the affected workflow after each scoped change.
Free Bot Fight Mode cannot be skipped by a custom WAF Skip rule. It is not a universal O2O prerequisite. Confirm the product’s exception model before enabling a control that an integration may need to bypass.
AI search, user-directed agents and model-training crawlers also need separate owner decisions. They are not one mandatory setup switch. Where public crawler access is intended, use verified identity signals and a carefully scoped policy rather than trusting a user-agent string. Do not extend a public-content exception across account, cart or checkout paths, or promise that allowing a crawler will produce AI citations.
8. Roll back the affected layer
For an O2O-related failure, restore the saved DNS-only storefront configuration. If an apex proxied CNAME replaced A/AAAA records, remove that conflicting CNAME and reinstate the exact saved baseline records. Disable only the new rules associated with the change and recheck Shopify domain status, HTTPS and customer tasks.
Cloudflare can remain authoritative when its DNS service is healthy. You do not need to move nameservers away merely to remove an optional storefront proxy. Resolver caches and certificate state can still delay a complete recovery.
Use nameserver rollback for a delegation problem only after confirming that the old zone remains complete and active. Coordinate the parent DS with the DNS provider that will answer. Reverting nameservers is another DNS transition, not an immediate undo button.
For implementation help, our Shopify development service provides relevant scope. A website audit can define the checks needed before a change. Keep mail authentication in the same inventory using the SPF, DKIM and DMARC guide. If a preserved sending service still has delivery problems, follow the email troubleshooting guide before changing unrelated storefront records.
Key Takeaways
- DNS-only Cloudflare records provide the standard Shopify-supported path.
- Optional O2O has a separate Cloudflare-documented setup and Shopify support limitation.
- Stage DNS authority, proxying and later enforcement as separate changes.
- Protect certificate validation and keep personalized commerce HTML out of shared caching.
- Save the exact baseline and test customer tasks before and after each change.
Frequently Asked Questions
Do I need O2O to use Cloudflare DNS with Shopify?
No. Cloudflare can host authoritative DNS while every Shopify-pointing record remains DNS-only. Shopify documents that standard connection.
Does Shopify support a Cloudflare O2O setup?
Shopify’s current help says proxy configurations, including O2O, are unsupported. Cloudflare separately documents O2O and its support route. Make that distinction part of the decision.
Does a Cloudflare response header prove my zone is proxying the store?
No. Shopify uses Cloudflare too. Combine the intended DNS configuration, provider recognition and traffic evidence from your own zone with actual storefront checks.
Do I have to change nameservers again to turn O2O off?
Usually the affected change is the storefront records and related rules. Restore the saved DNS-only baseline while retaining healthy authoritative DNS. Treat a delegation-level rollback separately.

