This Magento 2 SEO guide walks through the settings that matter, with the admin path for each: rewrites, meta tags, URL keys, canonicals, image alt text, sitemap, robots.txt, caching and structured data. Work through them in order on a staging site, then go live.
Magento 2 (Adobe Commerce) gives you control over almost everything. That also means plenty of room for mistakes.
Menu names can differ slightly between versions, so check your own admin. Always test changes on staging before touching a live store.
For the strategy behind these settings, read Magento SEO best practices. For a quick tick-list, use the Magento SEO checklist.
I’m Nazirul Islam Nakib, and I help ecommerce stores with Magento SEO.
1. Basic SEO settings
Web server rewrites
Go to Stores > Configuration > General > Web > Search Engine Optimization and set Use Web Server Rewrites to Yes.
This removes index.php from your URLs. They become cleaner and easier to crawl.
Base URL and redirects
Choose www or non-www and stick to it. Mixed versions create duplicates.
Under Stores > Configuration > General > Web, use HTTPS for your base URLs and enable the redirect to the base URL.
HTML head defaults
Under Content > Design > Configuration, edit your store view and open HTML Head. Set the default title, description and a sensible title prefix or suffix.
Don’t leave the Magento defaults in place.
2. Meta tags
Product meta tags
Magento 2 can auto-generate product meta titles and descriptions with templates. Look under Stores > Configuration > Catalog > Catalog > Product Fields Auto-Generation.
Placeholders such as {{name}} and {{sku}} save time on big catalogues. But they apply broadly, and long product descriptions can produce awkward meta descriptions.
For your top products, write meta tags by hand in Catalog > Products > edit > Search Engine Optimization.
Category meta tags
Edit these in Catalog > Categories > Search Engine Optimization.
Category pages often bring your best commercial traffic. Give each a unique title and description.
Home page title
Magento’s sample home page may be titled “Home Page”. Change it under Content > Pages, and include your main keyword and brand.
3. URL keys
Edit the URL Key in each product’s Search Engine Optimization section.
Use lowercase words with hyphens. Keep it short. Skip filler words.
Keep category paths shallow too. Long, deeply nested URLs add nothing.
If you change a URL key, Magento can create a redirect. Make sure that option stays ticked.
4. Canonical tags
Go to Stores > Configuration > Catalog > Catalog > Search Engine Optimization.
Set Use Canonical Link Meta Tag For Categories and For Products to Yes.
This tells Google which version of a page is the main one. It reduces duplicate content from sorting, filters and alternative paths.
On the same screen, consider turning off Use Categories Path for Product URLs, so each product has one URL.
5. Image alt text
Add alt text in Catalog > Products > edit > Images and Videos.
Describe the image in plain words: “black leather messenger bag for men”. Don’t stuff keywords.
Also change the default logo alt text to your brand name. Start with your best-selling products, then work down the catalogue.
6. XML sitemap
Set the options under Stores > Configuration > Catalog > XML Sitemap.
Generate the file in Marketing > SEO & Search > Site Map. Submit it in Google Search Console.
Keep it limited to pages you want indexed. Schedule regeneration so new products appear without delay.
7. Robots.txt
Edit it under Content > Design > Configuration > edit > Search Engine Robots.
Common rules block cart, checkout, customer account and internal search paths:
Disallow: /checkout/
Disallow: /customer/
Disallow: /catalogsearch/
Disallow: /wishlist/
Be careful not to block product or category pages. Add your sitemap URL to the file.
8. Speed
Page speed affects both rankings and conversions.
- Use Full Page Cache under Stores > Configuration > Advanced > System. Varnish is recommended for production.
- Use a CDN for static files.
- Resize and compress images before upload. Use WebP where you can.
- Review JavaScript and CSS settings. Some of these are only visible in developer mode, so ask your developer.
- Remove extensions you don’t use.
- Consider a lighter theme such as Hyvä.
Test with PageSpeed Insights and watch LCP, INP and CLS. For help, see Core Web Vitals.
9. Structured data
Magento outputs basic Product data, but it is often incomplete.
Check that you have:
- Product schema with price, availability and reviews.
- Breadcrumb schema.
- Organization schema on the home page.
- LocalBusiness schema if you have physical stores.
Extensions such as Mirasvit or Amasty can add more. Validate the output with Google’s Rich Results Test. See schema markup.
10. Multi-language stores
If you sell in several languages or countries, you need hreflang tags so Google shows the right version.
Magento doesn’t handle this fully out of the box. Use an extension or a custom setup. See international SEO.
11. Content and AI search
Settings alone won’t rank a store. You also need useful category copy, buying guides and clear answers.
AI tools such as ChatGPT, Gemini and Perplexity pull from clearly written, trustworthy pages. Write answer-first and keep your brand details consistent. Read about AI SEO.
Frequently asked questions
Where are the SEO settings in Magento 2?
Mostly in Stores > Configuration (under General > Web and Catalog > Catalog), in each product or category’s Search Engine Optimization section, and in Content > Design > Configuration.
Do I need an SEO extension for Magento 2?
Not for the basics. Extensions help with templates, structured data and filter handling on larger catalogues.
Should I remove .html from Magento URLs?
Only on a new store, or with a tested redirect plan. Changing it on a live store can cause ranking losses.
Is Magento 2 still good for SEO?
Yes, when it’s configured well. It gives you more control than most platforms.
Need a second pair of eyes? Ask for a free website audit or hire an SEO expert. You can also browse the ecommerce SEO page or go to the home page.
