Shopify Technical SEO: Duplicate URLs, robots.txt and Schema

Shopify handles a lot of technical SEO for you, but it also creates duplicate URLs, ships a robots.txt you may need to adjust and leaves gaps in schema. Here's how to find and fix each one.

Pixel-art storefront beside a magnifier, a Shopify store checked for the technical SEO issues that hold it back.

Shopify technical SEO is mostly about controlling what Shopify generates for you. Fix theme links that point to duplicate collection URLs, keep filter and sort URLs out of crawls, edit robots.txt.liquid carefully, clean up overlapping schema, cut app scripts that slow pages, and set up Markets, redirects and discontinued products the right way.

The good news: Shopify handles the basics. Canonical tags, a sitemap, a sensible robots.txt and product schema all ship by default. The bad news: the defaults have gaps, and apps quietly add problems on top.

This post covers Shopify's URL structure, duplicate paths, filters and pagination, robots.txt.liquid, structured data, speed, Markets, redirects, discontinued products and app side effects. It ends with an audit checklist. Category page strategy and conversion work live in other posts, so I won't repeat them here.

Key takeaways

  • Fix links, not canonicals. Shopify already canonicalizes collection product URLs, so the job is making the theme link to the clean /products/ URL.
  • Respect the default robots.txt. It already blocks sort orders, multi-tag pages and stacked filters, so edit it only for a clear reason.
  • One schema source per type. Check what the theme outputs before an app adds a second Product or rating block.
  • Apps are the speed problem. Most slow Shopify pages carry scripts from apps, including ones you removed months ago.
  • Redirects need a 404. Shopify only redirects from broken URLs, so archive the old item before you count on the redirect.

How does Shopify structure its URLs?

Shopify uses fixed folders for each content type. You pick the handle, the last part of the URL. You can't change the folder in front of it.

URL pattern What it is Indexable by default?
/products/oxford-shirt Product page Yes, the canonical version
/collections/shirts Collection page Yes
/collections/shirts/products/oxford-shirt Same product, reached through a collection Loads, but canonicals to /products/
/collections/shirts/linen Collection filtered by one tag Yes, unless you change it
/collections/shirts?sort_by=price-ascending Sorted collection Blocked in robots.txt
/collections/shirts?filter.v.option.color=blue Filtered collection One filter crawlable, two or more blocked
/collections/shirts?page=2 Second page of a collection Yes
/products/oxford-shirt?variant=4512 A specific variant Same page, variant preselected
/pages/about Static page Yes
/blogs/journal/linen-care Blog post Yes
/fr/products/oxford-shirt Market or language subfolder Yes, with hreflang

The fixed folders bother some people. They don't hurt rankings. Google cares far more about which URL is canonical and how pages link to each other. Don't migrate a store over /products/ in the path.

The rows that need work are the collection product path, tag pages, filters and pagination. The next sections take them one at a time.

Why does Shopify create duplicate product URLs?

A product can load at its own URL and at one extra URL for every collection it's in. That's duplicate content by design. Shopify lets themes build product links "within" a collection, so the page knows which collection the shopper came from.

Bar chart of crawlable product URLs: 400 with clean product links and 1,600 when the theme links through collections.Bar chart of crawlable product URLs: 400 with clean product links and 1,600 when the theme links through collections.
With each product in three collections on average, collection links add 1,200 duplicate paths on top of the 400 real product pages. A worked example. Worked example from this guide.

Shopify handles the index side with a canonical tag. That tag tells search engines which URL is the main one. Shopify's guidance is that first-party themes set a canonical URL on all pages, and collection product paths point to the clean /products/ URL.

So what's the problem? Internal links. If the theme links to the collection path, crawlers follow those links first. Google then has to crawl the duplicate, read its canonical, and go find the clean URL. An SEO agency write-up on this pattern notes that the collection URL sometimes ranks despite being canonicalized to the clean one.

The scale adds up fast. Say a store has 400 products, and each sits in three collections on average. That's 400 clean URLs plus 1,200 collection paths, or 1,600 crawlable product URLs for 400 real pages. Every extra URL takes a slice of crawl budget, the time Google is willing to spend on your site.

How do you fix theme linking with the within filter?

Shopify's Liquid docs describe the within filter as one that generates a product URL within the context of a collection. The same page warns that it can create duplicate content concerns.

Here's the fix, step by step:

  1. Duplicate your live theme so you have a backup.
  2. In the copy, open Edit code and search the files for within.
  3. Look in product card snippets, collection sections and any featured product blocks.
  4. Swap the filtered link for the plain product URL.
  5. Preview a collection page, hover a product card, and confirm the link starts with /products/.
  6. Publish, then recrawl the site to confirm no collection product paths remain in links.

The change itself is one line:

{%- comment -%} Before: links to /collections/shirts/products/oxford-shirt {%- endcomment -%}
<a href="{{ product.url | within: collection }}">{{ product.title }}</a>

{%- comment -%} After: links to /products/oxford-shirt {%- endcomment -%}
<a href="{{ product.url }}">{{ product.title }}</a>

Newer themes often don't need this. Dawn's product card snippet links with plain card_product.url, with no within filter. Older and third-party themes vary, so search before you assume.

You'll lose one thing: the breadcrumb on the product page can no longer show which collection the shopper came from. Most stores are fine with a breadcrumb that shows the product's main collection instead.

What about variant URLs?

Variant links add ?variant= and a number to the product URL. They load the same page with a different option picked. Leave these alone in most cases. Check what your theme's canonical tag says on a variant URL with Google's URL Inspection tool. It should point to the clean product URL.

If a single colorway gets its own searches, the variant parameter won't rank for it. You'd need a separate product with its own handle and copy.

How should you handle filters, tags and sort orders?

Filters and tags can multiply URLs faster than duplicate product paths. The strategy for which ones deserve to be indexed is in the category page SEO guide. Here I'll cover what Shopify does by default and where you need to step in.

Shopify's built-in filters use URL parameters. The storefront filtering docs show formats like filter.v.option.color=red and filter.v.price.gte=20. Several filters chain together with an ampersand. Tag pages use a different pattern: the tag goes after the collection handle, like /collections/shirts/linen.

The default robots.txt already covers a lot. On live Shopify stores in November 2026, the default file includes rules like these:

Disallow: /collections/*sort_by*
Disallow: /collections/*+*
Disallow: /collections/*%2B*
Disallow: /collections/*filter*&*filter*
Disallow: /blogs/*+*
Disallow: /*?*preview_theme_id=*

In plain words, that blocks sorted collections, multi-tag pages (tags joined with a plus sign), any URL with two or more filters, and theme previews.

URL type Default handling What I'd do
Sort order Blocked by robots.txt Leave it
Two or more filters Blocked by robots.txt Leave it
Multi-tag page Blocked by robots.txt Leave it
One filter, like a color Crawlable and indexable Keep only if people search it, otherwise noindex
One tag page Crawlable and indexable Keep the few with demand and copy, noindex the rest
Price range filter Crawlable if it's the only filter Usually block or noindex

Google's own guidance agrees with this setup. Its faceted navigation page says to use robots.txt to disallow crawling of faceted navigation URLs you don't need indexed. It calls canonical tags and nofollow generally less effective in the long run.

To noindex single tag pages, add a check on current_tags in the head of theme.liquid:

{%- if template contains 'collection' and current_tags -%}
  {%- assign keep_tags = 'waterproof,linen,wide-fit' | split: ',' -%}
  {%- unless keep_tags contains current_tags.first -%}
    <meta name="robots" content="noindex, follow">
  {%- endunless -%}
{%- endif -%}

This keeps three tag pages you chose and noindexes every other tag page. Test it on a preview theme first, and check the head of a kept page and a dropped page.

How does pagination work on Shopify collections?

Collections split into pages with a ?page= parameter. That's fine. Google's pagination guidance asks for exactly this: a unique URL for each page, like ?page=n, and plain links from each page to the next.

Three rules from the same guidance matter on Shopify:

  • Don't canonical page 2 to page 1. Google says not to use the first page as the canonical for the whole series. Each page should canonical to itself.
  • Keep real links. Google says its crawlers generally don't click buttons. A "Load more" button with no real link hides deeper products.
  • Ignore rel next and prev. Google no longer uses them, so don't spend time adding them.

Check your theme on a collection with more than one page. View the source of page 2 and look at the canonical tag. Then look for an <a href> link to page 3. If the theme uses infinite scroll, make sure it also renders numbered links that a crawler can follow.

If deep pages are a problem, the easier fix is often fewer pages. Show 24 or 48 products per page instead of 12, and split giant collections into smaller ones that match how people search.

What can you change in robots.txt.liquid?

You can add rules, remove rules, add sitemaps and set rules per domain. You do it by adding a robots.txt.liquid template to the theme's templates folder. Shopify's docs warn that this replaces Shopify's generated robots.txt output, so you're taking over the whole file.

A robots.txt file stops crawling. It doesn't remove a page from the index. And a crawler that can't visit a page can't see a noindex tag on it. So pick one tool per URL type, as the table above does.

You can You can't
Add Disallow rules for any path or parameter Hide a page that's already indexed, robots.txt only stops crawling
Remove a default rule Change the sitemap file Shopify generates
Add extra Sitemap lines Block one market's shoppers, robots.txt only talks to bots
Block or allow named crawlers Rely on it for anything private, it's a public file
Set rules per domain with request.host Make Google reread it on the spot, it picks up changes on its own schedule

Here's a working example. It keeps the defaults, drops one default rule, adds one rule for the main group and blocks one bot. The structure follows Shopify's robots.txt examples.

{% for group in robots.default_groups %}
  {{- group.user_agent }}

  {%- for rule in group.rules -%}
    {%- unless rule.directive == 'Disallow' and rule.value == '/policies/' -%}
      {{ rule }}
    {%- endunless -%}
  {%- endfor -%}

  {%- if group.user_agent.value == '*' -%}
    {{ 'Disallow: /collections/*filter.v.price*' }}
  {%- endif -%}

  {%- if group.sitemap != blank -%}
    {{ group.sitemap }}
  {%- endif -%}
{% endfor %}

User-agent: discobot
Disallow: /

The extra rule blocks price filter URLs even when they're the only filter applied. The unless block drops the /policies/ rule if your defaults include it.

The robots.txt also lists your sitemap. That side is covered in the Shopify sitemap guide.

Which structured data does a Shopify theme output?

Schema markup is code that describes a page in a format machines read. On a store, it tells Google the price, stock and rating behind each product. Shopify themes output some of it for you.

Shopify's structured_data filter converts a product into schema.org data. A product with no variants comes out as Product. A product with variants comes out as ProductGroup. The filter also works on blog articles, which come out as Article.

Here's what Dawn, Shopify's reference theme, outputs:

Schema type Where Dawn outputs it Common gap
Product or ProductGroup, with Offer Product section, via the structured_data filter No shipping or return details
Organization Header, on every page Logo only if one is set
WebSite with SearchAction Header, homepage only Fine as is
AggregateRating Not in the theme Usually added by a review app
BreadcrumbList Not in the product section Add it yourself

Third-party themes vary a lot. Some hand-code their own Product block, some use the filter and some do both.

Google's merchant listing docs make two points worth acting on. They recommend putting Product structured data in the initial HTML. They also say markup generated by JavaScript can make shopping crawls less frequent and less reliable. Theme Liquid renders on the server, so the theme block is the safer source. App blocks injected with scripts are riskier.

How do you add BreadcrumbList in Liquid?

Add a snippet to the product template that writes JSON-LD from Liquid. This version uses the product's first collection as the middle step.

{%- assign crumb = product.collections.first -%}
<script type="application/ld+json">
{
  "@context": "https://schema.org",
  "@type": "BreadcrumbList",
  "itemListElement": [
    { "@type": "ListItem", "position": 1, "name": "Home", "item": {{ shop.url | append: '/' | json }} },
    {%- if crumb -%}
    { "@type": "ListItem", "position": 2, "name": {{ crumb.title | json }}, "item": {{ shop.url | append: crumb.url | json }} },
    { "@type": "ListItem", "position": 3, "name": {{ product.title | json }} }
    {%- else -%}
    { "@type": "ListItem", "position": 2, "name": {{ product.title | json }} }
    {%- endif -%}
  ]
}
</script>

The visible breadcrumb on the page should show the same path. If it doesn't, fix the visible one first. Markup must match what shoppers see.

How do you avoid duplicate Product and rating blocks?

The usual conflict comes from review apps. The theme outputs a Product block, and the app adds a second one with AggregateRating. Now Google sees two Product entities on one page, sometimes with different prices.

Check one product page in the Rich Results Test. Count the Product items it detects. If there are two, pick one source. Look in your review app's settings, whether it's Judge.me or another, for how it outputs schema. If it can't merge its ratings into the theme's block, ask its support before you remove anything.

For FAQ blocks on pages, the FAQ schema generator writes clean JSON-LD from your questions. The bigger picture on which types matter for AI answers is in schema markup for AI search.

How do you speed up a Shopify store for Core Web Vitals?

Core Web Vitals are Google's three page experience metrics. Google's targets are an LCP of 2.5 seconds or less, an INP of 200 milliseconds or less and a CLS of 0.1 or less, measured at the 75th percentile of page loads.

LCP is how fast the main content shows up. INP is how fast the page reacts to a tap. CLS is how much the layout jumps while it loads.

Shopify gives you real user data for all three. Go to Analytics > Reports and search for the web performance reports. Shopify's help page says the reports use real user data at the 75th percentile. They also mark app installs and theme changes on the timeline. Data can lag by up to 36 hours.

The CRO post covers testing speed on a real phone. Here's the technical fix list, in the order I'd work it:

  1. Find the app scripts. Open a product page, view the source, and list every script from a domain that isn't your store or Shopify's CDN. Match each to an app.
  2. Remove leftovers. Uninstalled apps often leave snippets in the theme. Search the theme code for the app's name and delete dead includes.
  3. Turn off app embeds you don't use. In the theme editor, open App embeds and switch off anything idle.
  4. Fix the main image. The hero or first product image is usually the LCP element. Don't lazy load it.
  5. Use image_tag. Shopify's image_tag filter adds width, height and a srcset by default. Width and height stop layout shift. The srcset sends smaller files to phones.
  6. Reserve space for late content. Review widgets and banners that load late push the page down, which hurts CLS. Give them a fixed height.
  7. Cut heavy sections. Video backgrounds and auto-playing sliders cost more than they earn on most product pages.

A useful rule: every app should justify its scripts. If you can't name what an app earned last quarter, remove it and watch the reports for two weeks.

How do Shopify Markets handle international SEO?

Markets handles most of the hard parts for you. Shopify's international SEO page says hreflang tags are generated automatically from your market and language setup, and they're on by default. Hreflang tells search engines which language and country each version is for.

The same page covers three other points that matter:

  • Canonicals stay local. Each market version gets a self-referencing canonical. It doesn't point to another market.
  • Crawlers aren't redirected. Automatic redirection applies to shoppers, but known search engine crawlers are excluded. They get the URL they asked for.
  • Tags only cover distinct URLs. Hreflang is generated only for markets with their own domain, subdomain or subfolder.

Your main decision is the URL setup.

Setup Example Strength Cost
Subfolders example.com/fr/ Shares the main domain's authority Lowest setup
Subdomains fr.example.com Treated as separate sites by some engines DNS for each
Country domains example.fr Strongest local signal A domain and property per country

That table follows Shopify's own comparison. My default is subfolders. They inherit the strength you've already built, and you manage one site. Country domains make sense when a market has its own team and budget.

Two things break international setups. The first is running two sets of hreflang. If you turn off Shopify's automatic tags in Online Store > Preferences and add your own, check that the automatic ones are really gone. The second is an app that redirects every visitor by location, crawlers included. That can stop Google from seeing your other markets at all.

How do redirects work on Shopify?

Shopify has a built-in redirect manager. Go to Content > Menus, then click View URL redirects. Shopify's help page says redirects start working immediately. You can also import them from a CSV.

A 301 redirect sends visitors and search engines from an old URL to a new one, permanently. On Shopify, three limits shape how you use it.

Limit What it means
100,000 redirects on standard plans Plenty for most stores, as of November 2026
20,000,000 on Plus Rarely a constraint
Redirects only work from broken URLs If the old page still loads, the redirect won't fire
Query strings may not redirect as expected Don't build redirects around parameter URLs

The third row catches the most people. A redirect from /products/old-shirt does nothing while that product is still live. The help page says redirects apply only when the URL returns a 404. So the order matters: archive or unpublish the old item first, then the redirect takes over.

For a migration onto Shopify, map every old URL to its new home before launch. Use the CSV import for the bulk. Then crawl the old URL list with Screaming Frog in list mode. Every row should show one 301 and a 200 at the end, with no chains.

What should you do with out-of-stock and discontinued products?

The decision rules for keep, redirect or remove are in the category page SEO guide. On Shopify, the mechanics are what trip stores up.

Situation Shopify action Watch for
Out of stock for now Keep it Active, show stock clearly Schema should say OutOfStock, not InStock
Gone, with a direct replacement Archive it, then redirect to the replacement Redirect fails if the product is still live
Gone, no replacement, has traffic Archive it, then redirect to the closest collection Don't send everything to the homepage
Gone, no traffic or links Archive it and let it 404 Remove it from internal links
Keep for existing buyers only Set it to Unlisted It still loads by direct link

Shopify's Unlisted status hides a product from search engines, collections, storefront search and the sitemap. It stays reachable by direct URL. That's useful for spare parts, refills and reorder links.

Which apps create duplicate content or SEO problems?

Apps add features fast, and some add SEO side effects you won't spot without a crawl. Here are the usual suspects:

App type What it can add How to check
Review apps A second Product block or rating markup Rich Results Test on one product page
SEO apps Extra JSON-LD, extra meta tags, a second sitemap View source and search for ld+json
Page builders Landing pages that copy product or collection content Crawl /pages/ and compare titles
Filter apps Their own parameter URLs that robots.txt doesn't block Crawl a collection and list parameters
Bundle apps Hidden "bundle" products that show up in search Search the sitemap for bundle handles
Translation apps A second hreflang set next to Shopify's View source on a translated page
Uninstalled apps Leftover scripts and snippets Search theme code for the app name

Two of these deserve a closer look.

Filter apps are the sneaky one. Shopify's default robots.txt rules target Shopify's own filter and sort parameters. An app that uses different parameter names can open thousands of crawlable URLs. Crawl one big collection and list every parameter you find. Block the ones that don't match real searches.

Page builders cause quiet duplication. A team builds a landing page for a campaign that repeats a collection. Six months later, both pages compete for the same search. Pick one and redirect the other once the campaign ends.

How does Shopify technical SEO break?

These patterns come up again and again on Shopify stores.

A theme update brings back old problems

You fix the within filter links, then a theme update overwrites the snippet. The collection paths come back in every product card. Keep a short list of your theme edits and recheck them after each update.

robots.txt.liquid freezes the defaults

A developer pastes the live robots.txt in as plain text to make one change. Now the file never gets Shopify's later default updates. Use the Liquid loop where you can, and review the file every quarter.

Two Product blocks with different prices

The theme block uses the current price. An app block caches an old one. Google sees a mismatch and may drop the rich result. Pick one source and remove the other.

A redirect that never fires

The team adds a redirect for a discontinued product but leaves the product Active. The old page keeps loading. Archive first, then test the redirect in a private window.

Search Console fills with "Indexed, though blocked by robots.txt"

A URL type got blocked after Google had already indexed it. Google can't recrawl to see a noindex tag, so the URLs sit in the index. Unblock them, add noindex, let Google recrawl, and block again only if crawl load is a real problem.

Shopify technical SEO audit checklist

Run this on any Shopify store before a redesign, after a migration and once a year. The broader process for crawling and scoring fixes is in the technical SEO audit guide.

Area Check Pass when
Duplicate URLs Product card links in collections Every link starts with /products/
Duplicate URLs Canonical on a collection product path Points to the clean /products/ URL
Duplicate URLs Canonical on a ?variant= URL Points to the clean product URL
Filters and tags Default robots.txt rules in place Sort, multi-tag and stacked filters blocked
Filters and tags Single tag and filter pages Kept only where people search them
Filters and tags App filter parameters Blocked or noindexed
Pagination Page 2 canonical Self-referencing, not page 1
Pagination Links to deeper pages Real anchor links a crawler can follow
robots.txt Custom template, if any Matches the live defaults plus your rules
Schema Product blocks per page Exactly one
Schema Rating markup Matches reviews shown on the page
Schema BreadcrumbList Present and matches the visible breadcrumb
Speed LCP, INP and CLS in Shopify's reports Good at the 75th percentile
Speed Third-party scripts Each one tied to an app you use
Markets Hreflang One set, Shopify's or yours
Markets Each domain or subdomain Verified in Search Console with a sitemap
Redirects Discontinued products Archived and redirected, no chains
Sitemap Hidden and test pages Not in the sitemap

If you send products to Google Merchant Center as well, the schema and the feed should agree on price and stock. The Shopify product feed guide covers that side.

What to do this week

Pick the three checks that cost the least and find the most.

  1. Search the theme for within. If product cards use it, swap in the plain product URL on a duplicate theme, test it and publish.
  2. Run the Rich Results Test on your top product. If it finds two Product items, decide which source stays.
  3. List your app scripts. View the source of a product page, match every outside script to an app, and remove what you don't use.

Then save a copy of your live robots.txt somewhere safe, so you have a baseline before anyone edits it. If your store's SEO, feeds, CRM and apps all need to work together, that's the kind of system we build in GTM engineering projects.

FAQ

Does Shopify have duplicate content problems?

It creates duplicate URLs, but it also sets canonical tags that point them to one version. A product can load at /products/handle and at /collections/name/products/handle. The canonical on both points to the clean product URL. The real problem is internal links: older themes link to the collection path, so Google crawls the duplicates first. Fix the theme links and the issue mostly goes away.

Can I edit robots.txt on Shopify?

Yes. Add a robots.txt.liquid template to your theme's templates folder. It replaces Shopify's generated file, so start by looping over robots.default_groups to keep the default rules, then add or remove lines. Save a copy of your live robots.txt first and compare the output, because the Liquid defaults and the served file have not always matched.

Do Shopify themes include schema markup?

Most do. Shopify's structured_data filter turns a product into Product or ProductGroup JSON-LD, and themes like Dawn use it on product pages. Dawn also outputs Organization in the header and WebSite on the homepage. What's often missing is BreadcrumbList, shipping and return details, and review ratings, which usually come from a review app.

How many URL redirects can a Shopify store have?

Shopify's help center lists a maximum of 100,000 URL redirects on standard plans and 20,000,000 on Plus, as of November 2026. Redirects only work from URLs that return a 404. If the old page still loads, the redirect won't fire, so archive or unpublish the old item before you rely on the redirect.

Should I noindex Shopify tag pages?

Only if they don't match real searches. Tag pages like /collections/shoes/waterproof can rank well when people search that phrase and the page has enough products. Shopify's default robots.txt already blocks multi-tag combinations. For single tags, keep the few that have demand and unique copy, and noindex or stop linking to the rest.

Do Shopify apps slow down my store?

They can. Many apps load scripts on every page, and some leave code in the theme after you uninstall them. Shopify's web performance reports mark app installs on the timeline, so you can see when a metric changed. Audit installed apps and theme files twice a year and remove anything that no longer earns its place.

Does Shopify handle hreflang for international stores?

Yes, for markets that have their own domain, subdomain or subfolder. Shopify turns automatic hreflang tags on by default and sets a self-referencing canonical on each market's version. You can turn the automatic tags off in Online Store preferences. If you do, add your own, and never run both at once.

More like this

Glossary: Ecommerce SEO

Startup? Let's talk.

20 minute fit call. You'll leave knowing the first thing we'd fix and roughly what it costs. If we're not the right fit, we'll tell you who is.