image-f64e4b47905ad6964efea14be1096fdf8d8696b5-3984x2656-jpg

WHATS IS SLUG ?

A slug is the unique identifying part of a web address, usually at the end of the URL.

For example, the article we are reading now has a URL like this:

https://passyah-raffi.vercel.app/blog/what-is-slug

Why Is a URL Slug Important for SEO?

A URL slug is often considered a great place to include the target (or primary) keyword of a page.

After all, Google Search Advocate John Mueller has confirmed that words in a URL are a ranking factor.

But he also emphasized that it is a “very very lightweight” one, and it primarily helps to assess the page before Google accesses it.

In other words:

While having keywords in the URL is a ranking factor, we should not overestimate its impact on rankings.

However, it may still make sense to use a page's target keyword in the URL slug. Especially considering the user experience (UX) point of view, which is closely related to SEO.

Make It Concise and Easy to Read

A good URL slug shouldn't be too long. Long URLs are harder to read and/or remember. Try to use fewer than five words in your slug.

  • Good URL slug: /abs-exercises
  • Bad URL slug: /the-best-abs-exercises-for-all-levels-of-gym-goer

Moreover, a URL that is too long will get truncated in Google search results. While this is not an SEO disaster, it doesn't make the page snippet look very good.

long url slugs get truncated

Separate Words

How you separate the words (or not) influences the readability of a URL slug. Separating the words in the slug helps users understand the URL more easily.

  • Good URL slug: /best-travel-tips
  • Bad URL slug: /besttraveltips

Use Hyphens, Not Underscores

The best practice is to use hyphens to separate words in URLs. Search engines may not correctly interpret other separators (like underscores).

  • Good URL slug: /good-old-fashioned-pancakes
  • Bad URL slug: /good_old_fashioned_pancakes

Tip: Semrush's Site Audit will detect URLs that use underscores, as well as many other issues related to URL addresses. Try it for free.

Use Lowercase Characters

Since URLs can often be treated as case-sensitive, it is best to stick to lowercase characters to avoid any issues and make it easier to write the URL manually.

  • Good URL slug: /new-york
  • Bad URL slug: /New-York

Avoid Special Characters

Google Search Central recommends avoiding non-ASCII (American Standard Code for Information Interchange) characters, such as special characters of some languages or emojis.

  • Good URL slug: /emoji-meanings
  • Bad URL slug: /😊🚀

Make It Future-Proof

It is best to avoid numbers that are likely to be changed in the future, like a number of tips or ideas or the publishing year.

  • Good URL slug: /how-to-write-url-slugs
  • Bad URL slug: /10-tips-to-write-url-slugs-in-2022

Note: If you do have to change the URL slug, make sure to redirect the old URL to the new one.