Five useful SEO techniques for eZ Platform developers

Search engines continue to be valuable sources of web traffic for sites of all shapes and sizes. The robots that crawl your content and the algorithms ranking it have gotten more sophisticated over the years. Keyword stuffing and other questionable SEO methods have become a thing of the past, and quality content often ranks high without any "SEO tricks". 

Even so, you should still pay attention to serving your search engine robot audience in the best way possible. Traditional technical SEO best practices such as semantic markup, discoverability and so forth are the base of ranking high on searches for relevant keywords, but for very competitive searches you need to go the extra mile for the best results.

In this article you can find five practical SEO techniques to ensure your eZ Platform implementation has the potential to rank as high as possible on major search engines.

Use canonical tags to avoid indexing duplicates

The eZ Platform Content Engine features sophisticated content modeling features to allow flexible management of content and data. In addition, the system relies heavily on locations, a hierarchical tree that can be used to provide additional structure. This feature also allows publishing the same content in multiple locations at the same time. 

For example, if you were to have a product catalog on your website, you would likely structure your products by groups. In the case of bicycles, you could provide a structure based on the different product types in your offering as shown below:

  •  All products 
    • City bicycles
    • Mountain bicycles 
    • Electric bicycles
    • Children's bicycles 

This will allow visitors to find the products based on their needs. If the number of SKUs in your catalog is large, you could use subcategories or even provide advanced filtering capabilities using the search API to allow drilling down by product features such as color. 

The above approach will work for listing your offering, but sometimes you may want to showcase a set of products in a different context. As an example, you might want to highlight new products for the 2020 model year in a specific section on your site. You could create a new section outside of the product catalog for these products, like this: 

  •  All products 
    • City bicycles
    • Mountain bicycles 
    • Electric bicycles
    • Children's bicycles 
  • New for 2020

Your design and development team could then create alternative templates to emphasize the new features on the new range of products. To make sure product data is not entered twice, you can use the content locations feature to place a product both in its main category (e.g. City bicycles) as well as the showcase. By placing the showcase in your main navigation you can steer your audience to view the new product offerings in your range.

The above strategy enables your team to work efficiently with product data, while allowing flexibility for marketing efforts to highlight new products. However, it does represent a problem. Now a the highlighted product will be published in two different URLs: 

  • https://example.com/city-bicycles/futurebike-23
  • https://example.com/new-for-2020/futurebike-23

eZ Platform is internally aware these two items are the same, but it is not apparent to visitors (human or machine). Fortunately, this is not a unique problem, and there is an established solution for this. Developers can define a Canonical Link for content. This will allow publishing the same content in multiple locations, while letting search engines know which one is the preferred location (URL) that should be placed in the search index. 

When working with the eZ Platform Content Engine developers can use the main location metadata to automatically generate a Canonical Link in their templates. For location (or locations) of a content item, one will always be selected as main location. Please note that main location is not inherently special, but is just used as the default value. This is when you want to link to an content item and you don't know the location to link to, for example.

Generating the canonical link in your main template is relatively straightforward. You can always generate a canonical link - even if there is just a single location. By placing the following Twig template snippet in the head section of your main template, you've got a robust and universal solution to avoid indexing of duplicate content by search engines: 

{% if content.versionInfo.contentInfo.mainLocationId is defined %}
    <link rel="canonical" href="{{ url( "ez_urlalias", {"locationId": content.versionInfo.contentInfo.mainLocationId} ) }}"> 
{% endif %}

Define relevant metadata fields

At the core of eZ Platform Content Engine are content types that allow you to define the content model for your project. These content types are then used by the editorial team to create content items, which in turn are passed through a template to be displayed by the visitors of your online service. In addition to visible fields, there is often metadata (information about information) which is not for users, but machines like search bots.

In SEO metadata is incredibly valuable in ensuring the optimal ranking of your content in search engines. From purely technical metadata such as the Canonical URL link mentioned in the section above, there is a lot of information relayed by them that affects search engine performance. Some even affect usability, for example the Open Graph data that is used to fill details like the title, description and image of a link you are sharing on Facebook.  

On the web there are no permanent standards for metadata that should be shared. There are long standing and widely adapted fields such as the description; used for defining the snippets shown on search engine result pages (SERPs) on Google, etc. In addition, there are many metadata tags used by specific platforms such as Android, iOS, Windows and social media platforms like Twitter. The significance of these come and go with the trends.

These constant changes and lack of standards make it difficult to include a standard set of metadata fields to eZ Platform. Developers are free to add the fields they want to content types, but this can become unwieldy because of the number of fields needed. Luckily there is community developed eZ Platform field type that helps you store metadata efficiently.

The Novactive eZ SEO Bundle extends eZ Platform to provide a field type which contains all the metadata. This extension uses eZ Platform APIs to provide developers an easy way to add extensive metadata entry options for projects. It is widely used and provides support for the most popular metadata fields out of the box, and should new ones arrive the open source community continuously maintain it to keep it relevant with the changing world.

This SEO extension is highly configurable and in addition to simply adding new fields, the so also includes other capabilities like robots.txt management and automatic sitemap generation (more on that later). To learn more about it you should head over to the project documentation: Nova SEO Bundle - Optimized SEO management for eZ Platform

Define relationships of multilingual content items

eZ Platform has robust support for multitenancy. A single eZ Platform instance can be configured to serve multiple sites by setting siteaccess configurations. In a nutshell a siteaccess is a set of parameters that defines a view into the content repository. Settings such as templates and language are then manifested under a public URL on the internet. 

In addition to multitenancy, eZ Platform comes out of the box with comprehensive support for managing multilingual content as well as internationalization and localization support provided by the Symfony framework. When combined these features result in language versions of a website, online store or digital service channel built with eZ Platform. 

If your implementation has multiple publicly available language versions of the same content or user interfaces to back office systems, you should provide search engines information on this. When the ranking algorithms can manage your networks of site as being related, they will be perceived as a part of a larger organisation. This in turn adds weight to your sites as a whole, resulting in higher positions in search rankings.

The mechanism to provide this data is known as hreflang links. They are tags which are placed into the head section of your HTML documents that have a reference to your other language versions, as well as information on which language it is. Below you can see an example of three link tags that you could have for your English language “hello world” page:

<link rel="alternate" href="https://de.example.com/hallo-welt" hreflang="de-DE" />
<link rel="alternate" href="https://fr.example.com/bonjour-le-monde" hreflang="fr-FR" />
<link rel="alternate" href="https://no.example.com/hei-verden" hreflang="no-NO" />

Maintaining the above links by hand is not practical, so this is something that should be generated automatically. To avoid reinventing the wheel, you can use the eZ Platform language switcher functionality to create these links automatically based on the location object loaded for you automatically for translations of a content item in the repository.

To generate a link to a specific language version dynamically, you can use the following language switcher snippet to generate the appropriate links to your language versions: 

<link rel="alternate" href="{{ url( ez_route( location, {"language": "ger-DE"} ) ) }}" hreflang="de-DE" />
<link rel="alternate" href="{{ url( ez_route( location, {"language": "fre-FR"} ) ) }}" hreflang="fr-FR" />
<link rel="alternate" href="{{ url( ez_route( location, {"language": "nor-NO"} ) ) }}" hreflang="no-NO" />

Be sure to pay attention to using the correct language identifiers for the value of your hreflang (you should use ISO 639-1 format for the language, and optionally ISO 3166-1 Alpha 2 format for the region). I also recommend you familiarize yourself with how eZ Platform handles fallback languages and missing translations to cover edge cases.

Generate automatic sitemaps

Traditionally search engines have used crawlers (also known as search bots) to find content on the web. They did this by following links from one site to another, building a database of links and their content. Essentially this is still how things work, but due to the ever-growing amount of content being created each day, it is important to let crawlers know about your content instead of just relying on the bots eventually finding their way to it. 

To let search engines know about your content there is a standard known as XML Sitemaps. This is a format which contains your site URLs and additional information like last modified date and desired frequency of indexing. Sitemaps have been around for well over a decade and are supported by major search engines like Google, Bing and Yandex. 

Sitemaps are XML documents that conform to a specification. There is no generic method to generate your sitemaps. So technically you could even build them by hand. For larger sites typically built with eZ Platform this is not feasible, so you should likely look at generating them automatically. There are (at least) two ways of going forward with this: 

  1. Write your own sitemap generator 
  2. Use the Novactive eZ SEO Bundle to generate sitemaps 

Writing your own custom sitemap generation scripts is a good approach if you’re using eZ Platform with a lot of custom controllers, listings of data from different sources and so forth. Please note that even if you do decide to write your own sitemap generator, you should take a look at utilities like PrestaSitemapBundle that can help you focus on your logic and not spend time creating boilerplate functions already available as open source. 

If your implementation is mostly using the eZ Platform Content Engine to display content to users, it might pay off to take another look at the Novactive eZ SEO Bundle and it’s sitemap generation feature. Note that while this extension does have some flexibility through configuration of excluded content types, subtrees, etc. you might run into some trouble if you’ve got a large amount of content. You might be limited by generation time or possibly hit the limits of a single sitemap. Validate with real data from production before deploying.

Finally you should let search engines know that your sitemap exists. The easiest way is to add a reference to it in your robots.txt, but you can also manually add it via search engine administration interfaces like Google Search Console or Bing Webmaster Tools.

Optimize your URL structure

Good URLs are essential to the web. They are key not only to machines routinely reading and processing them, but humans as well. Our content engine automatically generates readable and accessible URLs (AKA Clean URLs) even in complex scenarios where you have multiple sites with exotic languages running off a single eZ Platform installation. The default settings works for most cases, but you can configure URL transformations.

Good copywriting, metadata entry and other common SEO techniques are a staple for good search engine ranking, but for very competitive markets you should go even more in-depth. While our default URL settings go a long way, you can always optimize for a specific domain. To improve your URLs, you should to spend time in understanding your products and audience. In crowded niches things that are irrelevant for other categories (such as news sites) can become a key factor in deciding the success of your business. 

Let’s take an example of a retailer selling spare parts for laptops for people looking to fix their own devices. This is a well-defined niche, and is also an area where everyone is essentially selling the same product. A majority of business is generated from online searches and value for individual sales relatively low.

The price of a common component like a replacement battery ranges from 45 to 50 dollars from the top ranked sellers. In this case price is not necessarily the primary factor, so other things such delivery times may become the deciding factor. If the top three are equal in this respect, then selection is increasingly a game of chance. How can you stand out?

Somewhat surprisingly content can become a deciding factor here. Laptops are sold under the same model name from one year to another. However, behind the scenes they have different technical identifiers from one model to another. From the outside the machines look identical, but the internals can change. A model that has a faster processor may have a slightly larger battery, for example. Ordering the wrong part is time is a hassle.

These minor changes are easy to miss, even for enthusiasts, so adding compatibility details in your product listings can make you the preferred supplier, even if your price is five dollars higher. This will likely only give you the edge for a short time as your competitors are likely to notice their sales dwindling. They will quickly catch up and add compatibility information to their product listings, bringing the situation back to equal again. 

Next you might want to look into URL optimization to get the upper hand. eZ Platform allows you to define a URL snippet structure for your products using the URL alias name pattern, this allows you to pick a specific field and add it as a part of the URL. This in turn gives search engines more insight that this is an important part of your content, as it is a part of the URL. In the case of our spare parts reseller we would then add the model name and processor speed as part of the URL to gain an advantage, changing the URL from: 

    https://example.com/parts/battery/apple/macbook-15-inch 

to 

     https://example.com/parts/battery/apple/macbook-15-inch-a1292-2ghz 

The above is an example of where small and continuous improvements to your online presence can make a big difference in your bottom line. Especially if you are operating in a highly competitive field and where a majority of your business comes from organic search traffic. It is also a good example of how eZ Platform is a flexible tool for you to build your online business and keeping it competitive by enabling iterative changes over time. 

Leave us a comment
blog comments powered by Disqus