What is a website slug?

Last Updated
Orange circle in background. Text in foreground: 'emphasis.la/what-is-a-website-' followed by a big slug

The slug is a unique combination of letters, numbers, and symbols that forms the last part of the Uniform Resource Locator (URL) link. This is what you type into the browser to find a website.

When the web was younger, it was common practice to format with non-descriptive IDs such as example.com/page_id=123. If you were looking at this URL, you had no idea what could possibly be in the page you were going to. 

These days, non-descriptive slugs are commonly used by spammers and other bad actors when they don’t really want you to know what is on the page.  So if you don’t use descriptive URL’s, then you could be put into the same category as them.

Modern URL structures now add a descriptive slug so people have a better idea of where they are going. URLs are often put into categories so they are even more descriptive. For example if you were a jeweler that sold rings and bracelets, you could have a URL structure of example.com/rings/slug-for-gold-ring for a gold ring. Then you could also have a slug of example.com/bracelets/slug-for-a silver-bracelet for a silver bracelet. 

The full URL may or may not directly affect search engine rankings. I can confirm that it does at least affect Search Engine Optimization (SEO) indirectly because people trust a URL that is descriptive more than a non-descriptive URL. A proper slug and full URL can lead to a higher click-through rate (CTR) for your links. CTR is the percentage of people that see a link to your page and click on that link. Google and other search engines use CTR as a signal of whether your post or page satisfies the user’s search query. 

Why is it called a slug?

According to the New York Times it is an old printing term from the newspaper era:

The term slug derives from the days of hot-metal printing, when printers set type by hand in a small form called a stick. Later huge Linotype machines turned molten lead into casts of letters, lines, sentences and paragraphs. A line of lead in both eras was known as a slug.

~New York Times, November 2014

Conclusion

While it may seem insignificant, tiny changes to your website can make a huge difference for your online visibility. A proper slug can help people (and possibly machines) understand what a page is about. It can help to improve your click through rate which could be a good signal to search engines.

Formatting your slugs can be beneficial to your website. If you need help choosing or changing your slugs please reach out to us.