| Drupal
The "Be Sure" Module Checks Drupal SEO

This week, an OSTraining member asked us about optimizing their Drupal 8 site. 

We have recommended some modules before, including the SEO Checklist module. However, there's an interesting option in Drupal 8, called the "Be Sure" module.

I'm going to explain how you can use Be Sure.

In order to get started, you must download, install and enable the Be Sure module. The core module will only give you the report page, so be sure to select the extra sub-module.

In this example, we'll select and install at least the SEO sub-module.

Enable the Be Sure module

  • Go to Reports > Be Sure.
  • You will see your SEO completion score being calculated automatically.

seoreport3

  • Select the SEO tab.
  • You will see that it is broken down into 4 categories. By default we are looking at the breakdown for page structure. 

seocategories4

  • There will be several recommended SEO modules. Each page links to the recommended project page.

before5

A note on Be Sure's recommendations

The module does have some useful advice, but some recommendations are out-of-date. This could be because the module was ported from Drupal 7. For example, the Page Title is no longer used on Drupal 8, and you would use Metatag instead.

However, you can easily edit the modules listed and create a checklist for your Drupal 8 site. 

Open the bs_seo.module and bs_seo.page_structure.inc files. To update the checklist, simply update the 3 references of it to another module

bs_seo.page_structure.inc line 12

 return Drupal::moduleHandler()->moduleExists('page_title'); 

bs_seo.module line 62 

 '!module' => Drupal::l('Page Title', Url::fromUri('https://www.drupal.org/project/page_title')), 

If you wanted to remove this entry we just have to delete the following lines of code:

bs_seo.page_structure.inc ... lines 7-13 
bs_seo.module ... lines 57-64


About the author

Daniel is a web designer from UK, who's a friendly and helpful part of the support team here at OSTraining.