Skip to content

Magento 2

A step-by-step framework for auditing Magento 2 stores: XML sitemaps, canonical tags, hreflang, structured data, crawl budget and Core Web Vitals

Yuvraj RauljiSenior Software Developer

8 min read

  • Technical SEO
  • Magento 2
  • Core Web Vitals
  • Schema

Why Magento 2 Needs a Dedicated SEO Audit

Magento 2 is one of the most powerful e-commerce platforms available, but it comes with SEO pitfalls that are unique to its architecture. Duplicate category/product URLs, incorrect canonical tags, bloated XML sitemaps, and slow TTFB are common issues that silently destroy organic rankings for even well-designed stores.

Over 9 years of working with Magento 2 stores, I've developed a systematic audit framework that consistently uncovers the 20% of issues causing 80% of the organic traffic loss. This guide walks through every layer.

Phase 1: Crawlability & Indexability

1.1 XML Sitemap Configuration

Magento 2 generates sitemaps automatically but the defaults are often wrong. Key issues to fix:

  • Sitemap includes ?___store= query parameters, which create duplicate URLs in Google Search Console
  • Out-of-stock products should typically be excluded from sitemaps using a custom plugin
  • Sitemap file size should not exceed 50MB / 50,000 URLs: split into sub-sitemaps if needed
  • Lastmod dates must update when product content changes: configure this in Stores → Configuration → Catalog → XML Sitemap

1.2 Robots.txt

Magento 2 has a built-in robots.txt editor under Content → Design → Configuration → Edit → HTML Head → Default Robots. Critical rules to verify:

Disallow: /catalog/product/compare/
Disallow: /checkout/
Disallow: /customer/
Disallow: /catalogsearch/
Allow: /catalogsearch/result/

1.3 Canonical Tags

The most common Magento 2 SEO mistake is incorrect canonical implementation. Products accessible via multiple category paths (/category-1/product.html and /category-2/product.html) must all canonical to the primary product URL. Set this in Stores → Configuration → Catalog → Catalog → Search Engine Optimization → Use Canonical Link Meta Tag for Products.

Always audit canonical tags with Screaming Frog or a custom crawl. Do not trust that Magento's built-in settings are working correctly after a version upgrade or custom development.

Phase 2: On-Page SEO Signals

2.1 Title Tags & Meta Descriptions

Magento 2 allows product-level meta overrides but most stores rely on the auto-generated format: Product Name - Store Name. For high-traffic categories, invest in manually optimised titles with primary keyword in positions 1-3. Use the [store_name] variable only at the end.

2.2 Structured Data (Schema)

Implement JSON-LD for all product pages with these schema types:

  • Product: name, description, image, sku, brand
  • Offer: price, priceCurrency, availability, url
  • AggregateRating: if reviews are enabled
  • BreadcrumbList: critical for Magento 2 since navigation paths vary

Phase 3: Core Web Vitals

3.1 LCP (Largest Contentful Paint)

The hero product image is almost always the LCP element on Magento 2 PDP pages, though on a large catalogue the server response usually dominates before any image does, which is why Magento speed work starts at the caching layer. Common fixes: preload the LCP image in the theme's default_head_blocks.xml, serve WebP via Fastly or Cloudflare Image Resizing, and remove render-blocking third-party scripts from the <head>.

3.2 CLS (Cumulative Layout Shift)

Magento 2's lazy-loaded product images and promotional banners are primary CLS culprits. Always define explicit width and height attributes on all images and reserve space for above-the-fold banners.

Phase 4: International & Multi-Store SEO

For multi-store Magento 2 setups, hreflang implementation is critical. Each store view should declare all language/region variants. Use a custom module or Amasty SEO Suite to manage hreflang at scale across large catalogs.


This framework is the same one applied on every Magento 2 engagement. Crawlability, indexation and structure are one of the six areas covered by an eCommerce technical audit, which is delivered as a written document with the findings in priority order. Where the work is the implementation rather than the diagnosis, that sits under Magento consulting. If you want both the diagnosis and someone to carry out the work, you can work with Yuvraj Raulji directly as your technology partner.

Questions

  • What does a Magento 2 SEO audit actually check?

    Four things, in this order: whether the store can be crawled and indexed at all, whether the pages that are indexed send the right signals, whether they load well enough to keep the ranking they earn, and whether multi-store and international setups are telling search engines the truth about which page serves which audience. The order matters, because a title tag on a page that is not indexed changes nothing.

  • Why does Magento 2 need a different SEO audit from any other site?

    Because most of what goes wrong is generated rather than written. Layered navigation multiplies one category into thousands of filtered URLs, the default sitemap and canonical settings disagree with each other on several of them, and store views duplicate the catalogue once per view. None of that is visible in the content: it is produced by the platform configuration, which is where the audit has to look.

  • Which Magento 2 SEO problems are the most common?

    Filtered catalogue URLs being crawled and indexed at scale, canonical tags pointing at the wrong variant of a product, an XML sitemap that lists URLs the robots file blocks, missing or invalid Product and Breadcrumb structured data, and category pages whose largest element is an image the theme loads late. The first one is usually the expensive one, because it spends the crawl budget the rest of the catalogue needs.

  • Do I need an SEO extension for Magento 2?

    Usually not for the problems in this guide. Sitemaps, canonicals, robots rules, meta templates and structured data are all platform configuration, and an extension that rewrites them adds a second opinion about the same settings. Extensions earn their place for bulk editing and for rules a merchandiser needs to change without a developer. Buying one to fix a crawl problem is paying for a symptom.

  • How is a technical SEO audit different from a site audit?

    A site audit answers how the store is doing. A technical audit answers why, and it is only worth commissioning when you intend to act on it. This guide is the framework I use; what it cannot tell you is which of these is true on your store, which is what looking at the store is for.

What next

This is the general shape of it. What is actually happening on one particular store takes looking at that store, which is what the audit is for.