Free SEO audit for new clients — claim yours
Home/Blog/Ecommerce/Magento SEO: A Setup Guide for Magento 2 and Ado…
Ecommerce

Magento SEO: A Setup Guide for Magento 2 and Adobe Commerce

Magento SEO: A Setup Guide for Magento 2 and Adobe Commerce
Table of contents
  1. The Magento admin settings to change before anything else
  2. URL keys, category paths and canonical tags working together
    1. URL key hygiene at scale
  3. Layered navigation and filter URLs without crawl waste
    1. A decision framework for Magento filters
  4. Product and category metadata across thousands of SKUs
    1. A scalable metadata workflow
  5. Speed and hosting choices that decide Magento performance
  6. A worked example: cutting crawl waste on a 30,000-SKU store
  7. Migrating to or from Magento without losing rankings
    1. The steps that matter most
  8. Questions merchants ask about Magento SEO
    1. Is Magento good for SEO?
    2. Should I use category paths in Magento product URLs?
    3. How do I stop layered navigation creating duplicate content?
    4. Does Magento generate an XML sitemap?
    5. Is Hyvä better for SEO than Luma?
  9. Where to start on your Magento store this week
  10. Further reading on Magento SEO
  11. Sources for this Magento SEO guide

Magento (now sold as Adobe Commerce, with Magento Open Source as the free edition) can run a very large, very fast, very well-optimised store. Out of the box, it rarely does. A default install will happily publish the same product at three or four URLs, generate millions of crawlable filter combinations from layered navigation, and serve a frontend heavy enough to fail Core Web Vitals on a mid-range phone.

None of that is a reason to leave the platform. It is a reason to configure it deliberately. Most of the SEO problems we see on Magento stores trace back to a handful of admin settings that were never changed, a theme that adds its own quirks, and catalogue growth that nobody planned for.

This guide is written for Magento 2 and Adobe Commerce. It walks through the settings to change on day one (with exact admin paths), how URL keys, category paths and canonicals interact, how to tame layered navigation, how to manage metadata across thousands of SKUs, what actually speeds Magento up, and how to migrate to or from the platform without losing traffic. Admin labels can vary slightly between versions and extensions, so confirm each one in your own install.

The Magento admin settings to change before anything else

Start here. These settings decide how many URLs your store generates and what search engines are told about them. Every path below is under Stores > Settings > Configuration unless stated otherwise, and most can be set at default, website or store-view scope.

Admin pathSettingRecommended valueWhy
General > Web > Search Engine OptimizationUse Web Server RewritesYesRemoves index.php from URLs
General > Web > Url OptionsAdd Store Code to URLsUsually NoAvoids /default/ in URLs unless you deliberately use store codes for language or country folders
Catalog > Catalog > Search Engine OptimizationUse Categories Path for Product URLsNoOne clean product URL instead of one per category
Catalog > Catalog > Search Engine OptimizationUse Canonical Link Meta Tag For CategoriesYesPoints sorted and filtered category URLs back to the clean category
Catalog > Catalog > Search Engine OptimizationUse Canonical Link Meta Tag For ProductsYesConsolidates any category-path product URLs to one version
Catalog > Catalog > Search Engine OptimizationCreate Permanent Redirect for URLs if URL Key ChangedYesAdds a 301 when someone edits a URL key
Catalog > Catalog > Search Engine OptimizationProduct and Category URL SuffixDecide once and never changeChanging .html later rewrites every URL
Catalog > XML SitemapGeneration settings and robots.txt submissionEnable scheduled generationKeeps the sitemap current with the catalogue
Content > Design > Configuration (per store view)Search Engine RobotsINDEX, FOLLOW on production; NOINDEX on stagingAlso where the custom robots.txt is edited

Two warnings. First, the staging site. Magento staging copies often inherit production robots settings or vice versa. Production set to NOINDEX, NOFOLLOW after a release is a classic Magento disaster; add a post-deploy check. Second, the URL suffix. Whether you keep .html or drop it makes no measurable SEO difference. Changing it on an established store creates a site-wide redirect project for no benefit.

URL keys, category paths and canonical tags working together

Magento builds product URLs from the URL key on each product, set in the product's Search Engine Optimization section. When "Use Categories Path for Product URLs" is on, the same product also becomes reachable at /category/subcategory/product.html for every category it belongs to. A product in five categories can have six URLs.

The fix most stores need is simple:

  1. Set "Use Categories Path for Product URLs" to No, so internal links on category pages point to /product.html.
  2. Set both canonical options to Yes, so any category-path URL that still exists (in old links, sitemaps or caches) canonicalises to the root product URL.
  3. Check the Marketing > SEO & Search > URL Rewrites grid. Old category-path rewrites may remain and keep resolving; that is fine as long as they canonicalise, but redirects are cleaner if you have the capacity.
  4. Reindex and flush caches, then crawl the site to confirm internal links now use the root product URLs.

Some merchants want category paths in product URLs for breadcrumb or keyword reasons. If you keep them, make sure every product has one primary category, that canonical tags point consistently to a single URL, and that your XML sitemap lists only canonical URLs. Breadcrumbs can still show the category trail without the URL containing it.

URL key hygiene at scale

  • Duplicates on import. Magento will refuse or alter a URL key that already exists in the same store view. Bulk imports often append numbers (blue-shirt-1), which look odd. Generate keys from name plus a distinguishing attribute before import.
  • Configurable products. Simple child products set to "Not Visible Individually" should not get indexable URLs. Make sure visibility is set correctly so children do not leak into search results.
  • Multi-store views. URL keys can be translated per store view. If you run language versions, translate them; then add hreflang, which Magento Open Source does not output natively. Our hreflang guide covers implementation.
  • URL rewrite table growth. On large catalogues with category paths enabled, the url_rewrite table can grow into millions of rows and slow reindexing. Turning category paths off helps here too.

Layered navigation and filter URLs without crawl waste

Layered navigation is Magento's filtering system on category pages. By default, each filter adds a query parameter using option IDs, such as ?color=49&size=167, and sorting adds more: product_list_order, product_list_dir, product_list_limit, product_list_mode, plus p for pagination. Combine eight filters with sorting and pagination and a single category can produce thousands of crawlable URLs. Google's URL structure guidance warns that overly complex URLs, especially those with multiple parameters, can cause problems for crawlers, and that irrelevant parameters can create a large number of URLs. This is the classic faceted navigation problem; our guide to faceted navigation SEO covers the theory and our guide to spider traps covers how it eats crawl budget.

Google's own guidance is direct about the preferred control when you do not need filter URLs in search:

“Use robots.txt to disallow crawling of faceted navigation URLs.”

— Google Search Central, Managing crawling of faceted navigation URLs

The same page notes that rel="canonical" may gradually reduce crawling of non-canonical versions but is less effective long-term than robots.txt or URL fragments, and that nofollow only works if every link to the URL carries it.

A decision framework for Magento filters

Filter typeSearch demand?Treatment
Sort order, list mode, products per pageNoneDisallow in robots.txt; canonical to the clean category
Price rangesRarelyDisallow
Multi-select combinations (two colours plus two sizes)Almost neverDisallow; consider AJAX filtering that does not change crawlable links
Single high-demand attribute (brand, a key material, a key type)OftenMake it a real landing page: static URL, unique title, H1, copy, internal links, in the sitemap
Combinations with no resultsNoneReturn a 404 rather than an empty page

That last row follows Google's advice too:

“Return an HTTP 404 status code when a filter combination doesn't return results.”

— Google Search Central, Managing crawling of faceted navigation URLs

A sample robots.txt block for a default Magento install might look like this. Test it against real URLs before deploying, and do not block parameters that your indexable landing pages rely on:

User-agent: *
Disallow: /*?*product_list_order=
Disallow: /*?*product_list_dir=
Disallow: /*?*product_list_limit=
Disallow: /*?*product_list_mode=
Disallow: /*?*price=
Disallow: /catalogsearch/
Disallow: /checkout/
Disallow: /customer/
Disallow: /wishlist/

Brand or attribute landing pages are best created as proper pages rather than indexable filter states. Many stores create subcategories or use an SEO landing page extension that gives each a clean URL and editable content. Internal search results at /catalogsearch/result/ should generally stay out of the index; our guide to internal site search pages explains the exceptions.

Product and category metadata across thousands of SKUs

Each product and category in Magento has Meta Title, Meta Keywords and Meta Description fields. When they are empty, Magento falls back to the product or category name for the title, with any prefix or suffix set in Content > Design > Configuration > HTML Head. That fallback is better than nothing, but on a catalogue of 20,000 SKUs it produces thousands of near-identical titles.

A scalable metadata workflow

  1. Prioritise. Export products with sessions and revenue from GA4 and impressions from Search Console. Hand-write metadata for the top 5% of categories and products.
  2. Template the rest. Build titles from attributes: {name} – {key attribute} | {brand}, for example "Trail Runner 3 – Waterproof Running Shoe | Northpeak". Magento Open Source has no native metadata templates, so either generate values in a spreadsheet and import them, or use an extension.
  3. Import with the native tools. System > Data Transfer > Import accepts meta_title and meta_description columns for products. Test on staging with a handful of rows first.
  4. Write category copy for the categories that matter. The category Description field appears on the page in most themes. Keep it useful and put most of it below the product grid if your theme allows.
  5. Ignore Meta Keywords. Google does not use the keywords meta tag. Leave it empty.
  6. Audit quarterly. Crawl for duplicate titles, missing descriptions and titles over about 60 characters.

Structured data deserves its own check. The default Luma theme outputs limited product markup, and many third-party themes add their own, sometimes duplicating or contradicting it. Validate a sample of product pages with the Rich Results Test and make sure price, availability and reviews in markup match the visible page.

Speed and hosting choices that decide Magento performance

Magento is resource-hungry, and the platform's default frontend (Luma) ships a lot of JavaScript. Most Magento speed problems are solved at three levels: server stack, Magento configuration, and frontend.

LayerWhat to checkWhat good looks like
Modebin/magento deploy:mode:showProduction mode on the live site, never developer mode
Full-page cacheStores > Configuration > Advanced > System > Full Page CacheVarnish (Adobe's recommendation for production) in front of the application
Application cache and sessionsenv.php configurationRedis or Valkey rather than the file system
Indexersbin/magento indexer:show-mode"Update by Schedule" with cron running reliably
Search engineCatalog search configurationOpenSearch on a supported version
ImagesTheme image sizes and formatsResponsive sizes, WebP or AVIF, lazy loading below the fold
CDNStatic and media URLsServed from a CDN close to customers
FrontendJavaScript weight on product and category pagesThird-party scripts audited; consider a lighter theme

A few Magento-specific notes from audits:

  • JS bundling and merging. Magento's built-in JavaScript bundling often produces very large bundles and can make performance worse on HTTP/2. Test with it on and off rather than assuming it helps.
  • Lighter frontends. Many merchants replace Luma with a lighter theme such as Hyvä, which drops the RequireJS and Knockout stack, or move to a headless frontend. Both are bigger projects, but they address the root cause on the frontend.
  • Extensions. Each extension can add observers, plugins and frontend scripts. Audit extension count yearly and remove what you do not use.
  • Measure with field data. Use Search Console's Core Web Vitals report and CrUX data, not just Lighthouse scores. Our guide to field data versus lab data explains why the two often disagree.

For an overview of what to fix first on any platform, see our guide to Core Web Vitals or our page speed optimisation service.

A worked example: cutting crawl waste on a 30,000-SKU store

Hypothetical example based on a common pattern. A Magento 2 store sells 30,000 products across 400 categories. Search Console's Crawl stats show Googlebot requesting about 180,000 URLs a day, yet only 34,000 pages are indexed and new products take three weeks to appear.

A log file sample shows where the crawl goes:

  • 62% of Googlebot requests hit category URLs with sort, limit or multi-filter parameters.
  • 14% hit category-path product URLs, duplicates of root product URLs.
  • 9% hit /catalogsearch/result/ URLs linked from an old footer search widget.
  • 15% hit canonical product and category URLs.

The team turns off category paths for product URLs, enables both canonical settings, adds robots.txt disallows for sort and multi-filter parameters and internal search, and builds 60 brand and material landing pages to replace the useful filter states. Within eight weeks, the share of Googlebot requests going to canonical URLs rises from 15% to about 70%, and new products typically appear in the index within days instead of weeks. Our guide to large site SEO covers the log analysis behind numbers like these.

Migrating to or from Magento without losing rankings

Migrations involving Magento are common in both directions: Magento 1 stores moving to Magento 2 (Magento 1 reached end of life in June 2020, so anything still on it is overdue), Shopify or WooCommerce stores moving up to Adobe Commerce, and Magento stores moving to Shopify or a headless stack to cut running costs.

The steps that matter most

  1. Export every URL. Crawl the live site, export the URL rewrite table, and pull all URLs with traffic or backlinks from GA4, Search Console and your link tool.
  2. Map old to new, one to one. Products to products, categories to categories. Magento's .html suffix and category paths almost never survive a move to Shopify, which forces /products/ and /collections/ paths, so every URL needs a redirect.
  3. Preserve URL keys where you can. Moving into Magento, import the old slugs as URL keys so paths change as little as possible.
  4. Redirect with 301s, without chains. Point old URLs directly to final destinations, and update old redirects so they do not chain. See our guide to redirect chains.
  5. Carry over metadata, copy and structured data. Titles, descriptions, category copy, reviews and product markup should arrive intact.
  6. Handle filters deliberately on the new platform. Decide which filter states become landing pages before launch, not after.
  7. Launch, then watch. Submit the new sitemap, monitor Search Console coverage and 404s daily for the first few weeks, and keep the old redirect map for at least a year.

If two stores are being combined as part of the move, our guide to merging two websites covers the extra decisions involved, and our website migration SEO guide has the full checklist.

Questions merchants ask about Magento SEO

Is Magento good for SEO?

It is very capable, with full control over URLs, metadata, robots directives and templates. The weakness is that defaults generate duplicate and parameter URLs, and the default frontend is heavy. Configured well, it competes with any platform.

Should I use category paths in Magento product URLs?

For most stores, no. Turning them off gives each product one clean URL and simplifies canonicalisation. If you keep them, enable product canonical tags and make sure each product has a clear primary category.

How do I stop layered navigation creating duplicate content?

Disallow sort and multi-filter parameters in robots.txt, enable category canonical tags, return 404s for empty combinations, and turn high-demand filter states into proper landing pages.

Does Magento generate an XML sitemap?

Yes. Configure it under Stores > Configuration > Catalog > XML Sitemap and create it under Marketing > SEO & Search > Site Map. Schedule regular generation and make sure it lists only canonical URLs.

Is Hyvä better for SEO than Luma?

Not directly for rankings, but its much lighter frontend usually improves real-user loading and responsiveness, which helps Core Web Vitals and conversion. It is a significant project, so test the gain on your own templates.

Where to start on your Magento store this week

Open the Search Engine Optimization settings and fix category paths, canonicals and redirects on URL key changes. Pull a Crawl stats sample from Search Console and a few thousand log lines to see where Googlebot goes. Then decide which filter states deserve landing pages, and block the rest.

If you want specialists to do it, our ecommerce SEO team audits and configures Magento and Adobe Commerce stores, including layered navigation, migrations and performance. Get a quote, or request a custom quote for an ongoing programme.

Further reading on Magento SEO

Sources for this Magento SEO guide

  1. Google Search Central: Managing crawling of faceted navigation URLs
  2. Google Search Central: URL structure best practices for Google Search
Rohit Choudhary
Written byRohit ChoudharyCo-Founder, My SEO Experts

Rohit Choudhary is the co-founder of My SEO Experts and has more than 14 years of hands-on experience in SEO, paid advertising and digital marketing. Since starting out in 2011 he has helped hundreds of businesses grow through practical, data-driven search strategies, and he also serves as a consulting Digital Marketing Director for several US-based companies.

Keep reading

Related articles

Meta Description Templates for Large Sites
Ecommerce

Meta Description Templates for Large Sites

Hand-writing thousands of meta descriptions isn't realistic. Here is how to build templates from real page data that read naturally, avoid duplicates and leave room for hand-written copy on your best pages.

Ready to grow your business online?

Get a free, no-obligation proposal tailored to your goals and budget.

CallFree Quote