what's a slug

SEO basics
What's a slug and how to optimize it

SEO basics: What’s a slug and how to optimize it

November 16th, 2016 – 8 Comments

In SEO, we often talk about creating the right slug for a page. But what is this really? And why should you optimize it? In this post, we’ll explain all you need to know about it.

When you google “what’s a slug”, you’ll find that the definition we’re looking for is “a part of a URL which identifies a particular page on a website in a form readable by users.” It’s the nice part of the URL, which explains the page’s content. In this article, for example, that part of the URL simply is ‘slug’.

WordPress slugs

In WordPress, it’s the editable part of your URL that you can edit when writing a new post. Note that this only works with the right permalink settings. It looks like this:

slug-slug

If you have added more variables to your URL, we’re still talking about just that editable part of the URL to the page, like this:

slug-ocw

There’s an additional value at the end of that URL. In this case, that extra variable is used so slugs can be the same without the URL being the same. I think these examples clearly show what the slug we are talking about is.

New to SEO? Learn the Basics of SEO in our Basic SEO course »

Basic SEO training$ 199 - Buy now » Info

Optimizing your slug

What are the things you need to think of when constructing the right slug for your post or page? Let’s go over a number of characteristics you need to take into account:

No stop words

Filter our all the unnecessary words. Filter out “a”, “the” and “and” and similar words. We have written a tad bit more on stop words in our WordPress SEO article. For users of our Yoast SEO plugin: you might have noticed we filter stop words out by default.

Add focus

Don’t just filter out stop words, but really all the words that you don’t need. Make sure the slug still makes sense though. In the case of this post, WordPress automatically creates the slug “what-s-a-slug-and-how-to-optimize-it” (based upon the permalink settings in WordPress), which I manually reduced to “slug”.

There is one thing to keep in mind here. “Slug” as a subject is not likely to get another page on its own on our blog. This informative article will most probably remain the central point for information about slugs on our website. So I can reduce the slug to just “slug” for that reason. If this was an additional post to a main article, it would probably have been something like “optimize-slug” (and I wouldn’t have explained what it is, for that matter). So, do consider the page’s level or position on your website.

Keep it short, but descriptive

The URL of your page is shown in Google search results. Not always, sometimes it’s for instance replaced with breadcrumbs (awesome). When it’s shown, Google highlights the matching words from the search query:

url-in-search-result-pages-2

So you need to keep that in mind as well. Next to this, a short slug, right after the domain, will allow Google to show these keywords it in its mobile search result pages as well.

Now go optimize your slug with these three things in mind!

Read more: ‘SEO basics: what does Google do?’ »


8 Responses to SEO basics: What’s a slug and how to optimize it

  1. Sonali
    By Sonali on 26 November, 2016

    Thanks for this info…working on that right away..

  2. Ben
    By Ben on 18 November, 2016

    I once wrote an article on The Voice reality show. My focus keyword was “the voice” my slug was also “the voice” ….since “the” is a stop word does it mean I shouldn’t have used it considering that it may alter the name of the reality show?

  3. Ben
    By Ben on 18 November, 2016

    Thanks for the info…working on that right away

  4. Ad
    By Ad on 17 November, 2016

    Hello, Michiel!

    I never use the stop words in slugs and try best to keep it short and meaningful.

    I am the Yoast SEO user from long so I am reading a lot of good information about all the sections.

    And slug is important as per Yoast SEO to make it optimized as well as keep it simple, small and meaningful.

    So, thank you for writing on this important topic. :)

    ~ Adeel

  5. Yvi
    By Yvi on 16 November, 2016

    Hi, I don’t understand why in spite of me adding my own “proper” Yoast slug (underneath my blog post in wordpress), google only posts the slug as http://www.xxx.net/blog

    Why does google reference the generic blog but NOT the specifi blog article even though the slug clearly lists the article? also, why does google fail to list the name of the article; and instead just references “blog” as title (which of course forces the reader to search through my blog to find the article). What am I doing wrong? Obviously I’m missing something……thank YOU.

    Esp: Google search results:
    Blog – FiEnergy
    http://www.fienergy.net/blog/
    Translate this page
    8 Gründe warum es albern ist, fertigen Hummus zu kaufen … Wenn du dir immer noch regelmäßig Hummus im Laden kaufst, dann dürfte dieses Video vielleicht …
    You visited this page on 11/15/16.

    BUT: the proper info is here: http://www.fienergy.net/hummus-selber-machen-statt-kaufen/

    • Michiel Heijmans
      By Michiel Heijmans on 17 November, 2016

      Hi,

      What I notice, is that your website has little links, is that correct? That might be the reason for Google not picking up on your posts. I can see canonicals are set right, and sitemaps look alright.

      If you are really looking to dig into this, you might want to consider one of our reviews because there might be something else bugging you that I can’t see from one look at your website.

      • dmg
        By dmg on 18 November, 2016

        In Yoast SEO’s Content Analysis traffic lights, there’s an item about whether the URL contains the keyword. This is usually only possible by having it in the slug. Is shortening the slug more important than that?

      • Helen Collins
        By Helen Collins on 18 November, 2016

        I set up 2 main keyword pages on our WordPress blog, one of them was starting to move up the rankings. I then decided to change the slug and remove the hyphens between the words so that it matched the way we had done the non-Wordpress part of our site. Since then the one that was starting to rank has disappeared, the other has never appeared. I thought the pages were new enough to be changed as there was only a couple of links going to one and non to the other. I set up 301 re-directs for any existing links to the old page urls (with the hyphens) but still no recovery in the rankings. I have aid to £100 for citations to one of them. Is there anything I can do? Do you changing this url has put me on the wrong side of Google forever somehow?


Check out our must read articles about SEO basics