When it comes to search engine optimization (SEO), schema SEO is one of the most commonly overlooked steps. Part of that is because it can be a pain to do manually. This is why we recommend using a Drupal schema module. There are many free online tools that can help you create one, but many either lack in-depth features or require you to create an account first.
A good Drupal schema module is like a well thought out XML sitemap:
- Doing it once will help you stand out from your competition in search engine results.
- Doing it in Drupal means most of the work is done automatically so you can focus on something else.
Below we’ll cover:
- What is a Schema?
- Installing the Schema.org Metatag Drupal Module
- Configuring Schema.org Metatag
What is a Schema?
On the surface level, a schema is a reserved section of notable info for a brand, person, or website among search engine results. Below is a screenshot of our schema displayed to the right of Google search results.
On a technical level, a schema includes relevant brand information in a code block within your website. There are three primary methods for doing this. JSON LD adds the data within the
head element. RDFa and Microdata add this data directly within the code of the content. JSON LD duplicates data but is most commonly used because Google recommends JSON LD.
As stated above, you can manually code a schema within an HTML page or PHP header file. However, a Drupal schema module can save you valuable time. There are a few that achieve the same thing. There’s a Drupal module simply called Schema, but it hasn’t been updated in years.
So we’re going to cover how to use the Schema.org Metatag Drupal module. Then, we’ll test our schema with Google’s Structured Data Testing Tool.
This Drupal schema module does not provide all schema options.
Installing the Schema.org Metatag Drupal Module
This is the easiest way to install the Drupal metadata module.
- Log into Drupal.
- Install the Metatag module if you haven’t already.
- Install the Drupal schema module using the Schema.org Metatag download link.
- Click Enable newly added modules.
- Schema.org Metatag adds over a dozen options to your Extend list for different uses. Select the checkbox for Schema.org Metatag and the most applicable schema type(s) for you. You’ll likely want to start with Schema.org Organization, Schema.org Person, or Schema.org Website.
- At the bottom, select Install.
Configuring Schema.org Metatag
- After enabling applicable schema types, select Configuration > Search and metadata > Metatag from your navigation menu.
- To add the schema to all Drupal pages, simply select the Edit button to the right of Global and skip to step 7. To add the schema to specific pages, select the Metatag Settings tab.
- Click the Entity type / Group Mapping options you want to add schemas in and check the Schema.org box. Select Content: Article and Content: Basic Page to start.
- Select Save configuration at the bottom.
- Select the Metatag defaults tab at the top.
- Select the Edit button for an entity type you selected earlier.
Try downgrading your PHP version if you receive the error “The website encountered an unexpected error. Please try again later.”
- Scroll down to the schema section to get started.
- Once you’re done, select Save at the bottom.
Drupal Schema SEO Tips
- Use Drupal tokens to auto-fill certain fields in the Metatag Global section. View available tokens with the Browse available tokens link at the top of your Metatag editor page.
- Learn more about schema types from Schema.org.
- Search around to find template schemas for musicians, small businesses, books, products, etc.
- Always test your schema with the Google Structured Data Testing Tool.
Learn more from our Drupal Education Channel.