Technical SEO for eCommerce Guide, code and free tools

Technical SEO for eCommerce stores, with the code other guides leave out.

Real code, no hand-waving, no "it depends" cliffhangers.

I am Abhinay Gupta, an eCommerce SEO consultant with 8+ years of experience. Most guides tell you to “fix duplicate content” and stop. This one gives you copy-paste code, a faceted navigation decider, a URL explosion calculator, a Product schema generator and a robots.txt builder for search and AI crawlers.

4 free tools6 code examplesPlatform-neutralUpdated Nov 2026

Written by Abhinay Gupta, eCommerce SEO consultant. Last reviewed November 2026. Hire me for your store →

Quick answer

What is technical SEO for eCommerce?

Technical SEO for eCommerce is the work that lets search engines and AI systems crawl, render, index and understand your store efficiently. In practice that means controlling the huge number of near-duplicate URLs that filters, sorts and variants create, serving key product facts in crawlable HTML, adding complete product structured data, and keeping pages fast on mobile.

Go deeper: Shopify SEO, WooCommerce SEO, BigCommerce SEO, migration SEO, B2B eCommerce SEO, AI search for eCommerce, the free SEO audit, the query fan-out tool.

In this guide15 sections

Crawling and indexing: the foundation

If search engines cannot reach and trust the right URLs, nothing else you do matters. Start here.

01

robots.txt

Block cart, checkout, account and pure-waste parameters. Never block CSS, JavaScript, or category and product paths.

02

XML sitemaps

List only indexable, canonical, 200-status URLs. Keep each sitemap under 50,000 URLs, and keep lastmod accurate. Google ignores priority and changefreq.

03

Status codes

301 for permanent moves, 404 or 410 for gone pages, and 503 for temporary outages. Avoid soft 404s and redirect chains.

04

Canonical tags

A canonical is a hint, not a command. Make every indexable page self-canonical, and point duplicates to the preferred URL.

05

Redirects

Map old URLs to the closest new equivalent. One hop only, and update internal links to the final URL.

06

Internal links

Link key categories from the homepage and navigation, use breadcrumbs, and link related products. Internal links tell Google which pages matter.

Copy-paste examples

Canonical tag on a filtered category page

<!-- On /collections/shoes?color=red&sort=price -->
<link rel="canonical" href="https://yourstore.com/collections/shoes">

Noindex for internal search results

<meta name="robots" content="noindex, follow">

robots.txt: block pure-waste parameters, not revenue pages

User-agent: *
Disallow: /cart
Disallow: /checkout
Disallow: /account
Disallow: /*?sort_by=
Disallow: /*?view=

Sitemap: https://yourstore.com/sitemap.xml

Permanent redirect on Apache (.htaccess)

Redirect 301 /old-category/ https://yourstore.com/new-category/

A page blocked in robots.txt cannot be crawled, so Google cannot see a canonical or noindex tag on it. Block only URLs that have no value at all, and use canonical or noindex for the rest.

Free tools Faceted navigation

Faceted navigation: decide, then measure the damage

Filters help shoppers and hurt crawlers. Decide how each type of filter should be handled, then see how fast the URL count explodes.

Facet decider

What kind of URL is it?
Do people search for it? (e.g. “red running shoes”)
Index it

URL explosion calculator

0

Formula: categories × (1 + Σ combinations of up to k filters × values^k) × sort options. It ignores pagination, so reality is higher.

Free tool Runs in your browser

Product schema generator

Fill in what you know about a product. You get clean JSON-LD to paste into the page, with warnings for common mistakes. Always test the result in Google’s Rich Results Test.

Rich Results Test

Add rating markup only when the reviews are visible on the page. Add return and shipping policy markup as your platform allows. Requirements change, so check Google’s current Product and Merchant listing documentation.

Speed and Core Web Vitals

Speed is a small ranking factor and a big conversion factor. Measure with field data, then fix by template.

MetricGoodNeeds workCommon store causes
LCP (loading)≤ 2.5 s2.5 to 4 sLarge hero images, slow server response, render-blocking scripts, lazy-loaded main image.
INP (responsiveness)≤ 200 ms200 to 500 msHeavy JavaScript, chat widgets, review and popup apps.
CLS (stability)≤ 0.10.1 to 0.25Images without dimensions, late-loading banners and embeds.

Thresholds are measured at the 75th percentile of real visits. Check them by template (home, category, product), on mobile first, in Search Console and PageSpeed Insights.

JavaScript rendering: what crawlers actually see

If key content only appears after JavaScript runs, some crawlers may never see it.

  1. View the raw HTML. Use “View page source” (not Inspect). Search for the product name, price and description. If they are missing, they are added by JavaScript.
  2. Check the rendered version. In Search Console, use URL Inspection and “View tested page” to see what Google renders.
  3. Compare. Differences between raw and rendered HTML show what depends on JavaScript.
  4. Fix what matters. Move product name, price, availability, description, internal links and structured data into server-rendered HTML.
  5. Remember AI crawlers. Many AI crawlers do not run JavaScript, so server-rendered facts are safer for AI visibility too.

Pagination, out-of-stock products and variants

SituationRecommended handling
Paginated category pagesCrawlable links and a self-referencing canonical on each page. Do not canonical every page to page 1. Google no longer uses rel=prev and rel=next.
Infinite scrollAlso provide paginated URLs that crawlers can follow, and update the URL as pages load.
Temporarily out of stockKeep the page, set availability to OutOfStock, and show alternatives.
Permanently discontinuedRedirect to the closest equivalent product or category. If none exists, return 404 or 410. Avoid mass redirects to the homepage.
Product variants (size, color)Usually one indexable product URL with variants selectable on the page. Canonical separate variant URLs to the main product, unless variants have real search demand.
Duplicate product pathsOne canonical product URL, with internal links pointing to it directly.

International stores and hreflang

If you sell in more than one country or language, tell Google which version is for whom.

<link rel="alternate" hreflang="en-us" href="https://yourstore.com/us/shoes/">
<link rel="alternate" hreflang="en-in" href="https://yourstore.com/in/shoes/">
<link rel="alternate" hreflang="x-default" href="https://yourstore.com/shoes/">
Free tool Search and AI crawlers

robots.txt builder for search and AI crawlers

Choose what each crawler may do. The builder writes the robots.txt. Training crawlers and search crawlers do different jobs, so decide each on purpose.

Check an existing file

Google-Extended controls Google AI training and does not affect Google Search. If your platform generates robots.txt for you, apply these rules through its supported method.

How to measure technical SEO

MetricWhereHow often
Indexed vs submitted URLsSearch Console, Pages and SitemapsMonthly
Reasons pages are not indexedSearch Console, PagesMonthly
Crawl errors and response timeSearch Console, Crawl stats, and server logsMonthly
Core Web Vitals pass rate by templateSearch Console, PageSpeed InsightsMonthly
Valid product and merchant itemsSearch Console, enhancements and Merchant CenterMonthly
Non-brand clicks and organic revenueSearch Console and GA4Monthly

Server logs show what Googlebot and AI crawlers actually request. If you can get them, check which URLs get the most crawls and how many are parameters or errors.

Seven technical SEO mistakes in eCommerce

Blocking CSS, JavaScript or category paths in robots.txtSearch engines cannot render or find the pages that earn revenue.
Canonical and noindex on a page blocked by robots.txtGoogle cannot see either signal if it cannot crawl the page.
Indexable filter and sort URLsThousands of near-duplicate pages dilute signals.
Mass redirects of old products to the homepageGoogle can treat these as soft 404s and the equity is lost.
Rating markup without visible reviewsThis can lead to manual action or lost rich results.
Product facts hidden in JavaScript tabs or imagesCrawlers and AI systems may never see them.
Never re-checking after theme or app changesA single app can add hundreds of kilobytes of scripts overnight.
Free tool Market pricing

What does technical SEO for eCommerce cost?

Pick your setup to see a realistic market range, then enter a quote you received to see where it falls. Ranges blend published 2026 pricing guides with size scaling, and they are market data, not my quote.

What do you need?
Catalog size
Platform
Who does the work?
Add-ons
Monthly retainer

Usually included

    Get a fixed quote

    Check a quote you received

    Enter the amount (per month for a retainer, total for a one-time project) in US dollars.

    Free tool

    Developer ticket generator

    Turn an SEO finding into a ticket your developer will not bounce back. Pick the issue, add the URL and platform, copy.

    Ticket

    Reality check

    Does crawl budget matter for your store?

    Most guides say it matters for everyone. It does not. Here is the honest test.

    Verdict

    Thresholds are my working rules of thumb, in line with Google guidance that crawl budget is mainly a concern for very large or fast-changing sites. Check Crawl Stats in Search Console for the real picture.

    eCommerce technical SEO, faceted navigation and technical audits

    eCommerce technical SEO is the work of making a catalog crawlable, indexable and fast. The biggest source of trouble is faceted navigation: filters and sort options that create thousands of near-duplicate URLs. Faceted navigation SEO means deciding which filter pages earn indexation and keeping the rest out of the crawl.

    An eCommerce technical SEO audit checks crawl budget, index coverage, canonicals, redirects, structured data and Core Web Vitals, then ranks fixes by revenue. Use the free tools on this site alongside the eCommerce SEO audit checklist.

    Further reading from the source: Google Search Central: best practices for ecommerce sites.

    Sources and further reading

    6 sources

    Public sources behind the claims on this page. Links open the original. Checked November 2026.

    About the author
    Abhinay Gupta, eCommerce SEO consultant

    Abhinay Gupta, freelance eCommerce SEO consultant

    I have worked in SEO for 8+ years, across eCommerce, technical SEO and AI search. I have led SEO teams at Appinventiv and Restroworks and now work hands-on with stores on Shopify, WooCommerce, BigCommerce, Magento and custom builds. I write only about work I have done, and I say so when something is unproven.

    LinkedIn · Upwork · About · Editorial policy · Case studies · Book a call

    Reviewed November 2026. How I research and review. Figures come from the sources named on the page, or from my own Search Console and Google Analytics data where stated.

    Technical SEO for eCommerce FAQ

    What is technical SEO for eCommerce?

    Technical SEO for eCommerce is the work that lets search engines and AI systems crawl, render, index and understand your store efficiently. It covers URL structure, canonical tags, faceted navigation, sitemaps, robots.txt, redirects, speed, JavaScript rendering, structured data and product feeds. For stores, most of the effort goes into controlling the huge number of near-duplicate URLs that filters, sorts and variants create.

    Does crawl budget matter for my store?

    Google says crawl budget is mostly a concern for very large sites (around a million or more pages) or sites with tens of thousands of pages that change daily. Smaller stores rarely run out of budget, but faceted navigation can still waste crawling and dilute signals. The URL explosion calculator on this page shows how quickly filters multiply.

    Should I noindex or canonical my filter pages?

    Use a canonical when a filtered page is a near-duplicate of its parent category, and noindex when you do not want it in the index at all. Do not use both signals on one page and do not block the page in robots.txt if you need Google to see the canonical or noindex. Keep the few filter pages with real search demand indexable as proper landing pages.

    Can I block filter URLs in robots.txt?

    You can, and it saves crawl effort for parameters that never have value, like sort and per-page options. But a URL blocked in robots.txt cannot be crawled, so Google cannot see its canonical or noindex tag, and the URL can still appear in the index if it is linked. Use robots.txt for pure waste, and canonical or noindex for pages you want handled gracefully.

    How should I handle pagination?

    Give each paginated page a crawlable link and a self-referencing canonical. Do not point every page's canonical to page 1, and do not noindex pages 2 and up if products on them depend on that path for discovery. Google no longer uses rel=prev and rel=next. If you use infinite scroll, also provide paginated URLs that crawlers can follow.

    What should I do with out-of-stock products?

    If the product is coming back, keep the page live, mark availability as OutOfStock in schema, and offer alternatives. If it is gone for good, redirect to the closest equivalent product or category when one exists, and otherwise return 404 or 410. Avoid redirecting everything to the homepage, which Google can treat as a soft 404.

    Do Core Web Vitals really affect rankings?

    They are a ranking signal, but a modest one compared with relevance. Their bigger effect is on conversion, since slow pages lose shoppers. Aim for LCP under 2.5 seconds, INP under 200 milliseconds and CLS under 0.1 on mobile, using field data where available.

    Does JavaScript hurt eCommerce SEO?

    Googlebot can render JavaScript, but rendering is slower and can fail on heavy or error-prone pages. Many AI crawlers do not run JavaScript at all. Put the facts that matter, such as product name, price, availability, description and links, in the server-rendered HTML, and test with the URL Inspection tool and by viewing the raw page source.

    Which AI crawlers should I allow?

    It is a business decision. Search and answer crawlers, such as OAI-SearchBot, Claude-SearchBot and PerplexityBot, can send shoppers to your store, so many stores allow them. Training crawlers, such as GPTBot and ClaudeBot, use content to train models, and some stores block them. Google-Extended is a control for Google AI training and does not affect Google Search. The generator on this page builds a robots.txt for your choices.

    What structured data does a product page need?

    At minimum, Product markup with name, image, description, brand, and an Offer with price, currency and availability. Add GTIN or MPN where you have them, and rating markup only when the reviews are visible on the page. Validate with Google's Rich Results Test, and check Google's current documentation because requirements change.

    How do I handle hreflang on an international store?

    Every language or country version should list all versions, including itself, with reciprocal links, plus an x-default for the fallback. Use consistent URLs, and do not auto-redirect visitors by IP address, because crawlers can then miss versions. See the international section on this page for an example.

    How often should I run a technical SEO check?

    Run a quick scan every quarter and a full audit yearly, plus a check after every migration, theme change or major app install. Track indexed pages, crawl errors and Core Web Vitals monthly. The audit page on this site has a free 30-point checklist.

    Do I need a developer for technical SEO?

    For most fixes, yes. An SEO consultant finds and prioritizes the problems and writes the tickets, and a developer ships the changes. The best results come when the two work together on a ranked list with owners and effort for each item.

    What is faceted navigation SEO?

    It is the practice of controlling how filter and sort URLs are crawled and indexed so they do not waste crawl budget or create duplicate content, while keeping valuable filter pages indexable.

    What does an eCommerce technical SEO audit cover?

    It covers crawling and indexing, duplicate URLs, canonicals, redirects, structured data, speed and Core Web Vitals, ranked by revenue impact.

    Taking new clients Freelance projects and retainers · I reply within 12 hours

    Get a technical SEO audit of your store

    I work with online stores as a freelance eCommerce SEO consultant. Book a 30-minute call, or send a short brief with your site and goal. You get a specific answer, not a sales script. See my eCommerce SEO services and pricing.

    See the eCommerce SEO glossary for definitions of the crawling and indexing terms used in this guide.

    Crawl and indexBook a call