What‘s the difference between slugs and URLs?
A slug is just a part of a URL
This URL is constructed by:
- a protocol:
- a domain:
- a slug/path:
The URL refers to the entire thing.
The slug is the part of a URL that explains what the page (path) you’re going to is about in human-friendly keywords. I wrote slug/path above because both terms are used. Slug is especially used in the SEO scene.
To reinforce and sum it up:
- a slug is a descriptive path in a URL
- a URL refers to the entire thing (protocol, domain, slug/path)
Your slug is an important part of SEO (Search Engine Optimization) so it’s worth learning how to create user-friendly slugs on your website.