Skip to content

Structured data generation

Structured data is a specific type of metadata which is used by search engines to better understand you page content. This is crucial to achieve best SEO results in modern web and is certainly an area where you should focus your efforts.

The most common type of structured data is known as In a nutshell, it's a list of things, together with a list of properties that describe each type of thing.

For instance, you can have a structured data record to describe a Business. That record will include properties or fields holding the business name, its address, the area it serves, its email address and many more.

Using the definition, we can ensure everyone can "speak the same language" and is able to produce or read this information.

4SEO only implements a subset of list of types and properties. Those are the types that Google officially support and use in their search engines.

Please consult Google's own documentation on what they use Structured data for here.

Quoting this page:

Google Search works hard to understand the content of a page. You can help us by providing explicit clues about the meaning of a page to Google by including structured data on the page. Structured data is a standardized format for providing information about a page and classifying the page content; for example, on a recipe page, what are the ingredients, the cooking time and temperature, the calories, and so on.

4SEO can generate many types of structured data automatically or lets you customize them to better fit your requirements. This is done through structured data rules that you can create. It also comes with built-in rules and features for Joomla content and other extensions so that you can even enjoy structured data out of the box.

4SEO only outputs structured data in the json-ld format. This is Google preferred format for structured data on websites.

Structured data types

A single page can be described with several sets of structured data. Each structured data record is defined by its type and has associated fields and data that depends on this type.

Picking a type

When you create a structured data rule for one or more pages, that rule will generate structured data of one single type. Therefore, the first thing to do is to select which of the Google-supported types the rule will generate structured data for.

You can generate multiple structured data types per page by creating multiple rules for the same page or pages.

As you can select the value of a custom field to trigger a rule, you can use a Joomla custom field to assign different structured data types for the same type of content.

For instance, different blog posts on your blog could be of different types: Article, NewsArticle, BlogPosting, simply by having a Structured data type custom fields offering these 3 types to the writer.

For structured data type, use exactly the type names

In our example above, your Joomla custom field must offer the corresponding options exactly: Article, NewsArticle and BlogPosting. Do not change case (newsarticle) for instance.

Selecting properties values

Once you have picked a type, a number of input fields will appear based on the type:

View of structured data rule creation

In each case, you can let 4SEO tries to fill in the content automatically, or provide your own by clicking on the Custom value or field button.

You must validate generated structured data

Regardless of how structured data is created, it's only useful to search engines if valid. That is if it follows the exact specification from and possibly additional requirements by Google. Once you page has been created and structured data configured, be sure to use Google Rich results tester to detect errors, and then fix them. Invalid structured data is simply not used.

FAQ structured data

FAQ structured data operates a little differently than other types. Although you can manually enter a list of questions and answers for any given page, it is usually more efficient to let 4SEO extract them directly from the page itself.

Note that Google requires that the questions and answers actually appear on the page so detecting them automatically makes the most sense, no need to retype anything.

4SEO can detect questions and answers in your content in 2 ways:

CSS selectors

When this method is selected, 4SEO will search for the specified CSS selectors in your pages content to identify where the question(s) and answer(s) are.

Here is an example:

Selecting h3 for questions and h4 for answers will correctly extract question and answer if your page contains the following.

<h3>Where does the Joomla! CMS got its name?</h3>
<p>Here is the full story:</p>
<h4>The Joomla! name is derived from the Swahili word Jumla which means "all together" or "as a whole".</h3>

You can also combine HTML tag name with a class as in h3.question to only match the h3 elements with a question class attached.


If CSS selectors are not working for your site, you can always wrap your questions and answers in the following shortcodes. They will act as markers for 4SEO to extract the proper elements. These shortcodes are of course removed from the page itself before display so that no one else can see them.

Here is an example:

<p>{4seo_faq_question_start}What are the most common open-source CMS in 2021?{4seo_faq_question_end}</p>
<p>Here is our list:</p>


The following applies:

  • There should always be the same number of questions and answers on a page. If not, no FAQ structured data will be shown.
  • Empty questions or answer are not allowed, they will be discarded

You can have as many questions/answers pairs on the same page, altough it's recommended to limit the total to a reasonable number.

Automated structured data output

Upon being installed, without any additional configuration, 4SEO can already output valid structured data for:

  • SiteLinks Search Box
  • Breadcrumb

  • Joomla articles

  • J2Store product pages
  • Hikashop product pages
  • K2 items pages

This happens automatically and will generate already extensive structured data records.

In addition, if you enter the minimal information required for it under Structured data | Settings | Default organization, 4SEO will also output LocalBusiness structured data.

Custom structured data input

For each structured data rule you create, 4SEO will offer you a vast list of properties that can be filled either automatically or manually.

However, for most structured data types, actually defines an extremely large number of properties.

We have selected the most common and useful of them for easy creation, but if you want to include a less common property in your pages, you can do so by simply entering a raw json code snippet. 4SEO will then insert this code exactly as is together with the other properties.

View of structured data rule custom code input field

In this example of a VideoObject structured data rule, we have added the duration property to tell search engines that this video is 30 minutes in length.

Please refer to Google documentation linked at the top of this page for further details on allowed properties and the exact syntax to use. As always, make sure to validate the result.

Custom fields data input

As seen above, you can manually enter specific value for all properties of a structured data rule. But 4SEO can also make use of one of Joomla most powerful features: Custom fields.

Custom fields are pieces of information that you can define yourself - as opposed to fields that are built-in by Joomla programmers. You can use them to enter and display many types of information.

For all structured data properties, 4SEO lets you select one of the custom fields defined on your site very simply:

  • click the Use custom field button to the right of a property
  • select the desired custom field in the list

Here is how it looks:

Custom fields being selected for provide custom data