A slug is the part of a URL that identifies a specific page in a human-readable form. For example, in yoursite.com/blog/my-first-post, the slug is my-first-post.
Slugs should be lowercase, use hyphens instead of spaces, contain no special characters, and be as short and descriptive as possible. They help with both SEO and usability.
Frequently asked questions
What is a URL slug?
A slug is the part of a URL that identifies a page in human-readable form. For example in "yoursite.com/blog/my-first-post", the slug is "my-first-post". Slugs should be lowercase with hyphens.
What is the best separator for a URL slug?
Hyphens are recommended by Google over underscores for URL slugs. Google treats hyphens as word separators, making your URLs more readable for both users and search engines.
What does transliterate accents do?
Transliteration converts accented characters to their ASCII equivalents — for example é becomes e, ü becomes u. This ensures your slug is compatible with all systems.
What is kebab-case vs snake_case in URLs?
kebab-case (hello-world) is the standard for URLs and is recommended for SEO. snake_case (hello_world) is more common in programming and file names.