Taxonomy

Taxonomy is Drupal's system for classifying content with terms grouped into vocabularies, such as tags and categories that can be flat or nested.

Learn DrupalDrupal glossary Last updated

Taxonomy is the Drupal system for classifying content. You create a vocabulary, which is a group of terms, such as a list of topics, ingredients or product lines, and then attach terms from it to your content. Drupal creates a listing page for each term, so classifying content also gives visitors a way to browse it.

How taxonomy works in Drupal 11

Three parts make up the system:

  • A vocabulary is a configuration entity (type taxonomy_vocabulary) with a machine name stored under the key vid. It is the bundle for terms.
  • A taxonomy term is a content entity (type taxonomy_term, stored in the taxonomy_term_data table). Its canonical address is /taxonomy/term/{taxonomy_term}.
  • A reference field on a content type attaches terms to content. The user guide says terms are normally attached as reference fields on other content entities.

A vocabulary can be flat or hierarchical. Blog tags are usually flat. A list of ingredients can nest, with tomato varieties under vegetables. A term stores its parent in an entity reference base field named parent, and it also has a weight field.

How taxonomy classifies content in DrupalA vocabulary is a group of terms. Each term has its own page at /taxonomy/term/ followed by the term ID, which lists the content tagged with it. A reference field on a content type attaches terms to content.VocabularyA group of termsExample: IngredientsFlat or nestedTermsButter, Eggs, MilkEach has a weight andcan sit under a parentTerm page/taxonomy/term/{ID}Lists the contentwith that termholdshasContentA Recipe tagged withButter and Eggsa reference field on its content type picks termsTerms are content entities; a vocabulary is the bundle they belong to.
How a vocabulary, its terms, term pages and a reference field fit together.

Example

To categorize recipes by ingredient, follow the steps in the user guide:

  1. Go to Structure › Taxonomy and choose Add vocabulary. Name it Ingredients and save.
  2. Choose Add term and create terms such as Butter, Eggs and Milk.
  3. Go to Structure › Content types, open Manage fields for Recipe and add a Reference field. Point it at Taxonomy term and the Ingredients vocabulary, and allow unlimited values.

The field's Create referenced entities option lets editors add a new ingredient from the recipe form itself. The user guide turns it on for this field.

Common mistakes

  • Using one big vocabulary for everything. Topics, audiences and product lines are different questions. Give each its own vocabulary so that editors see only the terms that fit.
  • Letting free tagging run unchecked. With Create referenced entities on, editors can add terms themselves, and near-duplicates such as "Recipe" and "Recipes" can appear. Switch it off for lists that need to stay tidy.
  • Building a hierarchy nobody needs. Nesting suits lists with a natural parent and child, such as vegetables and tomatoes. Keep tags flat.
  • Using a text field for categories. Typed text cannot give you term pages or one managed list. Use a taxonomy reference instead.
  • Forgetting that terms are content. A vocabulary moves between environments as configuration, but the terms inside it are content and do not travel with a configuration import.

For marketing and content teams

Taxonomy is how you decide what your site knows about its own content. The terms you create become the filters, the topic pages and the related-content groupings your visitors use. Agree on the vocabulary with your team before launch, name terms the way your audience searches, and clean up duplicates now and then. Whether editors may invent new terms or must pick from a fixed list is a setting of the reference field, so decide it for each field.

Sources

Questions about Taxonomy

A term is one label used to classify content, such as Butter. A vocabulary is the group of terms it belongs to, such as Ingredients. The field's settings name the vocabulary that editors choose from.

Create a vocabulary under Structure › Taxonomy, add terms to it, then add a Reference field to the content type that points to taxonomy terms in that vocabulary. Editors then choose terms on the content form.

Yes. A vocabulary can organize its terms in a hierarchy or keep them flat. Tags are usually flat; a list such as ingredients can nest, with tomato varieties under vegetables. Each term stores its parent in a field.

Tags and categories are two common uses of taxonomy. Both are vocabularies of terms attached to content through a reference field. Whether a vocabulary behaves like free tagging or a managed list depends on how you configure the field.

Cite this definition

"Taxonomy." DXPR Drupal glossary, https://dxpr.com/hc/documentation/learn-drupal/drupal-glossary/taxonomy. Last updated October 26, 2026.

Related terms

All Drupal terms from A to Z