Bubblegum Middleware: Optimizing Your Site for AI Search

The way people search online is changing—fast.

In the past, discovery meant typing into Google, clicking through websites, and browsing traditional search results. But today, more shoppers are turning to LLM-powered tools like ChatGPT, Perplexity and Claude to find products, compare options, and get instant recommendations—without ever clicking a search result.

In 2024, LLMs made up roughly 4% of total search traffic.

But by 2027, they’re projected to power 50% or more of online discovery.

This shift is already impacting how people discover brands, especially in eCommerce. Unlike human visitors, AI tools don’t scroll through your homepage or browse collections. They scan your site for clean, structured information that answers questions directly.

That’s where Bubblegum comes in.

Bubblegum translates your entire website into the language of AI—turning product and collection pages into clean, structured Markdown content that’s easy for large language models to understand, parse, and recommend.

But translation alone isn’t enough. Bubblegum also acts as an intelligent traffic router—detecting AI crawlers in real time and sending them directly to that optimized content, while keeping the human shopper experience completely unchanged.


How It Works — In Plain Terms

1

Invisible Assistant at the Gate

A small helper sits invisibly at the entry point of your site to determine if the visitor is an AI tool or a regular shopper.

2

AI Sees a Smarter Version

If the visitor is AI, it’s shown a simplified, structured version of your page (like a product summary). It’s easier for AI to use.

3

Other Visitors See the Same Great Site

All human visitors and search engines get the usual version—no disruption, no changes to their experience.


Setup Overview

Getting started is simple — and your Web or IT team can take care of the technical pieces using a step-by-step guide we provide.

Here’s what the process looks like:

1

Setup Cloudflare

We set up a connection through Cloudflare so that AI tools can be detected when they visit your site. This does not require taking your site offline or rebuilding anything.

2

Activate the Middleware

We use a lightweight helper tool that quietly shows AI a simplified version of your pages (like a clean product overview), while human visitors continue seeing your normal site.

3

Verify Everything’s Working

We’ll help test to make sure AI traffic is being routed properly.

Bottom Line:

  • No changes to your product pages or checkout flow.

  • No extra strain on your site speed.

  • Completely behind-the-scenes, for both shoppers and your team.


Why We Use Cloudflare

Cloudflare is a trusted global platform that helps websites run faster and stay secure. If you’re on Shopify, you’re already using Cloudflare — it’s the system Shopify uses to protect your storefront from threats and keep it loading quickly.

So where does Bubblegum fit in?

Bubblegum doesn’t replace or interfere with anything Cloudflare is already doing. Instead, we add an extra layer on top of it — specifically for AI traffic.

Think of it like this:

  • Cloudflare is already checking: “Is this visitor safe?”

  • Bubblegum adds: “Is this visitor an AI bot, and should we show it something different?”

This integration happens invisibly and securely, without needing changes to your Shopify setup. It builds on the tools you already trust — no need to switch platforms or manage extra complexity.

If you don’t yet use Cloudflare, you’ll need to set up an account in order to install Bubblegum. Your DNS settings will be managed through Cloudflare going forward, instead of your original domain provider—so be sure to save your login information.


Why Does Bubblegum Require Cloudflare?

Some people ask: “Can’t we just keep our current DNS provider?”

Here’s why Cloudflare is a must-have for Bubblegum:

1. Your domain registrar is just an address book

Platforms like GoDaddy, Namecheap, or Google Domains sell and renew domain names—that’s it.

They don’t handle traffic, visitor types, or routing decisions. Think of them like the Yellow Pages—they list your address, but don’t manage who shows up or what happens next.

2. Cloudflare is a traffic controller, not just a registrar

Cloudflare sits in front of your site and looks at every incoming request. Before a visitor reaches Shopify or Webflow, Cloudflare:

  • Detects whether the visitor is an AI bot or a real human

  • Routes each type of visitor to the right destination

  • Does all of this instantly, without interrupting anything for the shopper

3. Routing is the real unlock—especially for AI

Even if you’ve created a perfect, AI-readable version of your product page in Markdown, it won’t matter if AI tools can’t find it.

Without proper traffic routing:

  • AI bots may never discover the content you worked hard to create

  • The wrong version of your site gets crawled (often bloated HTML or JS)

  • Your visibility in AI search tools suffers—even if your content is technically optimized

Bubblegum’s traffic routing ensures that AI bots are actually shown your AI-friendly pages.

It’s the difference between hoping your content gets seen… and guaranteeing it.


Frequently Asked Questions:

Q: Why do I need to move my nameservers over to Cloudflare?

To use Bubblegum’s AI-routing, your site’s traffic needs to go through Cloudflare. This one-time DNS change allows us to add a lightweight proxy layer that routes AI bots to optimized content—without disrupting the experience for human shoppers.

We chose Cloudflare because it’s trusted by millions of websites, including Fortune 500 companies, major eCommerce platforms, and even Shopify itself for security checks. Cloudflare is known for its speed, security, and reliability, making it the gold standard for DNS and traffic management on the modern web.

By building on top of Cloudflare, Bubblegum brings you cutting-edge AI traffic optimization—without compromising performance or adding complexity to your setup.

What your shoppers will notice: Nothing. Your website will look and function exactly the same—just faster, safer, and smarter behind the scenes.

Q: Does Bubblegum require all DNS settings to move to Cloudflare?

Yes — to use Bubblegum middleware, your domain’s DNS will be managed through Cloudflare. But don’t worry — Cloudflare automatically imports all your existing DNS settings, so you don’t have to manually move anything over.

Once this is done, you’ll manage any future DNS updates (like email settings or subdomains) inside your Cloudflare dashboard instead of your previous domain registrar.

✅ Nothing changes for your visitors or your site — this just shifts where your DNS is managed.

Q: How will this middleware affect my site’s performance and page load times?

A: It won’t. Cloudflare Workers are designed for speed and ultra-low latency. Bubblegum adds negligible overhead — our median (P50) processing time is just 2 milliseconds.

Because detection and routing happen at the edge (before your page loads), your site will remain fast and responsive for both human visitors and AI bots.

Q: Where are the AI pages hosted? Do they use my site’s URL?

A: Yes — the AI pages use your same site URL, so they appear just like any other page on your domain (e.g. yourbrand.com/products/product-name).

These pages are hosted by Bubblegum on AWS and delivered through CloudFront, a global edge network that ensures fast, reliable performance for AI bots crawling your site.

Importantly, these AI pages do not affect your customer-facing site. They run quietly in the background and are only visible to approved AI crawlers (like ChatGPT or Perplexity). Human shoppers will continue to see your regular product pages with no changes to their experience.

Q: Will this interfere with Google, Bing, or other SEO crawlers indexing my products?

A: No. The middleware is designed to avoid interfering with SEO-critical bots like Googlebot or Bing unless they explicitly present as AI/LLM bots. Standard SEO crawlers will continue indexing your site as usual.

Q: When you say "AI Visitor" vs. "Human Visitor", what exactly do you mean?

A: Great question! “AI visitors” are bots — like those used by ChatGPT or Perplexity to crawl and understand your site. “Human visitors” are real people browsing the site in their browser. The middleware knows the difference and shows the right content to each.

Q: Can I see which AI bots are visiting my storefront and what pages they access?

A: Yes. All bot hits and route matches are logged by Bubblegum. You can use this data to analyze AI bot traffic patterns, page-level access, and even export this for analytics dashboards.

Q: Will Bubblegum middleware improve how well our pages show up in AI platforms?

A: Yes — we’ve run tests where we asked tools like ChatGPT to describe a brand’s product page before and after the middleware was in place. When the AI could access the markdown version, it gave clearer, more accurate responses and recommended those products more often.

Q: Is switching DNS risky? Is it reversible?

Switching to Cloudflare is very safe and widely used by thousands of businesses — including many on Shopify. There’s no downtime involved, since Cloudflare copies over your existing DNS settings automatically.

If you ever want to switch back, you can simply point your nameservers back to your old provider.

🔁 Just remember: If you’ve made any new DNS changes in Cloudflare, they won’t carry over unless you re-add them manually — so be sure to keep a backup of any updates you make.

Q: Do I need to know anything technical to complete this step?

Not at all. Most users can follow our step-by-step setup guide or schedule a quick call with us.

If you’re working with an agency or IT manager, we’re also happy to coordinate directly with them.


Last updated

Was this helpful?