Magento 2 SEO best practices

In this blog post, guest author Steven van Vessum, VP of community at ContentKing, provides you with six steps on how to set up your Magento 2 shop to boost your SEO performance. ContentKing is a cloud-based service that provides real-time SEO auditing and change management to improve and maintain search engine visibility. 

 

Playing the role of a backbone for about 270,000 stores world-wide, Magento has, without a doubt, become the leading platform in the entire eCommerce industry.

But with so many eCommerce websites out there, the importance of search engine visibility has been constantly increasing. Although Magento 2 offers tons of ground-breaking features, when it comes to search engine optimization (SEO), it pays to invest time into configuring Magento 2, because without this you won’t stand out in the crowded marketplace.

Here are six steps on how to set up your Magento 2 shop to boost your SEO performance in 2020.

1. It all starts with a clear URL structure

Let’s suppose you’ve received an invitation to meet a friend for coffee. And it says that the meeting place is at the geolocation 40.7671885,-73.955687. Or that it’s behind the spot where the red car parks each Wednesday morning. Would this be clear for you? Would you invest the energy needed to look up its exact location? Or, wouldn’t it be better if the friend simply told you he would be waiting at Caffé Noi in Manhattan?

This applies similarly to URLs. If you run a website, your potential visitors should get an idea of a page’s content just by looking at its URL. They will be much more inclined to click on a Google search result with a descriptive and readable URL that gives a clear idea of where clicking it will take them.

That’s why when setting up the URLs in your Magento 2 shop, you should keep in mind that its links ought to be brief, descriptive, and easy to read. They should also be consistent—and lowercase in every instance. Furthermore, each one should contain a keyword describing the product or service.

Keep the URLs short by leaving out categories

When setting a link for a particular product, remember that visitors and search engines both prefer short URLs, so keep them as short as possible.

One way to shorten your links is to leave out category names. ​This is especially important if you have categories with subcategories; if included, they can quickly make URLs very long.

Luckily, Magento 2 is set to leave out categories from URLs by default, and we suggest that you keep this setting unchanged.

If your store has a lot of products, many with highly similar names, you can include a unique identifier such as the SKU into each product’s URL. While Magento 2 doesn’t provide users with this out of the box option, it is possible to enable it with ​an extension​.

Avoid underscores, stop words, and .html extensions

Apart from keeping the links short, you should also avoid redundant messes so that they stay clear and easy to read. For example there is no reason to include stop words in URLs, as they lengthen them without adding value.

Moreover, if you are launching a new Magento 2 store, get rid of the .html extension in your URLs. This extension is added to each link in Magento 2 by default. The reason why it is best turned off is that it can complicate a potential later switch to a different eCommerce platform.

However, don’t proceed with this extension removal if your store has already been running a while. That would lead to a URL migration, which you want to avoid as much as possible.

And finally, even though search engines do support underscores (_) as word separators nowadays, it has been proven that your readers’ eyes prefer hyphens, which add to overall readability.

Beware of parameters

To keep URLs readable and clear, instead of just using parameters, implement a descriptive name for the product each page contains. Parameters can still then be used for filters and facets, as you can see further on in this article.

Here’s an example of a good URL:
https://www.example.com/iphone-8

And here’s an example of a bad URL:

https://www.example.com/index.php?productID=83671

Automatically redirect URLs in case a key changes

When products’ URL keys change after their pages have been published, you should provide visitors and search engines with an adequate ​redirect​ to the new URL.

Luckily, Magento 2 has this very option set by default. We strongly recommend leaving this setting as-is, since it might save you a lot of headaches down the line.

2. Help visitors through titles, meta descriptions, and headings

Once you have a clear URL structure established, it’s time to move on to the most visible parts of your website within a SERP—its page title and meta description.

It goes without question that appealing page titles and meta descriptions are extremely important elements to stand out in SERPS. A good title will offer a brief explanation of the page’s content with adequate keywords, and a meta description should elaborate on the topic and include further details and keywords.

Configuring these two properly will have a huge impact on your rankings, as well as on your click-through rate, as they constitute a fundamental element in a visitor’s decision-making process.

However, with thousands of pages on your website, you simply cannot define a good title and meta description for each page manually. For this reason, you will need to use defaults, and do so smartly.

How to automate page titles and the meta descriptions for pages and categories

It doesn’t matter if you sell hundreds, thousands, or tens of thousands of products. Creating a separate page title and meta description for each and every one of them would consume almost all of the time you spend on your eCommerce website.

That’s why defining automated templates comes in handy. However, here is where the first issue arrives. Magento 2 doesn’t provide its users with an option to automate the creation of meta descriptions and titles.

Luckily there are Magento extensions out there for just about every problem. To easily create defined templates, we recommend using extensions like “​Meta Tags Templates by Amasty​” or “​SEO Meta Templates by MageWorx​”.

How long should the page title be?

An ideal title should be between 285 and 575 pixels long (30 and 60 characters respectively). It should be unique, contain keywords, and give an adequate call to action.

What are the characteristics of a good meta description?

A meta description should be between 430 and 920 pixels long (70 to 155 characters), and everything said about the page title applies to the meta description as well. It should be clear and readable and contain the main keywords.

What’s the right structure for headings?

Similarly to page titles and meta descriptions, good headings serve both visitors and search engines. They let your visitors scan a page’s content quickly. Simultaneously, search engines use headings to determine the structure of the content’s topic.

There are a few rules you should follow to make your website readable and visible on search engines.

The first key point is the hierarchy. You should always use just one H1 heading per site. Remember that the name of your product, category product, or page is set to H1 by default. The heading should not include images, and its text is there to convey the page’s main topic.

H2 headings refer to individual segments of the content, and you shouldn’t use them for the product name on a product-category page. H3s should refer to particular H2s, H4s to H3s, and the list goes on.

Additionally, no headings should exceed a length of 60 characters, as that would impact readability.

3. How to send clear crawling & indexing signals

While URL structure, page titles, meta description, and headings are there to give search engines an idea of what they can find on a page, there are other tools that let us—to a certain extent—regulate how search engine crawlers behave on our website.

From canonical URLs to XML Sitemaps and robot.txt files, with these approaches, you can determine which sites will be crawled and indexed, or avoid issues with duplicate content. This lets you influence the crawl budget, ensuring a search engine’s time is focused on the right things, meaning your visibility will increase.

Implement canonical URLs for the homepage and CMS pages

Canonical URLs are an efficient tool that helps you prevent the indexing of pages with duplicate content.

Let’s say your store is selling t-shirts. One type of t-shirt is available in many colors. Without canonical URLs, each of the variants could end up as a separately indexed page.

Eventually, this could end up with having multiple sites with the same t-shirt in different colors competing with each other, which could rapidly decrease your visibility.

With canonical URLs, you can signal to the search engines that should only index the product page, and not the variant pages.

How to prevent duplicate content using robots directives

Similarly to canonical URLs, with appropriate use of directives, we can signal to robots what part of the website is worth crawling and indexing, and what they should avoid.

This is especially essential SEO-wise for large sites—which eCommerce stores often are. To avoid indexing of multiple low-quality pages, we recommend implementing the nofollow directive for internal search result pages, as well as for parameters.

Keep in mind that Magento 2 leaves all internal search results indexable. The same applies for parameters. Also, remember that you should not apply the robots noindex directive together with canonicalizing these pages to other pages, as this sends a confusing signal to search engines.

Don’t forget the robots.txt

Another feature giving you at least partial control over your website’s crawlability and indexability is the robots.txt file. This tool keeps search engine crawlers from hitting potential crawler traps. It also prevents indexing of duplicate content and thus conserves your precious crawl budget.

On your Magento 2 store, we recommend using robots.txt for disallowing the indexing of internal search results, login pages, and URLs containing filtering criteria such as color, size, material, or price.

How to configure the XML Sitemap

The XML Sitemap is another efficient tool that tells the search engines about which parts of the website should be crawled and indexed.

Magento 2 can generate XML Sitemaps for you automatically. To configure these maps in Magento 2 properly, you should bear in mind that the XML maps have to keep up with the website’s content. That’s why you should enable Magento to regenerate the sitemaps regularly.

XML Sitemaps should include indexable pages only and shouldn’t have more than 50,000 pages. Their file size cannot exceed 50MB. If you have more pages to be indexed, split them up into multiple XML Sitemaps.

Furthermore, always keep in mind that all XML Sitemaps should be referenced in the robots.txt.

How to avoid duplicate content when using smart faceted navigation

Faceted navigation lets visitors customize their search based on what they are looking for on the site. Product filters, for instance, are a part of faceted navigation.

While facets can be really helpful for visitors seeking the best variant of their desired product, this particular feature can turn into an SEO nightmare. With the wrong configuration, the number of low-quality indexed pages can skyrocket in no time.

As we’ve noted above, for filters and other more precise elements, you can use nofollow directives and the robots.txt file. However, this can turn pretty tricky once visitors search for something with a more specific trait, such as a computer with a particular processor.

In these situations, you need to create a subcategory for this sort of subset of your product to make it accessible for search engines. We encourage you to do this for all subsets where it makes sense.

4. The need for speed: how to optimize your website’s
performance

We live in a fast world where speed plays an important role. And this applies to (Magento 2) SEO more than ever.

The downside of Magento 2 is that it can quickly become rather slow. But that’s not the end of the world, as you can overcome this issue with a high-quality and fast web hosting platform such as Hypernode, which is optimized for the Magento 2 platform.

Enable caching, and configure JavaScript

But just having a proper hosting platform doesn’t make you the winner of the game.

To ease things even further, you should configure other aspects that can help your shop run faster. Firstly, you should enable your site’s caching features.

Secondly, you should tweak your JavaScript configuration. By default, Magento 2 lets you minify and bundle JavaScript as well as merge JavaScript files. But once you introduce your own JavaScript and third-party plugins, simply merging and bundling JavaScript files adds little to no value.

For this reason, Magento is currently working on a module called ​Baler​ that enables you to configure advanced JavaScript bundling. This module lets you create separate bundles for JavaScript, which ensures the website is only loading what is truly needed, rather than everything.

How to configure ​CSS and Image settings on Magento 2

Similarly as with JavaScript, Magento 2 lets you minify and merge CSS files, and—if your theme supports this—use a CSS critical path, which all can contribute to faster performance by your website.

Magento 2 also offers a great way to set maximum dimensions for your visual elements, to prevent serving your visitors overly large—and thus overtaxing—images. The system also enables image processing with the ImageMagick adapter, which is considered the best adapter, as it makes for the highest-quality images.

Also, to boost your performance, you can add some image compression tools, use the Webp image format, and apply lazy-loading to images below the fold, all of which helps your visitor to load the website faster.

5. Add informational content on category pages to boost your rankings

Google simply loves content—and the more helpful and informative, the better. To boost your product category pages’ rankings, it pays off to add informational content to them.

The effect of informational content pages on overall SEO performance is apparent in a ​case study​ recently published by Eoghan Henn. This study describes the case of an online store that removed 25 informational content pages from their website and redirected the pages’ URLs to the home page. The data suggests that this led to a significant decrease in organic traffic as well as in sales. The shop lost about one-third of its overall visibility, as the home page and category pages lost most of their top rankings for commercial-intent search queries.

After three weeks, the store restored the informational content pages. And within another three weeks, the store regained its performance completely.

The data from this case study suggests that, besides ranking on their own, the informational content pages significantly helped the home page and category pages to rank better for search queries with commercial intent.

Magento 2 SEO

Example of informative content on category pages at webshop REI coop.

6. How to approach link building for eCommerce websites

Once you have the technical- and content side of things covered, it’s time to spread the word and reach out with an appropriate link building strategy.

The general consensus is that external links contribute more than 50% of your SEO success. To succeed in link building, you have to focus on how your store is acknowledged by other websites. This affects some of the most important factors—authority, trust, and relevancy of your website.

There are a few strategies that can help you get high-quality links from other relevant websites.

Launch a blog section

Setting up a blog on your website is an ideal way to publish interesting, informative, and newsworthy content that will generate backlinks. It’s also a great place for infographics and other types of content readers can engage with. Quizzes or tests for example.

Once you have your content published, you also have to spread the word. Reach out to industry leaders and tell them about your interesting findings.

Create a glossary section

Explain the expert or technical terms you use at your store by establishing a glossary or dictionary section. This way you can attract people with a general interest in particular fields online.

Prioritize terms according to search volume and start with the ones that have the highest search volume. Categorize the terms and link them to product category pages and product pages.

Reach out to your partners

If you already have a good relationship with other organizations, there’s nothing easier than reaching out to them. Ask them for links to your website and its individual parts.

Get credited for images that others use

Other people stealing or “borrowing” your images might be frustrating to many website owners, but it can turn into a link-building goldmine. If other websites are using your original images, it is only fair they give you credit.

You can look for websites using your visual content by making use of Google’s reverse image search (or a tool like ​infringement.report)​. Once you find websites using one of your original images, don’t hesitate to reach out to their owners to have them credit it appropriately. Most owners are open to doing so.

Find unlinked mentions of your brand

If somebody already mentions your brand online, it would be a pity to leave that without an appropriate backlink. You can use automated tools to find mentions of your brand, such as mention.net​ or ​RankTank’s Unlinked Mentions Finder​, or you can also use an advanced Google query: “brand name” -inurl:domainname.com.

Once you find the mentions, don’t hesitate to reach out to the website owners to have them link your store.

Be controversial

Standing out in a highly competitive field sometimes requires an unusual and bold angle to attract new visitors. Don’t be afraid to be a bit controversial and brainstorm disputed topics that could generate genuine interest.

One lovely example of a bold strategy was a campaign launched by Missguided. This online store specializing in fashion came up with ​jumpers for dogs​. Their new concept was very well received by the media and their readers. The store now ranks the highest on Google for “dog jumpers.”

Don‘t be afraid of the nofollow attribute

Many websites use the nofollow attribute to indicate that a link was paid for or that you don’t want to be associated with the websites they’re linking to. When a link has the nofollow attribute, only part of the link authority is passed to the link target. But it’s something you don’t need to obsess about, as the links bearing the nofollow attribute ​aren’t ​completely worthless. The primary use of links is to send traffic, and highly relevant traffic is likely to convert.

Closing thoughts: monitor your Magento 2 store

In this article, we covered the technical side of Magento 2, as well as the importance of content and link building strategies, which are both essential to boosting your performance.

Keeping an eye on how everything you’ve worked so hard for is set up is an important part of success throughout the eCommerce industry. If you’d like to check whether the Magento 2 SEO elements of your store are set up properly, let ​ContentKing​ audit it and keep a watchful eye on it moving forward.

ContentKing is a cloud-based service that provides real-time SEO auditing and change management to improve and maintain search engine visibility. This tool makes it easy to improve visibility in search engines. It also fixes problems before visitors and search engines even notice them.