Specbee: Configuring the Drupal 9 Metatag Module - A Brief Guide

Configuring the Drupal 9 Metatag Module - A Brief Guide Shefali Shetty 04 Oct, 2022 Subscribe to our Newsletter Now Subscribe Leave this field blank

Meta tags are often underrated. Sure, they are not visible on your page up front but they are those hidden ninjas that can elevate your SEO game. These modest snippets of text that describe your page can turn out to be invaluable. Information in the meta tags can appear in the search engine results, browser tab, and social media posts. The Drupal 9 Metatag module helps site builders dynamically create and manage these metadata (or meta) tags for each of their web pages through an interactive admin interface (and no code!).

With the Drupal Metatag module, you can provide structured metadata and even customize meta tag elements. Meta elements are tags used in HTML or XHTML documents to provide structured metadata about a web page. They are part of a web page's head section. Multiple meta elements with different attributes can be used on the same page. Let's dive in and learn how to improve your website’s SEO ranking by setting up the Metatag module the right way.

Image removed.

Configuring the Drupal 9 Metatag Module

Meta tags can specify a web page's title, description, keywords, and any other metadata not provided through the other head elements and attributes. You need to add meta tags in the head section of your Drupal 9 pages for the title, description, keywords, Twitter card, and Facebook open-graph - to make your website SEO friendly. Download and install the module here.

With the Drupal Metatag module, we can configure:

  • Meta tags for the home page(front page)
  • Meta tags for a Content-type
  • Meta tags for view pages

Let’s discuss more on configuring the Metatag module for each one of them.

Configuring Drupal 9 Meta tags for the Home page

After installing the module, you can edit global configurations at /admin/config/search/metatags. Set the global configuration for the front page. Click on Edit to get into the details.

Image removed.

Drupal 9 Metatag - Configuration for Frontpage

Enter the Page Title, Description, Abstract, and Keywords.

Image removed.

Drupal 9 Metatag - Configuration for Frontpage

Page Title

This snippet is useful not only to search engines but also to your users. It appears in the title bar of your web page and should not exceed 55 characters. It also acts as a title for when your web page is bookmarked.

Description

Enter a brief description of your website. Make sure that the description does not exceed 150 characters because search engines won't display more than that on a results page. If you don't have either field filled out, Google will decide what to display without any input from you. It can be very helpful to write up a snappy description for your content here.

Abstract

Enter a brief Abstract (Optional). Again, keep it to fewer than 150 characters but instead of something snappy, try to be as plainly descriptive as possible.

Keywords

Enter a comma-separated list of keywords relevant to your website.

Advanced Settings and Custom Meta tags

There are some important elements here that were previously handled by code.

Image removed.

Drupal 9 Metatag - Advanced Settings

Robots

Normally, if you want to block or allow search engines from indexing a page or disallow search engines to display cached copies or descriptions of your page, you would edit the site-wide Robots.txt file. Here, you can control all of it and more with the Robots meta tag by checking/unchecking the various indexing options it provides.

News Keywords

This Meta tag is exclusively used by Google News, which uses comma-separated keywords as inputs.

Rights

Any details about copyright or trademarks that you might have, should go here.

Image

This one is also relatively new and can be handy for telling social networks which image they should use with a post.

Canonical URL

Canonical URLs are very useful for dealing with duplicate content issues. This is something that is often a problem on e-commerce sites where product listings are duplicated on multiple pages. The Metatag module does a good job of handling this by default.

Shortlink URL

This element acts as an alternative to link shorteners. In Drupal they usually come out looking something like this:

Original Source

This tag is also something that Google came up with, this time to help identify the original source of content. This one may be particularly useful for news sites, but can be safely ignored by most.
Once you have updated all the fields, save your settings.

Configuring Drupal 9 Meta tags for a Content type

To configure meta tags for a content type, you will need to edit global configurations at /admin/config/search/metatags and set the global configuration for Content. Click on Edit to get into the details. If you want to add different metatags for different content types, click on the “Add default Meta tags” link on the top left corner of the page. Select the content type you wish to add metatag to and click on Save and configure.

Image removed.

Drupal 9 Metatag - Configuration for Content types

Image removed.

 

Drupal 9 Metatag - Configuration for Content type: Article

The content type will be listed in the Meta tags screen. The above screenshot shows the content type ‘Article’. Click on Edit to add metatags.

Enter Page Title, Description, Abstract, and other necessary settings. Follow the same procedure as mentioned above in configuring metatags for the front page.

Configuring Drupal 9 Meta tags for View pages

Enable “Metatag: Views” module which is a sub-module of the metatag module.

Image removed.

Drupal 9 Metatag - Configuration for Views

Edit global configurations at /admin/config/search/metatags. Click on override to get into the details.
To add the meta tags in view go to the views edit screen and click on the meta tags link.

Image removed.

 

Image removed.

 

The above setting is the default setting for the view page.

Final Thoughts

The Drupal 9 Metatag module is a powerful amalgamation of various individual modules that aims at lowering manual coding to configure meta tags. Modules like the Page Title, Open graph Meta tags, Easy Meta, Refresh, and more are now merged into the Metatag module. It also provides multilingual support, can override meta tags based on entity objects, supports editorial workflows, and much more. As a leading Drupal development company, we implement best practices both in strategy and coding that can help you achieve project success. Starting a new Drupal project? Talk to our Drupal experts today to find out how we can help.

Author: Shefali Shetty

​​Meet Shefali Shetty, Director of Marketing at Specbee. An enthusiast for Drupal, she enjoys exploring and writing about the powerhouse. While not working or actively contributing back to the Drupal project, you can find her watching YouTube videos trying to learn to play the Ukulele :)

Drupal 9 Drupal 9 Module Drupal Development Drupal Drupal Planet SEO

Leave us a Comment

 

Recent Blogs

Image Image removed.

Configuring the Drupal 9 Metatag Module - A Brief Guide

Image Image removed.

What Search Engines want and why Drupal is better for SEO

Image Image removed.

How to Comply with Cookie Laws using OneTrust Cookie Consent Module

Want to extract the maximum out of Drupal? TALK TO US

Featured Success Stories

Image removed.

Upgrading and consolidating multiple web properties to offer a coherent digital experience for Physicians Insurance

Image removed.

Upgrading the web presence of IEEE Information Theory Society, the most trusted voice for advanced technology

Image removed.

Great Southern Homes, one of the fastest growing home builders in the United States, sees greater results with Drupal 9

View all Case Studies

Talking Drupal: Talking Drupal #367 - Don’t Game the Credit System

Today we are talking about Not Gaming the Credit System with Tim Lehnen.

For show notes and more information visit: www.talkingDrupal.com/367

Topics
  • Episode 361
  • Who governs credit
  • What is “Gaming the System”
  • What is the motivation to game the system
  • What are the penalties
  • How is the Credit System used
  • How big of a problem is this
  • Why is this a difficult problem
  • Mike Herchel’s blog post
  • First time contributions
  • What to do if you see issues
Resources Hosts

Nic Laflin - www.nLighteneddevelopment.com @nicxvan John Picozzi - www.epam.com @johnpicozzi Tim Lehnen - @hestenet

MOTW

Facets The Facet module allows site builders to easily create and manage faceted search interfaces. In addition to the UI components that come out of the box, themers and module developers can build their own widgets that can optionally be contributed back to Drupal.org. Facets work with Drupal Core Search and Search API, meaning that code and configuration can be reused as-is with the most popular search solutions available to Drupal.

Evolving Web: Content Management System (CMS) Optimization for Higher Education

Image removed.

Building websites for universities and colleges comes with a unique set of challenges. Unlike most organizations, higher education institutions are not singular entities but constellations composed of faculties, institutes, departments, administrative units, and ad hoc entities and initiatives. Many of these distinct components have their own set of audiences and functional requirements as well as a shared need for brand uniformity.

Furthermore, a post-secondary institution’s web presence is as important as its campus grounds in terms of how the world perceives it, and its websites need to be up-to-date and modern-looking to compete effectively in the global marketplace.

Higher education websites also pose unique challenges from a content management standpoint. University and college websites typically have significant legacy content that needs to be carried over from previous sites. They also may have dozens or even hundreds of people, from instructors to support staff, who need to create and post content every semester – people who may have had minimal CMS training.

Add in budgetary constraints and timelines dictated by the rhythms of the academic year, and you have a recipe for a challenging environment in which to run digital projects.

Which CMS is Best for Higher Education?

In our work with universities and colleges across North America, Evolving Web has focused on two content management systems: Drupal and WordPress. As the CMS of choice for 71% of the world’s top 100 universities, Drupal is best suited to the complexities that often exist in the post-secondary context. We address how well Drupal is suited to higher education websites in this blog post.

Institutional websites like those used in higher education typically need robust and customizable search interfaces that can integrate third-party systems such as those used for course catalogues. They also often require a multi-site architecture and integration with third-party marketing and identity management tools. For such sites, Drupal is the clear choice for a CMS. Among its advantages are:

  • Security 
  • Composable solutions
  • Out-of-the-box search engine optimization functionality
  • Built-in functionality for content editing, search, user access, multilingualism and contact pages
  • Design flexibility that gives authors quick page building and editing tools
  • Ability to customize the integration of a wide range of third-party APIs including single sign-ons, course catalogues and more

However, for simpler sites with less robust current and future requirements, WordPress’ simplicity and ease of use are advantageous.

WordPress has block editing tools that enable users to easily create interesting content layouts. The CMS is intuitive for site authors and editors, and widely used, therefore requiring only minor training. 

Both platforms are open source, meaning that best practices tend to be shared amongst higher education institutions, which provides a huge advantage over proprietary options.

Have you Outgrown your CMS?

Institutions change. They expand, become more complex and outgrow their original digital homes. So what might have started as a simple site befitting WordPress might come to benefit from Drupal’s features. 

These are some signs that the CMS you are using might no longer be fit for the job you’re asking of it:

  • You’ve reached a point where your technical maintainers cannot push the system further.
  • Your site lacks accessibility or fails to hold up to increased SEO expectations. 
  • You cannot update your content in real-time.
  • You have form but lack functionality.
  • You have functionality but lack form, leading to a lack of consistency and brand compliance.

How To Get The Most Out of Your CMS

Higher education institutions ask a lot from their content management systems. Your typical university or college website is an amalgam of new and archival content aimed at a wide range of audiences – current and prospective students, faculty and staff, administrators, alumni, donors and others – and often maintained by a large team of content creators.

Higher education CMSs are liable to get messy quickly unless the right structures are established at the start.

At Evolving Web, we build websites with the expectation that they will continue to be relevant for years after they launch. The philosophy is that the client team will have the ability and tools to update the content and structure as needed throughout the website’s lifecycle. However, most websites don’t last that long, with research showing that the average site lasts around two years and seven months according to Orbit Media. Whether or not your site outlives this average depends on the robustness of the original design and whether it’s set up in a sustainable way.

Optimization Strategies

Here are six strategies that higher education institutions can use to get the most out of their CMS and ensure the longest possible lifespan for their investment:

  1. Have a short- and long-term management and maintenance plan for keeping information current and relevant. Planning a content strategy in parallel with the site solution is an invaluable investment of time and energy. Crafting a digital marketing and communications strategy that encompasses the web and other digital tools can help outline roles and responsibilities and organize the types and categories of new content. For more on this, read our blog post on content governance.
  2. Involve the people who will be using your website early on in the process. The people who will be updating and using the site should be involved in the conversations on design and user experience right from the start. In addition to empowering them early on with knowledge of the CMS, it will also give the web management team a sense of ownership and encourage sound management of web resources.
  3. Ensure your software is always up to date. Falling behind on CMS upgrades means guaranteed headaches down the road, costing organizations time and money. Regular updates will keep your site safe, secure and running smoothly.
  4. Minimize custom code. The flexibility of Drupal, in particular, means little need for custom coding. As a rule, the most customization you put into a site, the harder it becomes to maintain. If you require customization, it is advisable to turn to the original developer rather than to improve an in-house solution that will make the CMS more complex.
  5. Ensure that content is properly and consistently tagged. Universities and colleges have a wide range of audiences, and these audiences have particular content needs. A failure to properly categorize content within the CMS through tagging is a guaranteed path to a messy site that fails to deliver content to its intended audience. It also limits your options for creating dynamic search and personalization features in the future.
  6. Hire a team that is reputed to deliver quality solutions. Since 2007, Evolving Web has helped organizations big and small unlock the full potential of their content management system. This includes many higher education institutions, including Princeton, Emory, McGill, Waterloo and many others. 

//-->

+ more awesome articles by Evolving Web

Drupal blog: State of Drupal presentation (September 2022)

This blog has been re-posted and edited with permission from Dries Buytaert's blog.

DrupalCon Europe 2022 Driesnote presentation

Last week, over 1,200 Drupalists gathered in Prague for DrupalCon Europe. It was great to see everyone together in person.

In good tradition, I delivered my State of Drupal keynote. You can watch the video of my keynote or download my slides (380 MB).

Image removed.

Why the Open Web should win

Today the web is ingrained in every aspect of our daily lives. We use it for work, to socialize, to pay our bills, get healthcare, and gain access to information.

As more transactions, collaborations and interactions are taking place online, there is now a greater responsibility to ensure that the web is inclusive of every person, and accounts for everyone's safety.

When people are excluded from being able to access online experiences, they are also excluded from rewarding careers, independent lifestyles, and the social interactions and friendships that bring people together.

For those reasons, we need to do everything we can to protect and grow the Open Web.

Image removed.

Caring about Drupal is caring about the Open Web

In my keynote, I made the point that Drupal is an important player in the preservation and growth of the Open Web.

I kicked off my keynote talking about some of my personal reasons for using Drupal, most of which have to do with the future of the Open Web.

After all these years, I continue to upload my photos to my website, despite there being plenty of simpler alternatives (e.g. Facebook or Instagram). I do this for a number of reasons.

First, my photos are precious to me, and I don't want them to get lost. I look at news stories about MySpace and Facebook losing users' content. I like that I'm in control of my own data, including my backups.

Second, I don't like how proprietary platforms limit my creative freedom. Pages and templates within a closed platform tend to look the same. It's hard to stand out, or even just express yourself the way you want to. With Drupal, I'm unrestricted in how I share my photos.

Third, I don't like how these platforms treat my friends and family. Many of them use invasive tracking. For that reason, I don't use trackers or ads on my website. My site aspires to the privacy of a printed book.

All of these are reasons why I want both Drupal and the Open Web to win. We don't want to live in a world where proprietary platforms reign supreme. We need more "Good Software". Software that is open, flexible, secure, accessible, and pro-privacy.

Making security, privacy, accessibility, multilingual capabilities, usability, and ease of maintenance top priorities is hard work work, but it's worth it. Caring about Drupal is the same as caring about the Open Web.

Drupal's growth and influence

Image removed.

The good news is that Drupal has grown into a powerful platform for ambitious site builders. Drupal empowers millions of ambitious site builders to create Open Web experiences.

However, we have to get better at promoting what we're good at to ensure more people understand how powerful and influential Drupal is. That influence becomes really clear when you look at Drupal's end users.

Making Drupal's high bar easier to achieve

Because of Drupal's impact on the digital landscape, we keep a high bar with regards to stability, reliability, accessibility, security, backwards compatibility, and more. With great impact comes great responsibility.

This high bar can make contribution difficult and slow, and is sometimes what keeps people from contributing back more to Drupal.

Unfortunately, we can't lower the bar. However, we can make it easier to achieve our high bar. That's why we are moving from Drupal's homegrown collaboration tools to GitLab.

GitLab streamlines and automates various steps of the contribution process. Check out the Drupal.org GitLab video from the Drupal Association for an update.

Welcoming more people to Drupal 10

Another way to accelerate innovation is to grow our capacity and attract more people to Drupal.

The best way to attract new people to our community is by making easy-to-use software that solves real world problems.

Since my previous DrupalCon keynote, I'm happy to report that we've made a lot of progress on our key initiatives. A few key highlights:

  • Olivero became stable/default
  • CKEditor5 became stable/default
  • We're almost PHP 8.2 ready
  • We upgraded to Symfony 6
  • And we made Drupal Core smaller

Each of these initiatives is significant because they make Drupal and the Open Web more approachable.

In addition, the Project Browser initiative and Automatic Updates initiative saw tremendous progress. Videos below.

To learn more about Drupal's strategic initiatives, you can watch the Drupal Core Initiative Leads keynote. Highly recommended for those that want to contribute.

Upgrading to Drupal 10

Drupal 10 is scheduled to be released in mid-December. And after the Drupal 10 release, users will have 11 months to upgrade from Drupal 9 to Drupal 10. Drupal 10 will require PHP 8.1, something to plan for as well.

Image removed.
Drupal 10 will be released on December 14, 2022. This gives site owners until November 2023 to update from Drupal 9 to Drupal 10.

Luckily, the upgrade path has never been easier. In the video below, we compare the upgrade path from Drupal 8 to Drupal 9 to the upgrade from Drupal 9 to Drupal 10. As you can see, the Drupal 9 to 10 upgrade is much more automated. It will be the easiest yet!

The update to Drupal 10 is required because some of Drupal 9's third-party dependencies will reach end-of-life. If you don't upgrade within 11 months, you will be running a site with unmaintained third-party dependencies.

Image removed.
We recently released the first Drupal 10 beta release. At the time we released Drupal 10 beta-1, 3 times as many modules were ready compared to when we released Drupal 9 beta-1. More than a 1,000 modules are already ready for Drupal 10!
Image removed.
Thanks to various focused initiatives, Drupal is starting to get easier. Drupal 8 was peak difficulty.

Thank you

I hope we can all find ways to care about building the web we want to see for the future. Making Drupal better means making the Open Web better.

I'd like to thank everyone that was involved in making DrupalCon Prague, Drupal 10, and the key initiatives described above a resounding success.

Last but not least, I'd like to encourage even more people to get involved. It might not always be easy, but it's well worth it.

Lullabot: Lullabot Podcast: Healthy Minds @Lullabot

We’re so excited to share about a program that we're working on inside of the Lullabot team – Healthy Minds @Work. This is a science-based app and program shown to help strengthen your well-being skills. The Healthy Minds program was built by neuroscientists and is designed to teach and measure skills associated with emotional well-being using meditation and other contemplative practices.

A group of 'Bots get together to discuss the program and the 30-Day Challenge that's been going on inside Lullabot.
 

OpenSense Labs: Ahoy Prague! Attending First DrupalCon

Ahoy Prague! Attending First DrupalCon Akshita Thu, 09/29/2022 - 17:26

The DrupalCon newbie trinity from OpenSenseLabs - Anmol Goel (Tech Lead), Pritish Kumar (Tech Lead), and Akshita Rawat (Marketing Lead) - attended DrupalCon Prague 2022 and were psyched with the community exposure. We were looking forward to getting to know the community better and meeting familiar faces who we had only heard or read about. This is a quick recap of our experience at DrupalCon Prague 2022.  

 

I got introduced to the Drupal community in 2017. Ever since, I have been learning and writing about the new upgrades, modules, distributions, and the community. 

From a non-tech perspective, I always wondered what DrupalCon could be like other than technical sessions and contributions. 

When I got my session selected for DrupalCon Prague 2022, I was ready to know the answer. 

Our team included Anmol Goel, Pritish Kumar, and myself. Anmol & Pritish were selected as volunteers for the event. It is an opportunity given to a handful of community members who have made significant contributions to the community. I was to speak on effective team management practices, also highlighting our employee-first policies at OpenSense Labs. 

All three of us were looking forward to getting to know the community better and meeting familiar faces who we had only heard or read about (for sooo long). 

Keynotes and Dries Note

The opening keynote majorly covered the new product updates and why they matter. With CKEditor 5 coming up in Drupal 10 - it was the highlight for me. 

The keynote also covered new updates in The Local Inititative,  Project Browser, & moving to Git for community contribution, among others. 

DriesNote has always been a popular session in DrupalCon. When you sit for a Dries note, it is not just about learning the product growth plan, you experience how much the community looks inward to make it better for everyone.

Image removed.

This year’s Dries note focussed on 2 things: 

  1. How much user-centric is Drupal
  2. The upgrades to be expected in newer versions 

It was interesting when he used his website as a use case to showcase how Drupal is a safer bet (keeping in mind user privacy, owning data, and accessibility) than most of the platforms (esp. social media platforms) 

Important product updates included - Recipes, Project Browser, and moving to Git for collaboration (more about it later). 

And then our Aha! moment.


Exploring the booths & engaging with the community

We started our quest by hopping from one booth to another and interacting with everyone with who we could. I was amazed at the thought-process behind all the efforts they had put in for their booths, in terms of creativity. 

As a Marketer, I was inspired by their ‘hook’ to bring in the audience and show them what they wanted to. 

In the Pantheon booth, they were literally printing your t-shirts in front of you. 

Image removed.

Dropsolid had Beat Saber in their booth. You could play it all the time and compete with fellow community members for the highest score. 

Image removed.

 

Then Annertech booth, where their team was nice and patient enough to teach us how to juggle (very helpful if you are a Project Manager :P)
 

Image removed.


1Xinternet had a chill-out place in their booth with a photo competition. Guess who won the photo challenge competition on Day 3. 

Image removed.


Factorial was serving really good coffee with a cute unicorn over their booth. 

At SystemSeed booth, we met Bran who bought little handcrafted jam bottles he got exclusively for DrupalCon. 

Image removed.

 

Not to forget the open mic, and jamming sessions going on throughout. 

As Volunteers & Speakers

Anmol: It was a delightful and wholesome experience attending the conference. Since this was my first community event, I was nervous too. I volunteered as a session monitor for ‘Growing and sustaining an Open Source Drupal Distribution’. 

The Q&A for this session went on for almost 30 mins. It was an extraordinary experience by being involved so closely in a session and seeing how the community engages within. This definitely inspired me to submit sessions for the next Con. 

Being involved with sessions as a runner, and ensuring everything was in place and done right when the session happens brought a lot of respect for the organizing team. They made the first DrupalCon Europe post-pandemic happen without being located in the same place. Cheers to them!


Akshita: As a first-time DrupalCon Speaker, I was jittery and excited after all it was an opportunity I got after not being able to make it to 2 DrupalCons (was twice selected as a speaker before). 

They say the third is a charm. It must be. 

I got stage fright when preparing for my session since this was the first event I had attended after the pandemic. And the room was packed. But after hearing so many sessions in the first 2 days and meeting amazing people of Drupal, I was more comfortable when giving the session. 

Post-session when someone from the audience reached out to tell me that they really liked my session and learned something from it - made the remaining Con even better :) 

Image removed.


Contribution

The last day of the event was focused on contribution. We worked with Leslie and the team on Project Browser. Project Browser helps new website owners to find modules of their interest from their own website. Here’s how it went. 

Anmol: I was looking forward to contribution since I wanted to see how I could bring it back to India and introduce it to new team members. Working with the community on issues and resolving them in real time was an amazing experience. It felt good by doing my bit and giving back to the community. 

Image removed.


Akshita: This was my first contribution. I wasn’t really sure what it would be like, since I was looking for a no-code contribution. Found Leslie who introduced me to Project Browser and I made my first non-code contribution by adding and reviewing couple of module descriptions for Project Browser. It was so easy and I will definitely contribute more moving forward.


Trivia Night

Our team - Uzumaki 1 - won second prize in Trivia. We had 2 community members joining us - Deepak and Fernando Simoes. For one of the rounds where we answered all the questions correctly, we won a free drinks voucher too.

Image removed.


Meeting these amazing people who make the community and product what it is, genuinely made us feel that we are a part of it. Learnings from the amazing sessions and having non-Drupal conversations with them inspires you to get more involved with the community. In the end, I realized, even as a non-techie, I too can contribute in unique ways, in building the community, and making the product better. 

The community I have been part of for so long finally has a face. 

DrupalCon was tiring, no doubt at all, but it was an enthralling experience for all of us. 

Image removed.Articles Off