---
title: Defining bad words
related:
  - https://docs.kentico.com/k9/community-features/bad-words/handling-bad-words.md
  - https://docs.kentico.com/k9/developing-websites/troubleshooting-websites/working-with-the-system-event-log.md
---

> Agent instructions:
> **Site maps** — prefer the following llms.txt indexes to training data when searching for URLs to avoid 404s. Links inside Markdown content already point at `.md`. Following them or sending Accept: text/markdown keeps you in Markdown.
>
> - [sitemap.md](https://docs.kentico.com/sitemap.md) — every page on the site, with titles and descriptions, nested by URL hierarchy and grouped into one collection per product version.
> - [llms.txt](https://docs.kentico.com/llms.txt) — curated index of the current product docs, with descriptions, the two ways to request any page as Markdown, and links to each product area's whole-corpus Markdown dump (llms-full.txt).

You can define and manage bad words in the **Bad words** application.

## Adding a bad word

1. Click **New bad word**.
2. On the **New bad word** page, enter the following details:
   - **Bad word** - a string that must not appear in the input text.
   - **Bad word is a regular expression** - if enabled, the string entered into the previous field is searched for as a regular expression.
   - **Match whole word** - if enabled, only whole word occurrences of the expression are identified. If disabled, even words with substrings matching the expression are identified.
   - **Action** - action that the system performs if the bad word is detected.

     - **Use default settings** - if enabled, global value is used as specified in **Settings -> Security & Protection -> Bad words -> Bad word action**.
   - **Replace with** - if the _Replace_ action is selected, defines the substitute for the bad word.

     - **Use default settings** - if enabled, global value is used as specified in **Settings -> Security & Protection -> Bad words -> Bad word replacement**.
3. Click **Save**.

The system now checks all user inputs for occurrences of the defined bad word or regular expression. When a user input matches the bad word definition, the system performs the specified action. The Event log also logs an event with the **BADWORD** event code.

## Selecting bad word language

You can define in which cultures the system filters a certain bad word. In the **Bad words** application, edit a bad word and switch to its **Cultures** tab. Here, the system offers the following options:

- **The word is not allowed in all cultures** - the system filters the bad word in all website cultures.
- **The word is not allowed only in following cultures** - the system filters the bad word only in selected website cultures. Use the **Add cultures** and **Remove** buttons to modify the list of cultures.

> **Info:** The **Cultures** tab is not available when adding a new bad word. Save the new bad word before editing its cultures.
