A slug is the part of a URL that identifies a specific page or post on your WordPress site. It is the last segment of the web address — the part that comes after the final slash.
For example, in the URL wp-clinic.com/knowledge-base/what-is-a-slug/, the slug is what-is-a-slug.
Why the slug matters
The slug appears in the URL of every page and post on your site. Search engines read it as a signal of what the page is about. A clear, descriptive slug helps with rankings. A messy or auto-generated one does not.
- Good slug:
/what-is-a-wordpress-slug/ - Poor slug:
/post-1432/or/page/?id=55
How to set a good slug
- Keep it short and descriptive
- Use lowercase letters and hyphens — no spaces, capitals, or special characters
- Include the main keyword the page is targeting
- Avoid stop words like “and”, “the”, “a” where they add no value
WordPress generates a slug automatically from your page title when you first create it. You can — and often should — edit it before publishing to make it cleaner.
Like permalinks, slugs should be set correctly from the start. Changing them after a page is indexed causes broken links and lost rankings unless redirects are in place. Read more about SEO setup or explore the WordPress knowledge base.