search engine optimization

In 2026 search and users' search behaviour are driven by AI and conversational queries. That means Magento SEO best practices change fast.

Although Magento has a lot of built-in SEO features, they're no longer enough on their own. To rank, drive clicks and get featured in AI overviews and cited by LLMs like ChatGPT and Perplexity, you need a more structured SEO strategy.

In this Magento SEO guide, you'll learn how to optimise for technical, on-page and off-page SEO and how to structure your content for search engines and AI models.

If you want a shortcut, Magento 2 SEO Extension by Magefan covers most of these optimisations. Otherwise, let's start.

Default Magento SEO Settings

Magento comes with some solid built-in SEO features that serve as a foundation for Magento SEO best practices. While they won't replace your entire SEO strategy, it's essential to configure them properly for crawling, indxing and ranking.

  • XML sitemap: generate and auto-update XML sitemap in Magento. It helps search engines discover and crawl your catalogue and content pages more effectively, especially on large catalogues. 
  • Canonical tags: avoid duplicate content issues on product and category pages using the built-in canonical tags. They help search engines identify the primary version of a page.
  • Robots.txt and meta robots: control what pages search engines can index. Blocking data-sensitive pages like checkout, customer account, and search resullts save your crawl budget and makes crawling more effective.
  • Meta titles and descriptions: set a unique title and description for each page on your store. It gives crawlers more information about your pages and displays them in search results to drive clicks to your listing.
  • Rich snippets (structured data): Magento sets some basic structured data (price, rating, SKU) for products by default. It improves how the product appears in search results, though you still need the Magento 2 Rich Snippets extension for the extended markup.
  • SEO-friendly URLs: control how your store URLs look. Remove the .html suffix, add/remove category paths from URLs, and enable rewrites in Magento. Clean and structured URLs improve indexing and usability.
  • Redirects and URL rewrites: preserve SEO quality with automatic 301 redirects on URL change or create redirects manually.

To configure each of these default features properly, follow the Magento SEO advice below. We discuss the best practices for each in more detail.

How to Optimise Magento for AI?

Optimising Magento for AI-powered search results is about making your content easy to understand, evaluate, categorise, and rank. And for that you need to make it structured, clear and context-rich. 

But the main question remains: 

Does AI optimisation replace Magento SEO best practices?

No. Optimising your Magento for AI models and LLMs does not replace traditional SEO practices. Technical and on-page SEO optimisation still matters. It's the "how search engine interpret your content" that's changed. And that's what you need to pay attention to while you do SEO for Magento. 

However, there are some tips for AI optimisation in Magento you should keep in mind:

  • Structure content for readability: structure product content in tabs and use clear H2/H3 headings with answer-like paragraphs. It helps AI understand your pages better and increases your chances of appearing in search results. 
  • Add structured data: use product, breadcrumb, FAQ and HowTo schema to help AI and search engines extract detailed information about your page.
  • Improve internal linking: use contextual links and breadcrumbs to connect related products and categories. This inform AI models about the relationships between your pages and helps it to understand your store hierarchy. 
  • Use semantic keywords: use synonyms, related keywords and natural language in product and category descriptions. Semantic signals help AI understand user intent and deliver your pages to relevant queries. 
  • Feature your top pages in Magento LLMs.txt: create topical clusters and push your top pages to LLMs like ChatGPT, Perplexity and Gemini. It helps AI systems to extract and synthesise content better.
  • Create content for AI search features: add clear step-by-step headings and FAQs to increase the chances of LLMs citing you and featuring you in search snippets. 
  • Get brand mentions and backlinks from reputable sources: the more your brand is talked about and linked to, the more authoritative AI sees you. 

Do all these sound like SEO? They do because SEO best practices and things that matter to AI systems overlap. That's why websites that mastered SEO do well in AI search with little to no tweaks to their SEO strategy.

What it means for you is — follow this Magento SEO guide and optimise for technical and on-page SEO while keeping your content clearly structured.  The results will follow naturally.

Technical Magento SEO Best Practices

To show your content on Google, search crawlers need to crawl and index your website. That's what technical SEO is responsible for.

It's a common misconception that "technical SEO" is hard to work with, especially if you're not a developer. It might be. But not in Magento. 

There are a lot of aspects the platform allows you to cover directly from the admin panel. So, you don't have to be a developer or and SEO expert. This Magento SEO guide has you covered. 

1. Improve website speed

Google prioritises fast-loading pages. That's why speed optimization is the first thing you should put on your SEO checklist. 

Explore different speed testing tools to learn what point you're at right now. Then build an improvement roadmap to speed up Magento

Best practices for Magento website speed:

  • Invest in a reliable hosting provider
  • Remove unnecessary extensions
  • Optimize image size and format
  • Defer JS and CSS loading (when possible)
  • Use critical CSS
  • Configure page cache and Varnish

Even though you complete all the points we describe in this guide, you have a much higher chance of ranking if your website is fast. Don't underestimate that.

2. Edit robots.txt file

Magento 2 robots.txt file tells search crawlers whether you want your pages crawled or ignored. That's the first thing they check before crawling your website.

Thus you can point search crawlers in the right direction and keep them away from certain URLs to optimise the crawl budget.

Magento 2 robots.txt

Robot.txt configuration in the Magento admin

Robots.txt SEO tips for Magento:

  • Restrict crawlers' access to sensitive pages like login, checkout, shopping cart, customer account, etc.
  • Don't allow crawling internal pages
  • Include XML sitemap into robots.txt
  • Don't allow indexing irrelevant pages

3. Audit meta robots

Although you set the "allow" and "disallow" directives in the robots.txt, you still need meta robots in Magento. They provide instructions about crawling and indexing a particular page.

meta robots

Example of the meta robots in the page code

So, meta robots are among the top Magento SEO tips since they define what pages to crawl, index, skip from indexing and display in search results. 

Magento meta robots best practices:

  • Don't add meta robots to pages you already blocked in robots.txt
  • Make sure"noindex" pages are not included in the XML sitemap
  • Remove "noindex" directive when moving to production
  • Use "noindex,follow" directive for internal search results pages
  • Add "noindex" directive for URLs with query parameters (e.g. filterable results in layered navigation)

4. Generate an XML sitemap

Magento XML sitemap is a map with all your website links. It's essential for your Magento SEO since it's a primary way for Google to discover your website pages.

Magento allows you to generate a sitemap directly in the admin panel. Besides, the frequency and priority options for indexing are already configured for you. 

Magento 2 XML Sitemap List

Magento XML sitemaps grid

So all you need to do is generate the XML sitemap and enable the automatic sitemap generation in the settings. Then submit the Magento sitemap XML to Google Search Console and give it some time to discover your pages.

Tips for XML sitemap:

  • Update your sitemap regularly
  • Keep sitemap size under 50MB
  • Don't include more than 50,000 URLs in a single XML sitemap file (you can divide it into multiple sitemaps)
  • Don't include pages blocked by the robots.txt in the sitemap
  • Reference XML sitemap in robots.txt

5. Create an HTML sitemap

Unlike the XML sitemap, the HTML sitemap is used to improve navigation for website users. Nonetheless, it can also benefit search crawlers if you structure it properly and include all important URLs there.

Unfortunately, Magento doesn't have the HTML sitemap by default. So you need to rely on the  HTML Sitemap Extension.

magento html sitemap

Example of the Magento HTML sitemap

Tips for HTML sitemap:

  • Create one HTML sitemap if you have a small website
  • Create multiple HTML sitemaps if your website is large
  • Don't display all website links in an HTML sitemap at once (enable lazy loading or other methods to avoid loading delays)
  • Add top-priority pages at the top of the HTML sitemap
  • Enable search within the HTML sitemap

6. Extended structured data (rich snippets)

Structured data markup or rich snippets is a code with all the page details added to the HTML code. It helps search engines get more details about your pages and determine if they respond to the searcher's request better.

Additionally, it helps Google to show you featured snippets or rich results based on the markup.

Product Rich Snippet in Magento

Example of the product structured data settings in Magento

e.g. some examples include reviews, rating, organization, breadcrumbs, author, page type, howto, FAQ etc.

In default Magento you only have reviews and ratings. But you can also add multiple other rich snippets directly from the admin panel.

7. Review URL structure

A good rule of thumb is to keep your URLs descriptive, short, and lowercase. This makes them less intimidating for website visitors and easier to read for web crawlers. Besides, your URLs need to be keyword-optimized to tell Google what your page is about.

e.g.

  • A good URL example would be: https://mystore.com/jackets/hyper-elements-jacket
  • Avoid URLs like this: https://mystore.com/cms/page/view/page_id/354

However, it's not easy to get URL structure like that with default Magento settings since it adds a lot of unnecessary things to them.

HTML extension in products and categories

By default, Magento adds the .html extension to all website URLs. While the .html doesn't influence the SEO ranking much, cleaner URLs are still preferred. Besides this extension can cause a lot of issues down the road (when you decide to migrate to a different eCommerce platform). So it's recommended that you remove it. 

magento product url suffix

Replacing the .html extension in Magento catalogue SEO settings 

Note: remove the .html extension only if you're starting out. Remove it for existing stores leads to URL migration which you need to avoid.

No categories in URLs

Magento doesn't include categories in the product URLs by default since it includes sub-categories as well. If you have a lot of these, your URLs can get lengthy too quickly. Bulky URLs are hard to read and even appear spammy when your subcategories have similar names. 

categories in product urls magento

Removing categories from product URLs in Magento catalogue settings

URL redirects and rewrites

URLs change. The page stops existing, you change the URL to make it more SEO- friendly, etc. Regardless of the reason, you always should redirect traffic from the old URL to the new one. Unless you do that, people will land on the 404 pages and leave.

  • Magento allows you to Use Web Server Rewrites to make URLs more readable.
Use web server rewrite in Magento

Web server rewrites option

  • Besides, you can create a redirect automatically on any URL change if you tick a corresponding option.
create permanent redirect in magento

Option to create permanent redirects on URL change

  • Finally, you can manually create 301 and 302 redirects using the built-in tool. 
Magento 301 redirect

Creating 301/302 redirects in Magento

But if you want to get more of the Magento redirects, configure the auto-redirects or create the redirect rules.  

8. Improve navigation

While navigation helps customers find products faster, it can cause significant SEO challenges for search robots.

Facet (layered navigation)

Each product filter adds a parameter to the URL making each of these URLs unique to web crawlers. Except for crawling all of these pages, search bots can find that they're that much different from one another. 

Not only are you wasting your crawl budget, but facing duplicate content penalties. 

URL of the layered navigation page

Example of the URL with the layered navigation filters

As we've recommended before, you should add the NOINDEX directive to the URLs with query parameters. But in the case of the layered navigation, you can remove these pages from indexing using the robots.txt, noindex robots or canonical tags. 

Pagination

Another form of navigation is pagination on categories or blog pages. Unlike in faceted navigation, you don't need to block these pages from indexing. It's enough to specify the relationship between them for search engines. 

Tips for pagination pages:

  • Include next/prev attributes
  • Add self-referencing canonical tags for paginated pages
  • Don't block paginated pages through robots.txt or meta robots NOINDEX directive 

9. Configure a secure HTTPS connection

If you want to earn your visitors' trust, serve them through a secure HTTPS connection. Moreover, Google says to prioritize the HTTPS websites over the HTTP. Make sure you have the following configured under Stores > Configuration > General > Web:

  • Base URL and Base Link URL start with HTTPS
  • Use Secure URLs on Storefront > Yes
  • Use Secure URLs in Admin > Yes

Pro tip: ensure that the traffic lands on the correct content by redirecting traffic from HTTP to HTTPS. Set the Auto-redirect to Base URL option to Yes (301 Moved Permanently).

10. Set OG tags and Twitter cards

While Open Graph (OG) tags and Twitter cards don't have a direct impact on SEO, they are still worth mentioning in this list of the best Magento SEO tips. These tags, also known as social media tags, influence how your link appears when shared on social networks. 

Instead of just a plain text form, your link appears with the title, description and image when using the social media tags. Your links are more appealing, get more clicks and brand recognition which correspondingly influences SEO.

Facebook Post Without OG Tags Open Graph Meta Tags on Facebook
Facebook post without open graph tags Facebook post with open graph tags


That's why we recommend implementing these directly from the admin using tools like Magento Facebook OG Tags.

11. Optimize for mobile

Google's focus has been shifting to mobile-first indexing in the past few years. So, your website being fast and optimised on the desktop doesn't guarantee rankings if your mobile version is slow. 

Besides, a lot of online shoppers make purchases from their mobile devices. Keep this in mind when optimising your store next time.

On-page Magento SEO Best Practices

On-page SEO is a process of optimizing website content and HTML code for search engines, and users. It usually includes working with elements like internal links, meta tags, URLs, canonicals, images and other content. 

In other words, on-page SEO works with elements directly on the page. And that's what we'll cover next as part of our Magento 2 SEO best practices.

1. Do keyword and competitor research

People click on your page in search if it answers their query. But it's on Google to determine if your pages have all the right answers searchers might be looking for. 

That's why the first step you take in your on-page SEO journey is keyword and competitor research. Use tools like Google Keywords Planner, Ahrefs or Sertstat to do the work.

Find keywords you want to rank for and see what your competition is doing. What are their top pages, what keywords do they rank for, and what types of content do they create? Then just do better.

keyword research

Example of the keyword research report with low-volume keywords

Tips for keyword research:

  • Use low-volume keywords — it's easier to rank for them 
  • Choose one primary keyword per page
  • Consider the intent behind the searches, not just the monthly volume
  • Choose long-tail keywords for your content

2. Enable canonical tags

If you have pages with similar content, you are at risk of being penalised for the duplicate content. Only if you don't use canonical tags. These are the tags that indicate the main version of the page (for products with different variants or categories with pagination). 

Magento Canonial Meta Tags

Canonical tag settings for products and categories in Magento 2

It's possible to add Magento 2 canonical URLs to products and categories by default. But to add them to the other pages you need to resort to some third-party tools.

3. Optimize meta titles and descriptions

You don't have to be in the top first position in SERP to drive more clicks. You can still do that by being in the second or third positions if you optimise your meta tags — title, description and keywords. You can do that in the Search Engine Optimization section on all Magento pages. 

magento product seo

Example of the meta title and description that exceed the recommended number of characters

Meta tags are extremely important since they convince searchers to click. And the more clickable they are the more traffic you get. 

However, it can get overwhelming to set meta tags manually for all products and categories. Try Magento meta tags rules to create meta titles and descriptions in bulk next time. 

Meta titles and descriptions best practices: 

  • Include your target keyword in both your title and description
  • Don't exceed the 50-60 character limit for the meta title and 150-160 for the description
  • Add target keywords closer to the beginning

4. Enable breadcrumbs

We've mentioned breadcrumbs partially when we talked about the structured data since they are displayed in search. But they benefit not only search crawlers. 

Breadcrumbs show a page in the website architecture and allow visitors to quickly navigate back to the category, blog or homepage. So it's important to optimise this element for the on-page SEO.

magento breadcrumbs

Magento breadcrumbs

5. Optimize product descriptions

In the SEO terms, product description is one of the most important elements on the page. When crafted properly, it can bring and keep you listed at the top of SERP. But that's what most merchants get stuck at.

Optimizing product descriptions with keywords only won't get you to the top. You should keep a couple of things in mind when creating your product descriptions.

Magento SEO tips for product descriptions:

  • Never use the manufacturer descriptions unless you want to be penalized for duplicate content
  • Break the product into paragraphs and use the H titles properly
  • Remember: you write for people, not search engines
  • Maintain keyword density of 3%, don't overdo it
  • Include the target keyword within the first 100 words
  • Divide content between Magento product tabs so it's easier to find relevant content

6. Edit category content

Although categories are not your primary selling pages, you can use them to drive traffic. Since Magento has a category description section, use that to increase the category keyword density and make your category rank higher.

Add the description at the top, answer some FAQs at the bottom, and include an information banner. But don't overdo it.

Besides you can enable the category structured data. So your products appear in the search along the category and drive more attention.

7. Optimize images and videos

Search crawlers can see your images too. So a properly optimised title and alt-tags can increase the chances of your product appearing in the Google image search.

The same goes for videos. Optimize video titles and descriptions with keywords to help it rank better. You can do that in the product Images and Videos section in the admin.

magento image alt text

Magento image alt text

But don't forget to lazy load both of these so they don't cause any loading issues.

8. Set hreflang tags (for multi-language stores)

Hreflang tags are a part of the Magento SEO checklist that often gets overlooked. If you have different pages in multiple languages, why not use them to their fullest potential? Hreflang tags help search engines to pull out the localized version of a page in search results, based on the users' query. 

Based on that, hreflang tags allow you to reach a wider audience while improving your Magento SEO. 

Hreflang Attributes on Magento 2 Product Page

Hreflang tags on Magento product page

Usually, you add hreflang tags to your HTML code or sitemap. But since we promised our Magento SEO guide is user-friendly, you can use the Magento 2 Hreflang Tags tool to add them directly in the admin panel.

Tips for hreflang tags:

  • Always include self-referencing x-default tag
  • Add country codes to hreflang tags if you target different language variants (GB English, AU English, US English)
  • Divide hreflang tags between websites into groups to avoid issues

Off-page Magento SEO Best Practices

Off-page SEO in Magento a process of increasing the website ranking through activities outside of the website. It's a marketing strategy aimed at getting backlinks from relevant sources, social media shares and mentions from other websites. 

This strategy increases the authority and trustworthiness of the website and boosts your SEO.

1. Be more active on social media

While social media doesn't influence the search rankings directly, it drives traffic to your store and increases engagement with your store. This in turn signals to Google and LLMs that your website is relevant and deserves its attention.

Social media is an entirely new area, so it requires some effort to succeed. 

Tips for social media marketing:

  • Choose a platform that works best for your niche
  • Create audience-specific content (short-form content performs best on Instagram and Tiktok, while long-form is best for YouTube)
  • Use the OG tags we've talked about earlier to make your posts more "clickable" on social networks
  • Engage with your audience, ask questions and encourage interaction
  • Try social media advertising

The main goal of off-page SEO is to gain links from reputable websites to increase your trustworthiness. There are multiple different ways to build backlinks to your store:

  • create valuable content others will like to share
  • reach out to the industry experts, influences and bloggers and offer your content as a resource
  • participate in forums and other online communities and share insights with the link to your website when appropriate
  • find websites that mention your brand, but don't provide a link and ask them for a backlink
  • write a piece of content for reputable websites as a guest post and ask for a backlink to you
  • create content such as infographics, free tools, and studies that drive links naturally
  • research what backlinks your competitors have, create a better version of the same type of content and ask the source to link back to you

Magento SEO Tips: What's Next?

While some options might be easier to optimize than others on this Magento SEO guide, one thing remains the same for all — you need to track every change you make. It allows you to see the results and tweak your strategies accordingly, especially when it comes to the on- and off-page SEO. 

For that, you'll need the most common Google Search Console and Google Analytics 4. The former allows you to submit your website to Google and points to the indexing issues you're facing. The latter provides insights into your store performance in terms of traffic, conversions and customer behaviour. 

But if you want to get it one step further with these two, try our Magento 2 Google Indexing API and Magento 2 Google Analytics 4.

In either case, remember that better SEO doesn't happen overnight. It's a process that yields results in the long term. So don't get discouraged when you don't see results right after making changes. Just keep working on this Magento SEO tips and see that traffic grow.