Include your focus keyphrase in the slug

One of the SEO assessments in the Yoast SEO plugin checks whether the slug contains your focus keyphrase. In this article, we’ll explain a few things about this assessment. We’ll explore what a slug is, how you can edit it, and why a slug is important for SEO. We’ll also explain why it is so very important to include your focus keyphrase in the slug, and we’ll give you a few other basic tips on how to improve your URL.

What is a slug?

A slug is the part of a URL which identifies a particular page on a website in an easy to read form. This means it’s the part of the URL which explains the page’s content. In the example below, https://yoast.com/academy/ is the URL, and academy is the part that identifies the page as being our Yoast Academy page. So, the slug in this URL is academy.

Example of a URL slug

How to edit a slug in WordPress

If you use WordPress, you can edit the slug when writing or editing a post, below the page or post title field. It looks like this:

Example of editing a URL slug

Note that this only works with the right permalink settings. You can edit the permalink settings in WordPress through Settings > Permalinks. We recommend choosing an option in which the URL contains relevant words, as this provides users and search engines with more information about the page than an ID or parameter would. We’ll explore this in more detail in the next section.

Note: don’t just change your permalink settings once your site is already online. This could cause all kinds of trouble.

Permalink settings

Why are slugs important for SEO?

The slug is one of the indicators search engines use to determine what a page is about. And, as we’ve just seen, you can change the words of the slug to make sure that it has the words that you really want to rank for.

In addition, it’s one of the things that people see in the search results. A search result usually consists of three elements: the title (in blue), the URL including the slug (in green), and a meta description (in black). Note that this is not always the case: sometimes the slug is replaced with breadcrumbs. People might click a search result easier when the slug matches the subject of the page. For example, the WordPress default slug used to be a combination of random numbers. And let’s face it: you would prefer clicking https://yoast.com/academy/ over https://yoast.com/?P=613458/ as well, right?

Learn more about this check in Yoast SEO in our explanation of the keyphrase in slug assessment.

How to improve your URLs

As we’ve seen, a good URL makes it easy for visitors and search engines to figure out what a certain page is about. Therefore, it’s a very good idea to use your focus keyphrase for that post or page in its URL. The Yoast SEO plugin checks if you have used your focus keyphrase in your URL. However, there’s more you can do to create perfect URLs. Let’s go about a few basic tips.

  1. Choose the right permalink structure
    Improving your URLs all starts by defining your permalink structure in your CMS. As we’ve explained before, you can edit your permalink settings to change how you want to organize your URLs. Make sure to choose an option in which the URL contains relevant words.
  2. Include your focus keyphrase
    Both search engines and your users use the URL to find out what a certain page or post is about. Therefore, it’s a great idea to include your focus keyphrase in your URL. The Yoast SEO plugin will remind you if you haven’t included your focus keyphrase in your slug.
  3. Use lowercase letters only
    Try to use lowercase letters only in your slug. That’s because, in some cases, you can create duplicate content by mixing these two.
  4. Add focus
    The more parts you add to a URL, the more complex and hard to understand it gets. Focus is key. That’s why we recommend removing all the words that you don’t really need from your slug. Filter out all the unnecessary words, like function words. However, you should make sure the slug still makes sense, though.