Magento 2 SEO Guide: Setting, Optimization Tips Your Website
Magento 2: Key SEO Tips
Magento 2 is still one of the most widely used CMS platforms for ecommerce websites. It’s used by thousands of businesses including many of our clients.
This guide will show you how to enable various that are important for SEO and what to consider to optimize your Magento 2 site for organic search.
Information Architecture
Subfolder flexibility
Magento 2 supports customisable subfolders. This means there are no forced /category/ and /collection/ URLs.
While flexibility can be a positive thing, duplicate content can become a problem if it is not managed well. This could be due to marketing departments creating new subfolders or the difficulty of tracking the size of large Magento shops. These are some examples:
- /new-in-shoes/
- /best-sellers-shoes/
- /black-friday-shoes/
Variants of products
In Magento, products can be displayed in your store either as simple or configurable items.
- Simple
- Configurable
Simple products
Magento 2 adds physical products to the marketplace. These simple products have their SKU values and permalinks. Google Shopping can benefit from this because each product can be entered individually to appear on the platform.
If a product is displayed in your store as a simple product, each product will be unique.
- Blue slimsuit mens shirt
- Red slimfit mens shirt
- Men’s yellow slimfit shirt
Configurable products
A configurable product allows you to have many different products under one umbrella. This gives you the ability to select the product type that interests you without changing the URL.
A configurable product could be, for example, “Men’s Slimfit Shirts”. It can be accessed via one URL and has the option to create a custom order.
- Blue
- Red
- Yellow
These products are available in the backend of your site as simple products. However, there is only one URL on your site.
- Men’s blue slimfit shirt
- Men’s Red Slimfit Shirt
- Men’s yellow slimfit shirt
For certain elements, such as sizing, configurable products can be very useful.
SEO: Simple or Configurable Products
Your ecommerce store’s size will determine whether you use configurable or simple products. Its authority and organic reach.
Simple products make it easier to target more specific keywords (for example, the keyword “mens slimfit shirts” could be directly targeted through this product page). They can also create many URLs which can make it difficult for search engines to crawl your site.
These questions will help you decide whether to use configurable or simple products on your ecommerce website.
- What are your product sales?
- What authority does your website have?
- Is there a product area that could benefit from more targeted targeting?
A simple, or a configurable rule of thumb
Each site is unique, but a general rule of thumb says that smaller sites will struggle to rank for higher-competitive keywords like “men’s slimfit shirts”, so they should focus on simple products. This will allow them to rank better for longer tail keywords that are less competitive.
Configurable products are recommended for larger sites that rank higher in competitive keyword searches. This will increase authority for categories and decrease crawling of similar pages, which can impact crawl budget.
This should be done category-by-category and should always include SEO input.
Basic Optimisation
Page title and meta description limits
Magento 2 allows you to modify and optimize meta data. You can modify the Search Engine Optimization options for products, categories and CMS pages:
Catalog > (Categories, Products) > Select page > Edit > Search Engine Optimization.
To ensure that page titles are not removed in the SERPs, they should not exceed 70 characters.
Meta description boxes allow up to 250 characters. However, the maximum length for SEO purposes is limited to 160 characters (the actual limit depends on pixel width).
Apps are available that create meta templates for specific page types on a site. This is a great way to save time on large ecommerce websites with thousands of products.
Internal Linking
Duplication of pages
By default Magento 2 creates 2 pages for a product:
/category/product/
/product
SEO problems can arise if this is not addressed. There can be 2 or more URLs for a product depending on the category they are in.
You can disable category path URLs by following these settings.
Stores > Settings> Configuration > Catalog > Search Engine Optimization > Use Categories Path to Product URLs
You can also implement canonicals on product URLs (Use Canonical Link Meta Tag For Products). This adds a default canonical to point to the flat product URL, without categories. Search engines will know this is the true URL to rank. This setup can be problematic for internal linking. It can also create multiple URLs that are related to a single product, which could bloat your site’s crawl budget for large ecommerce sites.
It is recommended that you use clear product URLs to keep your site clean and manageable. This can help avoid confusion when one product is placed in multiple categories.
Breadcrumbs
Breadcrumbs are a powerful tool for any ecommerce website. They can provide valuable information to search engines about the site’s structure and hierarchy, as well as encourage consistent internal linking.
Magento 2 automatically activates breadcrumbs. However, they can be disabled for CMS pages via System > Configuration > Web > Default Page > Show Breadcrumbs for CMS Pages
Add specific code to disable breadcrumbs from product or category pages. We don’t recommend this as breadcrumbs can be very beneficial for SEO.
This default Magento 2 setting can cause conflicting signals to search engine crawlers, since internal links can change depending on the crawler’s path. Magento by default will not display subcategories within breadcrumbs.
For the best SEO benefits of breadcrumbs, you may want to consider an extension that allows you to add subfolders and select pages to be included, such as:
- Mageworx Breadcrumbs
Filters, facets, and indexing
Magento 2 allows you to enable filters.
This allows you to create filters for specific categories pages that help you narrow down your search. These URLs are parameters that are based on the attribute code of the filter added to Magento 2’s backend.
Filters and crawl Budget
Ecommerce sites often face the problem of having all filters available for indexing. This can lead to duplicates and thousands of pages. You can control which filter pages are crawlable by search engines by either blocking the parameters in robots.txt, or applying a canonical to each attribute using the Storefront Properties.
Indexing filters
Magento does not allow pages titles, headings, or descriptions to change based on the filter selected. The result is that any filters that have been indexed may not be optimised and could be viewed as duplicates to the parent category. In the SERPs, parameterised URLs that are used as filters by default are not user-friendly or clean.
You can have more control over the filters that are indexed as well as optimise page URLs by using titles, headings, and copy extensions.
- Mageworx
This allows you to optimize filter pages within their categories. This can help you target more specific keywords on your website.
Crawling & indexing
Robots.txt Control
Magento 2 supports fully customizable robots.txt file, which allows you to control the pages that search engine bots crawl. This can be a significant help in controlling crawl budget for large sites.
How to edit robots.txt Magento 2
Content > Design > Configuration> Edit top global stores > Search engine robots
Magento 2 is easy to edit but has been criticized for its unintuitive structure. Robots.txt control is not something that many would consider part of a website’s design.
If you have multiple stores, such as an international site, make sure to change the robots files from the global site. This file is located on the root and will be used by crawlers to crawl your site.
Sitewide changes
The default robots settings will be changed for the entire site by changing the “Default Robots” option. There are 4 options.
- Index, Follow — All pages will appear in search engine results and can be crawled (unless blocked).
- Index, Nofollow — All pages will appear in search engine results but are not crawled
- Noindex, Follow — No pages will appear in search engine results but can be crawled
- Noindex, Nofollow — pages that are not set to be displayed in search engine results or crawled are not allowed
NOTE: Google has stopped supporting robots.txt directives as of September 1, 2019. HTML of pages (how you do this is explained in the “Noindex and nofollow controls” section). This makes it redundant to change the settings in Magento 2.
Path specific changes
You can edit specific path changes using the editor box “Edit custom instruction for robots.txt” editor box.
However, great power also comes with great responsibility. Search engines should not be blocked from crawling certain paths (or entire websites by robots editors. ).
Test your robots.txt files
We recommend that you test your robots.txt before updating it. You can use the Google Robots.txt tester to check which URLs it will block in Search Console.
You may want to make big changes and then simulate a crawl of your site using your robots.txt settings. You can do this by creating a custom robots.txt in Screaming Frog. This will allow you to see the pages you are blocking. (Configuration > robots.txt> Custom > Enter your URL to edit the robots.txt file.
Noindex and nofollow controls
Google doesn’t recognize noindex or nofollow directives via robots.txt so if you want these directives to be implemented, they must be added via this link section of HTML for a page.
An extension is the best way to manage noindex and nofollow controls on specific pages or groups of pages within Magento 2.
Session IDs
Some Magento sites automatically generate session IDs (SIDs), which are then embedded into URLs whenever someone visits the site (or any bot). This is used to make sure customers are logged in while they switch between stores.
This means that Googlebot or any other search engine will crawl a site and see new URLs with different parameters. Because each page has a unique parameter URL, this can lead to duplicate pages. If duplicate parameter pages are not handled properly with canonicals they can be indexed. This can also affect internal linking signals to your site.
SID URLs can also be blocked by default Magento 2 robots.txt. This can cause major problems as Google won’t crawl your site because any URLs it encounters will include an SID parameter, and will block them.
To Remove SIDs Store > Configuration> General > Web > Session Validation Settings
Redirection
You can add redirects to Magento 2 easily via Marketing > URL rewrites > SEO/Search > URL rewrites > Add URL rewrites
Request Path = The URL string that you wish to be redirected
Target URL = The destination URL string to your redirect
These can be customized redirects (ie URL1 and URL2) or the redirection a whole category, product or CMS page (ie: /about/). This allows for flexibility and control over redirection.
Depending on the reason you are redirecting pages, the redirect type can also been configured.
- 301 — Permanent redirects
- 302 — Temporary redirects
Global Redirects
Global redirects cannot be added server-side. Therefore, you will need a developer to implement any global refers on your site.
Modify redirect settings
Amasty allows you to set up additional redirection settings, such as 301 redirects for search pages when a page is 404. This can harm SEO as it can make it difficult to find pages that are 404.
These settings can be modified via (Content>> Amasty SEO Toolkit> General Settings> Enable Redirect From 404 to Search Results> No
Sitemap Control
XML sitemaps are possible to be created. Sitemap settings (update frequency, priority) can be configured right out of the box in Magento 2 You will need to add third-party extensions if you wish to exclude URLs from your sitemap (e.g. noindex or canonicalized URLs). Extensions allow you to remove specific URLs, stock products, or categories from your sitemap that aren’t accessible by default in Magento 2.
Sitemaps can be generated for different storefronts. This can be useful to tell Google which pages it should crawl and gather index information once submitted to Google Search Console.
Sitemaps are updated automatically every time a set period is set. If your site has changed in any way, you will need to re-generate sitemaps to make sure it doesn’t contain many errors.
Structured Data
Magento 2 offers Product schema as a default. This is an upgrade to Magento
To get the best out of structured data and to have the flexibility to add schema markup, you should download an extension that allows you to add it in Google’s preferred JSON format.
Page Speed
Google has made it clear that page speed is an important factor in ranking pages. It has been proven that a fast website can reduce bounce rates and increase conversions, making it an essential element of any ecommerce site.
Magento 2 site speed is affected by these factors:
Enable caching This means static resources don’t have to be loaded every time someone visits a page. They are saved in the cache. To enable caching, use System > Cache management.
Minify JavaScript or CSS — This can be done in Magento 2 via Stores> Configuration > Advanced> Developer.
Check extensions Extensions can be very useful to enhance the features of Magento 2. However, not all extensions are optimized for speed. Magento 2 sites should always check that extensions are not slowing down their site.
Image compression –Magento 2 reduces image sizes on upload. This helps to speed up uploads. Dynamic Serving — But, even a compressed file can be too large when it is being delivered to a mobile device. Your Magento 2 theme should be leveraging dynamic server; it will provide a smaller absolute file to mobiles and smaller devices.
International SEO
Magento 2 offers different configuration options for international store management. You can do this by using 4 levels of hierarchy: Global — Website — Store — Store View.
Global — the Magento instance that you are currently running.
Website — Allows websites from different domains to be hosted under one Magento 2 installation.
Store — This allows you to separate a website into different stores. For example, if you sell different types of products, you could have a shoe and a shirt shop managed in Magento 2.
Store View- allows you to localize stores in different languages. This is crucial for international SEO. To provide a better experience for customers around the globe, you can provide different currencies for different store views.
Hreflang
A website with international ecommerce can have a huge SEO problem if it does not have its hreflang correctly set up. Store views from different countries can compete for search results (for instance, a US shirt page vs. a UK shirt page). This will not only result in lower rankings but also a poor customer experience as customers are taken to an incorrectly located product page. This can lead to a higher bounce rate, and lower conversion rates. Hreflang can also be implemented in Magento 2 via a variety of methods:
- Hreflang sitemaps
- Response from HTTP header
- HTML code
Hreflang sitemaps
Hreflang sitemaps may be used to provide language-specific information on Magento2 sites. This functionality is not included in default sitemaps and requires third-party extensions.
HTTP response
However, the HTTP header reply can be used to determine httplang. This requires a developer and is not the best option for most ecommerce sites.
HTML code
Magento 2 doesn’t come with configurable HTML hreflang tag via HTML. This could be a problem for international ecommerce shops that contain multiple store views or different languages.
However, you can manually add hreflang if you are a Magento 2 Developer. Or, there are Magento 2 extensions to address this exact problem.
Miscellaneous
Security
Magento 2 users will need to purchase an SSL certificate. This does not come by default.
After you’ve purchased an SSL certificate, you can make it available on your website via the settings.
Stores > Configuration > General > Web > Base URLs (Secure)
You can then change the base URL to https from this page. To enable SSL certificates on your admin pages, you can use the “Use SecureURLs on Storefront” option.
Content Marketing
Magento 2 doesn’t by default offer blog functionality. Other solutions are needed for supporting customers throughout their buying journey.
These can include:
- Use a Magento-specific blog extension
- Connect to WordPress
Whatever option you choose, ensure it has all the functionality that you need. WordPress has been trusted for thousands of websites and is considered a reliable choice.
Magento 2 has good SEO?
Magento 2 is a flexible CMS that lets you do many things that can benefit SEO. It is a great choice for all ecommerce websites, because of its flexibility and ability to be customized.
However, this flexibility also comes with complexity. Many options can be hidden in seemingly incongruous places or spread across many areas of the backend. Magento 2 has many SEO advantages, but it is also susceptible to major SEO issues. This could include blocking all pages from robots.txt and mass duplications of categories, which Shopify restricts. It is also more difficult to set-up. We recommend to hire specialized magento development agency for magento 2 development services to ensure rankings.
Due to all these reasons, Magento 2 is more suited to larger ecommerce sites. However, it can also be a powerful CMS for all ecommerce sites if used correctly.