Hybrid Workspace

Security

How to declare storefront network access for a Shopify app

From December 8, 2026 Shopify rejects deploys without a [network_access] section. Who must declare, how to find every host, the rules, and how to test it.

· 9 min read

Shopify now asks every app that runs code on the online store to say, in advance, which outside servers that code talks to. The list lives in your app's shopify.app.toml, under a new [network_access] section. Shopify turns the lists of every app on a store into one Content Security Policy for the storefront.

It sounds like a one-line change, and for some apps it is. For an app with a theme app extension, a few third-party scripts and an app proxy, finding every host takes an afternoon. This guide walks through the whole job: whether your app is affected, how to find every server, the rules Shopify enforces, how to test, and how to ship it without releasing something you didn't mean to.

What changed, and when

Apps declare two lists in shopify.app.toml:

  • allowed_sources: the HTTPS origins your storefront code loads scripts, styles, images or fonts from, or sends requests to.
  • allowed_navigation_hosts (optional): the hosts your storefront code links shoppers to. Links to these hosts skip Shopify's "you are leaving the store" prompt.
Three apps' allowed_sources lists merged by Shopify into one storefront policy, with one undeclared host flagged
Every app's list on a store becomes one policy for that storefront

The dates, from Shopify's changelog:

Updated December 1, 2026: Shopify moved the first deadline from December 1 to December 8, 2026 (its changelog post on network access says so). The January 1, 2027 delisting date did not move.

DatePublic appsCustom apps installed outside your organization
December 8, 2026Deploys and App Store submissions are rejected without the section. Merchants see a warning in the admin. Versions already released keep working.Deploys are rejected.
January 1, 2027Apps without it are delisted from the App Store and blocked from new installs. Existing installs keep working.Installs on stores outside your organization are blocked until every app in scope declares.

So the section has to be in a released version before January 1, 2027, not only in a deployed one.

It is one of three security deadlines Shopify set around the same time. The other two are moving to expiring offline access tokens and the Admin API IP allowlist. Every date and requirement is on one page: Shopify app security deadlines 2026–2027.

Is your app affected?

The declaration is required for public apps, and for custom apps installed on stores outside your organization, when the app uses any of these:

  1. A theme app extension (an app block or an app embed).
  2. Script tags on the online store.
  3. An app proxy.
  4. The write_themes access scope.
  5. A web pixel with the write_open_pixels access scope.

You don't need it when the app only writes content such as products, metafields or menus, or when it only has a checkout UI extension. Custom apps installed only inside your own organization, and apps created in the Dev Dashboard or the Shopify admin, are not in scope either.

If your app is affected but its storefront code talks to no outside server, declare an empty list. An empty list counts as a declaration:

[network_access]
allowed_sources = []

A quick way to see where you stand, from the app's repository:

find . -name "shopify.app*.toml" -not -path "*/node_modules/*"
grep -l 'type = "theme"' extensions/*/shopify.extension.toml
grep -n "app_proxy\|write_themes\|write_open_pixels" shopify.app*.toml

There can be more than one shopify.app.*.toml, for example a staging configuration. Every configuration you deploy needs the section.

Find every outside server your storefront code uses

Only code that runs on the shop's storefront counts: the theme extension's assets/, blocks/ and snippets/, script tag files, and pages served through your app proxy. Your app home and other admin pages don't count, so leave their servers out.

Start with the literal URLs

grep -rhoE "https?://[a-zA-Z0-9._*{}-]+(:[0-9]+)?" extensions/<your-theme-extension> | sort | uniq -c | sort -rn

Then read each hit in context and note what it is for: a script, a stylesheet, an image, a font, a fetch call, an iframe, or a link. Scripts, styles, images, fonts and requests go in allowed_sources. Links go in allowed_navigation_hosts.

Then the hosts that aren't written out

The grep finds what is spelled out in your code. These are not, and they are the ones that get missed:

  • Template URLs. A map library that loads tiles from https://{s}.tile.example.org/... needs a wildcard entry such as https://*.tile.example.org.
  • Servers a third-party script calls in turn. An advertising pixel loads from one host and sends its events to another. Meta's pixel loads from connect.facebook.net and reports to www.facebook.com; Google's tags load from www.googletagmanager.com and send to Google Analytics hosts. List both sides.
  • URLs your backend hands to the storefront. An image address stored in the app's settings, or a payment page address returned by your API, is not in the extension's code at all. Look at what your API sends back to the storefront.
  • Fonts. Google Fonts needs both https://fonts.googleapis.com and https://fonts.gstatic.com.

And what to leave out

  • Your app proxy URL. Proxy pages (/apps/...) are served from the shop's own domain.
  • Files Shopify serves for you, such as your theme extension's assets/ folder.
  • Shopify domains, such as *.myshopify.com and cdn.shopify.com. They are not allowed in the list.
  • Same-origin paths such as /cart.js, and data: URIs.

Write the section

Add it to shopify.app.toml. Keep a comment per group of hosts saying which feature needs it, because the next person who adds a script must know this list exists.

# Every outside server the storefront code loads from or sends requests to.
# Adding a new host to storefront code? Add it here too.
[network_access]
allowed_sources = [
  # The app's own API, called by the app embed
  "https://api.example-app.com",
  # Images served from the app's CDN
  "https://*.cdn.example-app.com",
  # Google Fonts
  "https://fonts.googleapis.com", "https://fonts.gstatic.com",
]
# Optional: hosts that storefront links send shoppers to
allowed_navigation_hosts = ["help.example-app.com"]

The rules Shopify checks

Shopify checks both lists when it creates a version, and rejects the deploy when an entry breaks a rule. From the app configuration reference:

allowed_sourcesallowed_navigation_hosts
FormatLowercase HTTPS origin, no path, no trailing slash: https://api.example.comLowercase host name, no scheme, port or path: help.example.com
PortsAllowed, but not the default 443Not allowed
WildcardsA leading *. covers subdomains only. https://*.cdn.example.com does not cover https://cdn.example.com; list both if you use bothNot allowed. A host does not cover its subdomains
Maximum30 entries30 entries
Never allowedIP addresses, localhost, Shopify domains, shared domains such as https://s3.amazonaws.com or https://*.amazonaws.com (use your own host, such as https://my-bucket.s3.amazonaws.com)IP addresses, localhost, a public suffix alone such as github.io, Shopify domains, hosts where anyone can publish content or create redirects

Shopify also says it blocks any host it identifies as malicious, even when an app lists it.

Checkout UI extensions are separate

A checkout UI extension that calls fetch() also needs the network_access capability in its own shopify.extension.toml. That capability is not the same thing as the app's [network_access] section. Shopify's example: a checkout UI extension that only fetches from your API still means that origin goes in the app's allowed_sources too.

Test it on a development store

Shopify offers a Network access testing feature preview for development stores. It only warns; it does not block anything.

  1. Create a development store with the Network access testing preview selected. Install no other apps: Shopify combines the allowed_sources of every app on a store into one policy, so another app's entry can hide a gap in yours.
  2. From your app's directory, run shopify app dev --store <your-dev-store>.myshopify.com and keep it running. An invalid entry makes the command fail and shows the error.
  3. Add your app blocks to the theme and turn on your app embed.
  4. Open the store at its real myshopify.com address, not the theme editor preview or 127.0.0.1, which get no policy. The page response should carry a Content-Security-Policy-Report-Only header.
  5. Use every storefront feature once, with the browser console open. Every warning that names an outside server is a missing allowed_sources entry. Every link that shows the exit prompt is a missing allowed_navigation_hosts entry.

Shopify notes the preview is still under development and its behavior might change. Requests from checkout UI extensions don't show warnings in this preview.

Ship it without shipping something else

shopify app deploy ships everything in your working tree: every extension and the whole configuration file. If the repository holds changes that were never released, they go out with your declaration. Check before you deploy:

shopify app versions list --json | head -20   # which version is active
git status
git log -5 -- extensions shopify.app.toml     # anything changed since that version?

If there is unreleased work in the tree, deploy from a clean checkout of what is live instead.

Then create the version without releasing it, so a rule break fails here and no store is touched:

shopify app deploy --no-release --message "Declare storefront network access"

Once that version looks right, release it:

shopify app release --version=<version-from-the-deploy>
shopify app versions list --json | head -8   # the new version should be active

Releasing reaches every store that has your app, so do it on purpose, not as a side effect.

Keep it up to date

From now on, any new outside script, request, image or font in storefront code needs a line in [network_access]. Make it part of your review checklist. Today a missing entry shows up as a warning in the testing preview. If Shopify starts enforcing the policy, whatever is missing from the list stops working on the storefront.

A use case: what we found in our own app

We did this for one of our own apps, a cash on delivery checkout form that runs as a theme app embed with an app proxy. It was affected through three of the five triggers at once: the theme app extension, the app proxy and the write_themes scope.

  • 24 sources in the end. Our API; a store-pickup map (a map library from a public CDN, map tiles and an address search service); a placeholder image on a shared image host; Google Fonts; a payment widget; and six advertising pixels that merchants can switch on.
  • The pixels were most of the work. Each pixel loads its script from one host and sends events to one or more others, so the six pixels alone took sixteen entries.
  • No navigation hosts. The form has no outside links. Payment pages are reached by a redirect from script, not a link, so allowed_navigation_hosts stayed out.
  • Deployed with --no-release first, checked that the section was in the new version, then released.

The shared image host and the public CDN are now on our list to move into the extension's own assets/, so the list gets shorter rather than longer.

If you run several apps, it helps to see their versions and installs side by side while you roll this out. Hybrid Workspace shows every Shopify app you ship on one screen, and its Shopify app metrics guide explains what each number means.

Sources

  • shopify apps
  • network access
  • allowed_sources
  • content security policy
  • theme app extensions