Skip to content

Showing Allergen Information on Shopify Product Pages

How to show the nine major food allergens on Shopify product pages with metafields, keep them matching the label, and let shoppers filter by allergen.

By Koa Sterling. Product specialist at TaroStack and small business owner. Yes, I am a real human, and I actually sit in front of a computer and write these articles. Reviewed October 27, 2026 · 3 min read

The US has nine major food allergens: milk, egg, fish, crustacean shellfish, tree nuts, wheat, peanuts, soybeans and sesame. A packaged food's label must declare each one it contains, either in a "Contains" statement or in parentheses in the ingredient list, naming the specific tree nut, fish or shellfish. Online shoppers can't read the label, so put the same allergen line on each Shopify product page. A product metafield is the tidy way: one field per product, shown by the theme, and usable as a storefront filter.

This is general information, not legal advice.

The short version

  • Nine major allergens: milk, egg, fish, crustacean shellfish, tree nuts, wheat, peanuts, soybeans, sesame.
  • Label: a "Contains" line, or the source in parentheses in the ingredients.
  • Name the specific tree nut (almond, macadamia), fish (tuna) or shellfish (shrimp).
  • On Shopify: a product metafield for allergens, shown on the product page.
  • Keep the page and the label from the same source, so they never disagree.

On the label

Way Example
Contains statement Contains: wheat, milk, egg, macadamia nuts.
In the ingredients Flour (wheat), butter (milk), eggs, macadamia nuts

Allergens in flavorings, colorings and incidental additives count too. Food allergen labeling requirements covers the rules in depth.

On the Shopify product page

  1. Settings > Custom data > Products > Add definition. Name it "Allergens".
  2. Choose a type: a list of single-line text, or a list from fixed choices (the nine allergens), which keeps spelling consistent.
  3. Fill it in on each product.
  4. In the theme editor, add the metafield to the product page, near the ingredients.

With fixed choices, many themes and Shopify's Search & Discovery app can use the metafield as a filter, so a shopper can hide products with peanuts.

A made-up example

Kaimukī Cookie Co. sells 14 cookies. Each recipe lists its allergens; the label's Contains line and the product metafield both come from it. When the chocolate chunk recipe switches to a chip made on shared equipment with peanuts, the owner updates the recipe, reprints labels, and changes the metafield the same day. A "may contain" line is voluntary under federal rules, so the owner decides how to word it on both.

Where the page and the label drift apart

  • A recipe changes; the label is reprinted; the page isn't.
  • A seasonal variant has a different ingredient; the product page shows the main variant's allergens.
  • Allergens are typed into each description by hand, with different spellings.

Shopify product ingredients covers keeping ingredient lists and allergens in one place.

Where this stops working

A metafield shows what you typed. It doesn't know what's in the recipe, so a changed ingredient doesn't change the page. And allergen control in the kitchen (separate storage, cleaning between runs, the order of batches) is a record Shopify doesn't keep. Shopify recipes covers keeping allergens with the recipe.

How TaroStack does it

TaroStack for Shopify runs inside your Shopify admin and keeps allergens with each ingredient and recipe, so a product's allergens follow its recipe version. Batches record which ingredient lots they used, which helps if an allergen problem comes from a supplier. It keeps records; it doesn't write labels or make you compliant. Free for 14 days.

Questions people also ask

Does Shopify have an allergen field?

Not built in. Create a product metafield for allergens and show it with your theme.

Do I have to list allergens on my Shopify page?

The legal requirement is on the label. Showing them online is what shoppers expect, and it should match the label exactly.

Should allergens go in the product title?

No. Keep titles for the product name. Put allergens in a consistent place on every page, near the ingredients, so shoppers learn where to look.

Is sesame a major allergen?

Yes. Sesame is the ninth major food allergen in the US.

Can shoppers filter my Shopify store by allergen?

Yes, if allergens are a metafield with fixed values and your theme or Search & Discovery app uses it as a filter.

Sources

  1. 21 U.S.C. 321(qq): the major food allergens, milk, egg, fish, crustacean shellfish, tree nuts, wheat, peanuts, soybeans and sesame · read October 16, 2026
  2. 21 U.S.C. 343(w): major food allergen labeling, the Contains statement or the source in parentheses, and flavorings and colorings · read October 16, 2026

We use AI to help with the research for these articles. Every one is read, checked against its sources and edited by Koa before it's published. Spot a mistake? Tell us and we'll fix it and say so. How we write these.

Let’s get your stack in order.

TaroStack for Shopify

Free for 14 days.