Strapi is an open-source next-gen headless Content Management System used to develop websites, mobile applications, and APIs. As a headless CMS, Strapi is a back-end-only web content management system acting as a content repository. Content is accessible via an API and displayed on any device.
Strapi has been gaining popularity among developers and is the top solution for headless CMS worldwide.
As the number of websites created with Strapi increases, it’s crucial for webmasters to ensure the sites are SEO-friendly.
Strapi and SEO
Strapi claims to be the best content management system for SEO. Let’s investigate that claim.
According to their website, these are the essential SEO components:
- URL structure
- Metadata and media
- Structured data
- Content clustering
A simple, logical, and user-friendly URL will be easier for Google to crawl and understand, as well as being more enticing for users in SERP. Consider the following examples:
Having a logical, easy-to-read URL path is a must. Strapi allows you to create a slug based on the name of your content by assigning a specified name value to the slug (UID).
The setup can be specified using the Content-type Builder functionality in the Strapi dashboard.
Your metadata gives you some influence on your page appearance in SERP. Strapi advise populating:
A title may be used to influence the title link in search results, as shown below.
A description may also be used to create a clear description of the page’s content in search results, as shown here.
Google uses many different sources to automatically determine the title link and meta description, and it may use anchor text, on-page text or other sources to create an improved title link.
The title can either be populated with the Strapi SEO Plugin or by creating a text field where the title tag will be stored. Conditions can be added, such as not being shorter than or not exceeding a set amount of characters.
Strapi advises populating keywords to ensure your content is SEO-friendly. Google stopped supporting meta keywords in 2009, making them redundant regarding SEO value. Meta keywords can be used to tag or categorise content internally, but are not a crucial part of SEO optimisation.
Populating keywords data may be useful to cross-reference requirements (if specified) in title tags and meta descriptions to ensure target keywords are included in relevant fields.
Meta robots give you control over content indexability. To prevent pages from appearing in Google indexing should not be allowed. A ‘prevent indexing’ field needs to be created with the default Boolean value set to false to ensure pages are indexable and can appear in SERP.
An alt attribute text field needs to be populated for the media files site-wide to make sure alt text can be added to images to ensure the website follows SEO and accessibility guidelines.
Utilising structured data to markup content can help Google understand the content of your website. Structured data is a standardised format for providing information about a page and accurately classifying the page’s content. A structured data field needs to be created for each individual schema.org type, such as one of the following:.
An SEO may need to provide detailed information about required schema types for individual websites and pages based on their offering.
Content clustering within Strapi is being used to improve user experience and search performance by utilising the ‘Related Products’ and ’You May Also Like’ components. To take advantage of content clustering, the RelatedProducts component and Products category needs to be created, and required fields need to be populated. Ensure the RelatedProducts component has an Intro and a Relation field to populate the frontend text a user sees.
Strapi SEO plugin
You can use Strapi’s official SEO plugin that provides top-level information about SEO elements. According to the official documentation, the main features of the plugin are:
- An overview of SEO components for content types
- meta tags (title, description) management and SERP preview
- social meta tags (Facebook and Twitter) management and post preview
- strong SEO content analysis.
It does not appear that the plugin provides as many options as Yoast or RankMath, such as:
- canonical URL
- structured data
- 301 redirects
- internal and External Links
Strapi and SEO-related issues
The following pages built with Strapi were checked with a crawler against the most common issues that may affect organic performance:
Let’s take a look at some issues experienced by audited Strapi sites.
An excessive DOM size increases the number of bytes transferred, resulting in increased data costs and slower page load speed. It will also slow down the rendering of your page, and overwhelm the memory capabilities of your user’s devices. Redundant code should be removed from affected page templates to reduce DOM size, improve page load, and minimise data usage.
A correlation between unoptimised JS files and Core Web Vitals.
Whether a headless or a traditional CMS, SEO should be implemented as soon as possible to ensure websites follow best practices. Any SEO working with Strapi should provide an extensive and in-depth list of SEO elements for each page template, which could include:
- Meta title
- Meta description
- Canonical list
- Meta robots
- Structured data (in JSON LD)
- Open graph
- Relation (content clustering)