Shopify Custom Fields and Metafields: A Practical Guide
Metafields turn Shopify product pages from generic templates into rich, structured pages that rank. Here is how to set them up and use them.
Most Shopify stores ship product pages that are basically a photo, a title, a price, and a description blob. That works for a generic product. It does not work for anything with specs, materials, ingredients, dimensions, care instructions, or compatibility info.
Metafields solve this. Used right, they make your product pages rank better, convert better, and stay maintainable as your catalog grows.
What Metafields Actually Are
A metafield is a custom data attribute attached to a product, variant, collection, customer, or order. You define a field once (say, "Material" with a single-line text type), then fill it in on every product. Your theme reads the metafield and displays it wherever you want.
Variants handle differences between SKUs (size, color). Metafields handle structured information that applies across a product (material, dimensions, country of origin, care instructions).
Setting Up Metafields
- In your Shopify admin, go to Settings, then Custom data, then Products.
- Click Add definition.
- Name the field (e.g., "Material"), pick a namespace and key (e.g.,
custom.material), and choose a type (single-line text, multi-line text, number, file, JSON, etc.). - Save. The new field now appears at the bottom of every product page in your admin.
For structured product info, use a Metaobject (Settings, then Custom data, then Metaobjects). Metaobjects let you define a reusable template (say, "Ingredient" with fields for name, percentage, and source) and attach a list of them to each product.
Displaying Metafields in Your Theme
Modern Dawn-based themes let you drag metafield blocks into product templates from the theme editor. Open Customize, click your product template, add a block, and pick the metafield from the dropdown. No code required.
For more control, edit the theme directly. In a product section, reference a metafield like this:
{% if product.metafields.custom.material %}
<p class="product-material">
Material: {{ product.metafields.custom.material }}
</p>
{% endif %}
For a metafield that returns a list:
{% if product.metafields.custom.features %}
<ul class="product-features">
{% for feature in product.metafields.custom.features.value %}
<li>{{ feature }}</li>
{% endfor %}
</ul>
{% endif %}
For a metaobject reference:
{% assign ingredients = product.metafields.custom.ingredients.value %}
{% for ingredient in ingredients %}
<div class="ingredient">
<strong>{{ ingredient.name }}</strong> ({{ ingredient.percentage }}%)
</div>
{% endfor %}
Wrap every metafield reference in an if check so products without the field do not render empty markup.
10 SEO Moves for Product Page Metadata
1. Optimize product titles for search. Lead with the most-searched term. "Organic Cotton Crew Neck T-Shirt" beats "Crew Neck T-Shirt in Organic Cotton" for SEO.
2. Write unique meta descriptions. Every product page needs its own meta description under 158 characters, written for click-through rather than keyword stuffing.
3. Use alt text on every product image. Describe the image in plain language. Alt text helps screen readers and gives Google another signal about what the page is about.
4. Implement product schema markup. Modern Shopify themes ship product schema by default. If yours does not, add Product, Offer, and AggregateRating JSON-LD to your product template.
5. Use meta keywords sparingly. Google ignores the meta keywords tag. Spend the time on better titles instead.
6. Customize URL handles. Shopify defaults to your product title. Shorten where it helps ("blue-cotton-tee" beats "blue-100-percent-organic-cotton-crew-neck-tshirt-medium-weight"). Once published, leave them alone unless you redirect.
7. Tag products with material, size, and color attributes. Shopify's Search and Discovery app uses these to power filters. Filtered pages rank as their own URLs and capture long-tail traffic.
8. Avoid duplicate content. If you sell the same product in three colors as separate listings, you have duplicate content. Use variants instead.
9. Update existing successful pages. A product page already ranking on page two of Google is worth more attention than a new product. Refresh copy, add reviews, expand the description.
10. Monitor performance in Google Search Console. Spend 30 minutes a week checking which product queries you rank for. The data tells you which products to optimize next.
For deeper SEO context, see is Shopify bad for SEO and best free SEO tools for Shopify.
If you want a full SEO program built around your catalog, my SEO services ship the system, structured data included. For related Shopify reading, see hidden Shopify features that grow sales and why modern Shopify themes win for ecommerce.
More notes
ShopifyBest Free SEO Tools for Shopify
You do not need a $400 Ahrefs subscription to do SEO on a small Shopify store. These free tools cover keyword research, copy, and tracking.
ShopifyHow to Make Your Shopify Store Faster
Slow Shopify stores lose money. Here are the actual fixes that move site speed: theme cleanup, image compression, app audit, and lazy loading.
ShopifyShopify Blog Strategy: Templates and Honest Answers
Shopify's native blog works for some stores and fails others. Here is when to use it, when to use WordPress, and templates that convert.
Shopify10 High-Leverage Shopify Setup Steps for New Stores
Skip the 50-tip listicles. These are the 10 setup moves that actually matter when you are launching a new Shopify store.
