---
id: "url_slug"
kind: "datatype"
status: "draft"
is_pii: false
categories: ["texts", "internet"]
langs: ["common"]
quality: 80
url: "https://registry.apicrafter.io/datatype/url_slug"
---

# URL slug (`url_slug`)

> **Draft.** Draft records have not been reviewed yet and may be incomplete or wrong; do not treat them as authoritative for legal or compliance decisions.

Readable part of a page URL that names an article, post or product, made from its title: lowercase letters and digits joined by hyphens, such as hello-world in example.com/2024/hello-world. WordPress and most CMS build slugs this way; Django also allows underscores and capital letters, and some sites keep non-Latin letters percent-encoded. The regexp accepts the usual form with at least one hyphen: a one-word slug such as about cannot be told apart from an ordinary word. Field names are slug, url_slug, post_name and permalink.

- Personal data (PII): no
- Categories: Texts and  articles (texts), Internet (internet)
- Countries: global
- Languages: Common to most languages (common)
- Classification: identifier

## Detection

Regular expression (Python `re`):

```
^[a-z0-9]+(?:-[a-z0-9]+)+$
```

## Examples

- `hello-world` — Slug of the default first post of a WordPress site
- `sample-page` — Slug of the default page of a WordPress site
- `Hello world!` (invalid example) — A title, not a slug

## Translations

- ru: Слаг (ЧПУ) страницы: Человекочитаемая часть адреса страницы, образованная из заголовка статьи или товара, — строчные латинские буквы и цифры через дефис.

## Sources

- wikipedia: <https://en.wikipedia.org/wiki/Clean_URL>
- doc: <https://docs.djangoproject.com/en/stable/ref/models/fields/#slugfield>

## Quality

Score 80/100. Missing: mapping (Wikidata, Schema.org, ...), detector coverage.

JSON: <https://registry.apicrafter.io/api/v1/datatypes/url_slug.json> · Edit: <https://github.com/apicrafter/metacrafter-registry/edit/main/data/datatypes/any/texts/url_slug.yaml>
