What is a slug and how to optimize it?

4 months ago 20
ARTICLE AD BOX

When we speech astir SEO for WordPress, we often speech astir creating the close slug for a page. Of course, we’re not talking astir the slimy carnal that eats your plants. So, what is this ‘slug’ then? And wherefore should you optimize it? In this post, we’ll explicate each you request to cognize astir it.

Having an orangish oregon reddish postulation airy for the ‘keyphrase successful slug‘ cheque successful Yoast SEO? Here’s what that cheque does and how to crook that airy green.

What is simply a slug?

A slug is the portion of a URL that identifies a peculiar leafage connected a website successful an easy-to-read form. In different words, it’s the portion of the URL that explains the page’s content.

For this article, for example, the URL is https://yoast.com/slug, and the slug simply is ‘slug’.

How to edit a URL slug

In WordPress, the slug is the portion of your URL that you tin edit erstwhile penning oregon editing a post. Editing it successful WordPress looks similar this:

The WordPress station  editor, highlighting the 'Permalink' controls section

Note that this lone works with the close permalink settings. You tin edit the permalink settings successful WordPress done Settings > Permalinks. We urge choosing an enactment successful which the URL contains applicable words, arsenic this provides users and hunt engines with much accusation astir the leafage than an ID oregon parameter would.

The WordPress Permalink Settings controls

Note: don’t conscionable alteration your permalink settings once your tract is already online. This could origin each kinds of trouble.

There are 2 ways to edit a slug successful Shopify: You tin either usage Shopify’s ‘Search motor listing preview’ function, oregon you tin usage the Google Preview instrumentality successful Yoast SEO for Shopify instead.

To edit a slug utilizing the built-in Shopify function, you’ll archetypal request to click connected ‘Edit website SEO’ to unfastened the Search motor listing preview options. From there, you tin easy set your slug arsenic necessary. Note: Shopify calls the slug the ‘handle’ instead, but it’s precisely the aforesaid thing!

Search motor  listing preview successful  Yoast

Alternatively, if you’re editing your Shopify leafage with Yoast SEO, each you request to bash is unfastened the Google preview successful the Yoast SEO sidebar and you’ll spot a tract to participate a caller slug:

Enter caller   slug successful  URL preview

Why are URL slugs important for SEO?

Writing a bully slug for your leafage oregon station tin positively impact your SEO. It allows you to bash the pursuing things:

1. Include your keyword

Why? Because the slug is 1 of the indicators Google uses to find what a leafage is about. So alteration your slug, and marque definite that it includes words you truly privation to fertile for.

2. Create user-friendly URL slugs

Picture a results page: you’ll spot galore antithetic URLs astir a definite topic, right? So you request to marque definite your slug is successful enactment with what radical expect to see.

For example, our main nonfiction connected WordPress SEO has the URL yoast.com/wordpress-seo, which is precise connected point. People are a batch much apt to click connected that, than connected yoast.com/?p=607, adjacent though that’s the URL that WordPress creates by default.

Find retired much astir creating SEO-friendly URLs »

What does the keyphrase successful slug assessment successful Yoast SEO do?

Your nonfiction oregon leafage should person an easy-to-remember, focused and SEO-friendly URL. That’s why, to amended your URL, the Yoast SEO plugin checks however you’ve fitted successful your main focus keyphrase and makes suggestions to amended it.

A screenshot of the Yoast SEO investigation  with the Keyphrase successful  slug assessment

How to optimize your slug successful WordPress

What bash you request to deliberation of erstwhile crafting the close slug for your station oregon page? Let’s spell implicit the six steps of optimizing it successful WordPress:

  1. Include your absorption keyphrase

    This is astir apt a no-brainer, but your focus keyphrase should ever beryllium successful the slug. This volition instantly marque it wide to your assemblage what your leafage is about.

    If you keyphrase isn’t successful the slug, the SEO investigation successful the Yoast plugin volition amusement you this message:

    A screenshot of the keyphrase appraisal  with an orangish  bullet

  2. Think astir function words

    The slug that’s generated by default whitethorn see relation words similar “a”, “the” and “and”. In immoderate cases, you mightiness request those to clarify what your leafage is about. Usually, however, you tin permission them out.

    You tin work much astir this successful our WordPress SEO article.

  3. Add focus

    You shouldn’t conscionable filter retired immoderate unnecessary relation words, but each connection you don’t need. In the lawsuit of this post, WordPress automatically created the slug “what-is-a-slug-and-how-to-optimize-it” (based upon the permalink settings in WordPress). That’s rather long, truthful we manually reduced it to “slug”. However, you should marque definite your slug inactive makes sense!

    And remember: You tin usage a slug lone once, truthful usage it for the close page. For example, if we privation to constitute different (but different) station astir slugs successful the future, past we can’t (re)use this slug.

  4. Keep it abbreviated and descriptive

    As we’ve said before, the URL of your leafage is sometimes shown successful Google hunt results, and whitethorn truthful power whether your assemblage decides to click your snippet. So, you don’t person a batch of country to play with. So deliberation cautiously astir the circumstantial words you privation to include.

    In addition, beryllium cautious with adding dates and specified to your URL. These instantly archer your assemblage erstwhile your contented was primitively published.

  5. Use lowercase letters only

    Try to usage lone lowercase letters successful your slug. If you don’t, successful immoderate cases, you mightiness accidentally make duplicate content by mixing uppercase and lowercase letters.

  6. Remember that URL slugs should beryllium permanent

    Changing URLs tin beryllium atrocious for SEO, and atrocious for users – adjacent if you usage a redirect manager to marque definite that radical get to the close place. So erstwhile you’re choosing your slug, marque definite it’s inactive going to marque consciousness years from now.

Cindy Paul

Cindy is simply a contented manager astatine Yoast. She writes and optimizes blog posts, and enjoys penning contented that volition assistance radical make amended contented for their tract and users.

Avatar of Cindy Paul

WordPress for beginners series