Magento 2 SEO: Settings, Fixes and Best Practices

Magento 2 gives you more SEO control than almost any other eCommerce platform. You can edit URL structures, canonical rules, robots directives and sitemap settings per store view. The catch is that the defaults are not tuned for search, and a large catalog with layered navigation can generate thousands of near-duplicate URLs before anyone notices.
This guide covers Magento 2 SEO for US store owners and in-house teams on Magento Open Source or Adobe Commerce: the admin settings to change first, the duplicate content traps that are specific to Magento, how to tune category and product pages, and a repeatable audit routine.
Prefer to hand this to specialists? See our Magento SEO agency services.
Quick Answer
Magento 2 SEO starts in the admin: enable web server rewrites and HTTPS, remove category paths from product URLs, turn on canonical tags for products and categories, and auto-generate an XML sitemap. Then control layered navigation and sort parameters, write unique category and product metadata, and fix speed, which is often the biggest weakness on Magento stores.
Key Takeaways
- Most Magento 2 SEO wins come from a handful of settings under Stores, Configuration, Catalog and Content, Design, Configuration.
- Set “Use Categories Path for Product URLs” to No and enable product and category canonicals to stop one product living at many URLs.
- Layered navigation, sort and limit parameters are the main source of index bloat on Magento catalogs and need a deliberate crawl policy.
- Replace the default meta description mask, write unique category copy and keep configurable product children out of the index.
- Full page caching, production mode and a lighter frontend matter more for Core Web Vitals than any single SEO extension.

How Magento 2 Handles SEO Out of the Box
Magento has strong SEO foundations. It supports editable URL keys, meta titles and descriptions on products, categories and CMS pages, automatic 301 redirects when URL keys change, canonical tags, a built-in XML sitemap generator and a configurable robots.txt. You can build a clean file with our free Robots.txt Generator. Because settings can be scoped to a website or store view, you can run several brands or regions from one install.
The weaknesses come from flexibility and weight. A default install can expose the same product through several category paths, generates crawlable filter and sort URLs, and ships with a heavy default theme. Magento Open Source also does not output hreflang tags natively in most versions, so international stores need an extension or custom code. Our free Hreflang Tag Generator builds the full set of tags for you.
The SEO settings below are the same in Adobe Commerce and Open Source. On an older store, assume past developers changed some of them and check each one.
The Core Magento 2 SEO Settings to Configure
These are the settings to review first. Menu labels can shift slightly between 2.4.x releases and extensions, so treat the paths as a guide and confirm at the right scope (default, website or store view).
| Setting | Where to find it | Recommended value |
|---|---|---|
| Use Web Server Rewrites | Stores > Configuration > General > Web > Search Engine Optimization | Yes, so URLs do not include index.php |
| Use Secure URLs on Storefront | General > Web > Base URLs (Secure) | Yes, with HTTP redirecting to HTTPS |
| Add Store Code to URLs | General > Web > Url Options | No, unless you use store codes for regions on purpose |
| Use Categories Path for Product URLs | Catalog > Catalog > Search Engine Optimization | No |
| Use Canonical Link Meta Tag for Categories and Products | Catalog > Catalog > Search Engine Optimization | Yes for both |
| Create Permanent Redirect for URLs if URL Key Changed | Catalog > Catalog > Search Engine Optimization | Yes |
| Product and Category URL Suffix | Catalog > Catalog > Search Engine Optimization | Keep whatever is live; only change with a redirect plan |
| Default Robots | Content > Design > Configuration > Search Engine Robots | INDEX, FOLLOW on production, NOINDEX on staging |
| XML Sitemap generation | Catalog > XML Sitemap, then Marketing > SEO & Search > Site Map | Enabled, generated on a cron schedule |
A note on URL suffixes
The .html suffix on product and category URLs does not hurt rankings. Removing it on an established store changes every URL on the site, which means a full redirect map and a temporary dip while Google reprocesses everything. Only remove it as part of a planned migration or replatform, and test the redirects on staging first.
Staging and development stores
Set staging sites to NOINDEX, NOFOLLOW and protect them with a password. A crawlable staging copy duplicates your whole catalog.
Fix Duplicate Content: Product Paths, Filters and Sort Parameters
Duplicate URLs are the defining Magento 2 SEO problem. Left alone, a large catalog can produce many times more crawlable URLs than it has products, wasting crawl budget and splitting signals.
Category paths in product URLs
With category paths enabled, a product in three categories can resolve at /product.html and at each /category/product.html path. Setting “Use Categories Path for Product URLs” to No makes Magento link to the short URL, and enabling product canonicals points any remaining variants to it.
One side effect: breadcrumbs may show only Home and the product name when the category path is not in the URL. If breadcrumbs matter for your navigation, fix this in the theme or with a breadcrumb extension rather than turning category paths back on.
Layered navigation filters
Magento’s layered navigation adds query parameters such as ?color=49 or ?price=20-30 to category URLs. Combinations multiply quickly: five filters with ten values each can create thousands of crawlable pages for a single category. Decide which filtered views deserve to rank, such as a color or brand with real search demand, and give those a static landing page or a clean SEO-friendly filter URL through an extension.
For everything else, keep the canonical pointing to the main category and limit crawling of the parameter combinations. Our guide to faceted navigation SEO explains how to choose between canonicals, noindex and robots.txt rules for filters.
Sort, limit and mode parameters
Toolbar parameters such as product_list_order, product_list_dir, product_list_limit and product_list_mode create more variations of every category. These pages never deserve to rank. Block them in robots.txt once you have confirmed they are canonicalized, and make sure internal links never point to them.
Pagination
Category pagination uses ?p=2, ?p=3 and so on. Google recommends that each paginated page has a self-referencing canonical rather than pointing to page one, so check what your theme outputs. If page two canonicalizes to page one, products that only appear deeper in the category may be crawled less often.
Optimize Magento Category and Product Pages
Replace the default metadata masks
Under Catalog, Catalog, Product Fields Auto-Generation, Magento fills empty meta titles and descriptions using masks such as the product name followed by its description. The result is often a meta description that starts mid-sentence or includes HTML fragments. Set a cleaner mask for new products, then export your catalog and rewrite metadata for your top sellers by hand.
Category pages
Categories are usually your best chance to rank for broad commercial terms. Give each important category a unique meta title, a short intro above the product grid and a longer FAQ or buying guide below it. Make sure the category is set as an anchor category if you want layered navigation to show products from subcategories. For a deeper framework, see our guide to category page SEO.
Product pages
Write unique product descriptions instead of pasting manufacturer copy, add descriptive alt text to each image in the product gallery and keep URL keys short and readable. Our product page SEO services cover this at catalog scale.
Configurable products and visibility
For configurable products, set the child simple products to “Not Visible Individually” so only the parent has a URL. If child products are visible in search or catalog, you get thin duplicate pages for every size and color. Check this in bulk, because imports often reset visibility.
Out-of-stock and discontinued products
Magento lets you choose whether out-of-stock products display at all, under the inventory stock options. Hiding them can turn indexed URLs into 404s overnight. Keep temporarily unavailable products live with alternatives shown, and redirect permanently discontinued items to the closest replacement. Use a 410 or 404 only when there is no sensible replacement.
Robots.txt, XML Sitemaps and Indexing Control
Magento generates robots.txt from the Search Engine Robots section of the design configuration, so you can edit it per website without server access. A sensible starting point disallows paths that should never be crawled:
- /checkout/ and /customer/ account pages
- /catalogsearch/ internal search results
- /wishlist/ and /catalog/product_compare/
- Sort and limit parameters, once canonicals are confirmed
Do not block CSS, JavaScript or media folders. Google needs them to render your pages properly.
For the XML sitemap, enable cron-based generation, include product images if your images are a traffic source and submit the sitemap URL in Google Search Console. Spot-check that the sitemap only lists indexable, canonical URLs: no disabled products, no “Not Visible Individually” children and no redirected URLs.
Google’s own guidance on crawling and indexing in Google Search Central is the best reference when deciding between robots.txt, noindex and canonicals.
Speed and Core Web Vitals on Magento 2
Speed is often where Magento stores lose the most ground. The default Luma theme is JavaScript-heavy and extensions add more, so start with the basics.
- Run in production mode and deploy static content properly. Developer mode on a live site is slow and surprisingly common.
- Use full page cache with Varnish (set under Advanced, System, Full Page Cache) and put a CDN in front of the store.
- Minify and merge CSS and JavaScript carefully. Test bundling settings on staging, because they can break checkout or slow pages down.
- Optimize images: compress uploads, serve modern formats where your stack supports them and size product images to the display dimensions.
- Audit extensions: remove unused modules and check which ones inject scripts on every page.
- Consider a lighter frontend: themes such as Hyvä replace much of the default frontend stack and are a common route to better Core Web Vitals, though switching is a development project in its own right.
Our Core Web Vitals fix-it guide explains how to read field data and prioritize LCP, INP and CLS fixes.
Structured Data, Multi-Store and International SEO
Product structured data
Default Magento templates include only partial schema.org markup, and many custom themes break it. Add complete Product markup with name, image, description, SKU, brand, GTIN where you have one, offers with price, currency and availability, and review data if you collect reviews on the page. Add BreadcrumbList and Organization markup too. Validate with Google’s Rich Results Test after every theme release.
Multiple store views and hreflang
If you run separate store views for the US, Canada or other markets, each needs its own URLs, currency and, ideally, localized copy. Because hreflang is not native in most Magento Open Source versions, use a reputable extension or custom module, and check that every hreflang URL returns a 200 and canonicalizes to itself.
A Magento 2 SEO Audit Routine
Magento stores drift. Imports, extension updates and theme releases quietly undo SEO settings. Run this routine quarterly and after any major release:
- Crawl the site with a desktop crawler and compare the URL count with the number of enabled, visible products, categories and CMS pages.
- List parameter URLs found in the crawl and confirm each pattern is canonicalized, blocked or intentionally indexable.
- Check the Pages report in Search Console for spikes in “Duplicate without user-selected canonical” or “Crawled, currently not indexed”.
- Re-verify the settings in the table above at every scope, since store-view overrides are easy to miss.
- Test a sample of product and category pages for title, meta description, H1, canonical, structured data and image alt text.
- Pull Core Web Vitals field data for your main templates and compare with the previous quarter.
- Review the URL Rewrites grid for redirect chains and loops, especially after category restructures.
If you want an outside team to run this, our eCommerce SEO audit covers Magento crawl, indexing and template issues and returns a prioritized fix list. For the platform-agnostic version of these checks, see our eCommerce technical SEO guide.
FAQ
Is Magento 2 good for SEO?
Yes. Magento 2 offers editable URLs, metadata, canonical tags, automatic redirects, XML sitemaps and robots.txt control per store view. Its weaknesses are duplicate URLs from layered navigation and slow default themes, which need configuration and development work to fix.
Should I use categories path for product URLs in Magento 2?
In most cases, no. Turning it off gives each product one short URL instead of one per category, which reduces duplicate content. Pair it with product canonical tags so any remaining variants point to the main product URL.
Do I need an SEO extension for Magento 2?
Not for the basics. Core settings handle URLs, canonicals, sitemaps and robots.txt. Extensions help with hreflang, SEO-friendly layered navigation URLs, richer structured data and bulk metadata templates, so add them only for specific gaps.
Should I remove the .html suffix from Magento URLs?
Usually not on an established store. The suffix does not hurt rankings, and removing it changes every URL, which requires a full redirect map. Consider it only during a planned migration or redesign.
How do I stop Magento layered navigation from creating duplicate pages?
Keep canonicals pointing filtered URLs to the main category, block low-value parameter combinations in robots.txt once canonicals are confirmed, and create dedicated landing pages for the few filter combinations with real search demand.
Is SEO different on Adobe Commerce than Magento Open Source?
The core SEO settings are the same in both editions. Adobe Commerce adds features such as content staging and B2B tools, and cloud plans include CDN infrastructure, but URL, canonical, sitemap and robots.txt settings work the same way.
Conclusion
Magento 2 SEO rewards teams that treat configuration as an ongoing job. Fix the core settings, control duplicate URLs from category paths and layered navigation, give categories and products unique content, and invest in speed. Then audit regularly, because imports and releases will undo some of that work if nobody checks.
If you want experienced help, our Magento SEO team handles configuration, technical fixes and content for US stores, or you can request a free audit to see where your store stands.
Related reading
Ready to Grow Your Organic Traffic?
Let VYRO build and execute the right SEO strategy for your business - from local to international.
