Guide · Specialty food & beverage

How to add gluten-free and allergen filters to a specialty food store website

To let shoppers filter by gluten-free, vegan, or "contains tree nuts," each product needs those facts stored in their own fields, not buried in the description. Set up a diet field and a separate allergen field, each with a fixed list of values. Fill them from the product label. Then turn those fields into filters. On Shopify, that means metafield definitions plus filters in the Search & Discovery app. The filter is the easy part. The data is the work.

Why the filter isn't the hard part

Most platforms can show a filter once the data exists. Shopify's Search & Discovery app builds custom filters from product options, metafields, and metaobjects, including text lists and true or false fields. But a filter only shows what's in those fields. If half your products have no allergen data, the filter quietly hides half your catalog.

Tags are where most stores start, and they get messy fast. "GF," "gluten free," and "Gluten-Free" turn into three different filter values. Shopify's own guidance suggests using a metafield instead of the tag filter when tags already do other jobs in your store, like collection rules.

Step 1: Separate diet claims from allergens

These answer two different questions.

Keep them in two fields. Mixing "nut-free" and "contains tree nuts" in one list confuses shoppers and breaks the filter logic.

For allergens, use the FDA's list as your fixed values. Under the FASTER Act, the nine major food allergens are milk, eggs, fish, crustacean shellfish, tree nuts, peanuts, wheat, soybeans, and sesame. Sesame became the ninth on January 1, 2023.

Step 2: Only claim what the label claims

"Gluten-free" isn't a marketing word. The FDA issued a final rule defining it for food labeling in 2013. The safe rule for a store: tag a product gluten-free only when the manufacturer's label says so. Don't infer it from the ingredient list. For allergens, copy the Contains statement from the package.

Labels also change. The FDA notes that some manufacturers changed recipes after the FASTER Act and now include small amounts of sesame where they didn't before. A label you entered two years ago may be out of date, so recheck allergen fields when a supplier sends new packaging or a new item code.

Step 3: Fix the values before you build the filter

Pick one spelling for every value and write the list down. "Gluten-Free," not "GF" or "gluten free." Shopify's filter app can group several values under one label, which helps with old data. Clean values at the source are still easier to keep right.

Two Shopify limits are worth knowing. A filter shows at most 100 values on your store, and collections with more than 5,000 products don't display filters at all. Diet fields rarely hit the first limit, but a big "All products" collection can hit the second.

Step 4: Fill the fields from supplier data

Your distributors' and makers' spec sheets usually carry ingredients and allergen statements. Pull them into one spreadsheet with your SKUs, map each product to your fixed values, and import. Have someone check every allergen row against the actual label before it goes live. This is the slow part, and it's worth doing once, properly.

Step 5: Turn the filters on and show the facts on the product page

In Shopify, the order is:

  1. Create metafield definitions for Diet and Contains under Settings > Metafields and metaobjects, using a list type so one product can hold several values.
  2. Fill them, by import or with the bulk editor.
  3. Go to Apps > Search & Discovery > Filters > Add filter, and choose each metafield as the source.
  4. Confirm your theme supports filtering under Content > Menus.

Then show the same fields on the product page near the price, so a shopper doesn't have to zoom into a photo of the label.

Worked example

This is an illustrative example with made-up numbers, not a client story.

A shop with 600 products wants a gluten-free filter. Today "gluten free" appears in 140 product descriptions and as a tag on 90 products, spelled four different ways.

  1. Export every product with SKU, title, tags, and description.
  2. Add two columns, Diet and Contains, each with a fixed list of values.
  3. Check the label or supplier sheet for each of the 140 candidates. In this example, 110 carry a gluten-free claim on the label. The other 30 only mention it in passing, like "serve with gluten-free crackers." Only the 110 get the value.
  4. Fill Contains from each product's Contains statement.
  5. Import, build both filters, and test two real searches: Gluten-Free on the pasta collection, and tree nuts filtered out of the gift collection.

The shopper now sees 110 products that actually claim gluten-free, not 140 that happen to use the word.

Why it pays off past one filter

The same fields do more than one job. They feed gift filters, the product page, Google, and AI shopping tools that read product data to answer questions like "gluten-free gift under fifty dollars." Fix the data once and every one of those gets better. More on that in product data cleanup and enrichment.

A chatbot reads the same fields as your filters

If you add an AI chat assistant to your website, it leans on the same data. When a shopper asks "Is this nut-free?", the chatbot can only answer from the diet and allergen fields you just set up. If tree nuts are missing from a product's Contains field, that product shows up when a shopper filters tree nuts out, and the chatbot tells the shopper it's fine. One gap in the data, two wrong answers.

Set one safety rule before launch. The chatbot only states what the labelled fields say, and never guesses from ingredients or descriptions. For allergy-critical questions, like cross-contact or a severe allergy, it points the shopper to the product label or to your store team. More on why in why your AI chatbot gives wrong answers.

Hauslight, the AgentHaus website assistant, answers typed and voice questions from your pages, policies, and business information. When it's connected to the relevant systems, it can use current catalog and inventory information. The diet and allergen fields in this guide are the information it needs.

When to get help

If your catalog is large, your supplier sheets are inconsistent, or you'd rather not spend a month on a spreadsheet, this is the work we do for specialty food stores. AgentHaus founder Jonathan Gonsenhauser spent 20 years in the restaurant industry. Most AgentHaus projects are delivered remotely.

Get a free store check. We'll run real customer searches on your site, check how your product data reads to Google and AI tools, and tell you the three fixes we'd make first.

Get a free store check

Frequently asked questions

Can I use tags instead of metafields for diet filters?

For a small catalog, tags can work. They pick up every spelling staff type, though, and they often do other jobs like collection rules. A dedicated field with a fixed list of values is easier to keep clean.

Which allergens should my store list?

Start with the nine major food allergens the FDA names: milk, eggs, fish, crustacean shellfish, tree nuts, peanuts, wheat, soybeans, and sesame. Copy them from each product's Contains statement or ingredient list.

Can I label a product gluten-free if the ingredients look gluten-free?

Don't. Use the gluten-free value only when the manufacturer's label makes the claim. Ingredient lists don't tell you about cross-contact in production.

Can an AI chatbot tell shoppers whether a product is nut-free?

Only from allergen fields filled in from the label, and it should say only what those fields say. For allergy-critical questions, it should point the shopper to the product label or to your store team.

Do I need an app for allergen filters on Shopify?

Not necessarily. Shopify's own Search & Discovery app builds filters from metafields. Apps can add badges or nicer displays, but the product data underneath still has to be right.

Growth creates friction. We remove it.