# Set up structured tagging with tag groups and category tag restrictions

**URL:** https://meta.discourse.org/t/set-up-structured-tagging-with-tag-groups-and-category-tag-restrictions/48260
**Category:** Site Management
**Tags:** tutorial, tags
**Created:** [05.Август.2016 15:25:43 UTC](https://meta.discourse.org/t/set-up-structured-tagging-with-tag-groups-and-category-tag-restrictions/48260 "2016-08-05T15:25:43Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![Discourse](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/discourse/32/148734_2.png) [@Discourse](https://meta.discourse.org/u/Discourse)
#### Post date: [05.Август.2016 15:25:43 UTC](https://meta.discourse.org/t/set-up-structured-tagging-with-tag-groups-and-category-tag-restrictions/48260/1 "2016-08-05T15:25:43Z")

</div>

Tag support is a core feature of Discourse. In this How-To I’ll go through setting up a tag schema like [Car Talk](http://community.cartalk.com) uses.

We’ll want to achieve these things:

- Tags for car makes and car models.
- Only allow the car make and model tags to be used in certain categories.
- Car model tags can only be chosen if the matching car make tag is used.

## Prerequisites

Tagging is enabled by default in Discourse (via the `tagging_enabled` site setting). If it was previously disabled, ensure it is turned on.

In a schema where we’re strict about how tags are used, we should prevent most people from creating new tags. The `create_tag_allowed_groups` setting controls which groups can create new tags (defaults to admins, moderators, and trust level 3). You can also control who can apply tags to topics with the `tag_topic_allowed_groups` setting.

## Tag Groups

Go to the tag groups page (`/tag_groups`).

 ![manage tag groups](https://global.discourse-cdn.com/meta/original/4X/f/f/d/ffdc9b466ac696a04f1ad40007618ae02395ccfb.png)

### Top-level tags

First let’s create the car make tags, which we want people to enter first.

On the tag group page:

1. Create a new group.

2. Give it a title.

3. Add the tags that should belong in the group. You can add existing tags, or create new ones from this page.

4. We only want people to use one car make tag per topic, so check the box to add this limitation.

5. Save the group.

### Parent-child tag relationships

Now we’ll define the car model tags, which are grouped according to the car makes. There will be one group for each car make.

Create another group as before with an appropriate name. This time we add a parent tag. In this example, we define the Honda car models group, and use honda as the parent tag.

 ![create parent tag](https://global.discourse-cdn.com/meta/original/4X/9/f/0/9f0357f606d10794e80c5e9f4c1b0f8be66378e1.png)

### The result

At this point, tagging a topic will obey these rules. When trying to add tags, the first tag can only be one of the car makes (or other tags that have no limitations on where they can be used).

 ![parent tags](https://global.discourse-cdn.com/meta/original/4X/6/9/d/69d6d3982e17dfe488e4df29beb458f93fd6fff3.png)

The second tag can be one of the model tags matching the chosen Makes tag.

 ![child tags](https://global.discourse-cdn.com/meta/original/4X/c/4/a/c4a52de917a8b94700954ba75db410c874ed0474.png)

### Visibility and usage restrictions

If needed, you can restrict the visibility or application permissions of tags to specific user groups:

 ![tag restriction](https://global.discourse-cdn.com/meta/original/4X/8/0/f/80f615743f95ab233e7f44fe28fbd8ab329bf81b.png)

## Category restrictions

If I only want car discussions to happen in a certain category, I can restrict the use of all the car make and model tags from the category settings.

In the “Tags” tab of a category’s settings, you can:

- **Restrict tags to the category** — add individual tags or tag groups that should only be available in this category.
- **Allow global tags** — optionally allow other unrestricted tags alongside the restricted ones.
- **Require tag groups** — require that new topics include a minimum number of tags from specific tag groups.

 ![category tag settings](https://global.discourse-cdn.com/meta/original/4X/1/8/1/181ba27448cf04fde6a359228fce182454056b1f.png)

If I have other categories where these tags should also be permitted, they can be added in those categories’ settings in the same way.

And that’s it!

## Additional Resources

- [Admin guide to tags in Discourse](https://meta.discourse.org/t/a-comprehensive-guide-to-discourse-tags/121041)
- [Questions about creating, uploading, editing tags](https://meta.discourse.org/t/questions-about-creating-uploading-editing-tags/107521)
- [Educating users about tags](https://meta.discourse.org/t/educating-users-about-tags/82386)

> Last edited by @sam 2026-03-19T03:52:15Z
> 
> > **Check document**
> >
> > Perform check on document:
