URLs are a basic element of SEO and they’re incredibly important. In fact, various aspects of URL construction are in the top 200 factors that affect how high your content will rank in the SERPs:
- URL length — shorter URLs are better
- URL path — content that’s closer to your homepage may get a slight boost over pages that are many levels away from your homepage
- URL keywords — keywords in your URL help search engines determine how relevant your page is to a given search term; it is a small ranking factor, however.
- URL string — the categories included in your URL can help search engines determine what your content is about
While you have little control over much of your contents’ URLs once your website and content strategy are set up, you can easily optimise the URL slug for every piece of content you post on your website. If you’re using WordPress, Yoast SEO makes modifying the default URL slug easy.
Ok. First things first. Let’s make sure you’ve got the right plugin.
Yoast SEO is one of many plugins you can use to specify SEO particulars like the URL slug but it’s the most popular. I have used it in the past because it does a good job, and it’s easy to use. If you haven’t installed it, go and do that now (the free version is more than adequate). Here’s a good set of instructions that will guide you through installing and setting up Yoast SEO.
What is a URL slug? And why should you modify the default URL slug?
I know you probably just want to know how to change the default URL slug that WordPress generates for your content. But while it’s easy to do, I also know it’s easier to just upload a new webpage or blog post and not bother with changing the slug. So, before I teach you how to modify your slugs, I want to make sure you know how important it is so you don’t skip this vital step.
So, what is the URL slug? The slug is everything between the last two slashes ‘/‘ in a URL. To illustrate this, let’s take a look at a URL from my blog post How to write an SEO-friendly blog post that attracts potential customers to your website and generates quality leads. The full URL is
https://kmwade.com/writing-for-business/write-seo-blog-post/. So the slug for this URL is ‘write-seo-blog-post’.
As you can see, the slug you choose for a blog post can have a big impact on some of the URL-related ranking factors that Google looks at. If you’re not careful, it can drastically lengthen your URL. But on the other hand, it’s often your only opportunity to include a keyword in your URL.
In addition, the URL slugs you choose for your content can influence the behaviour of your prospects because a relevant URL helps people determine whether a piece of content is right for their needs. For instance, when someone googles something, they will often evaluate the relevance of the URL displayed in search ads to ensure the advertised web page is relevant to their search query. Similarly, when people in your target market see your content on social media, they will often look at the URL of the content before clicking through to read/consume it to check whether the content is likely to meet their expectations. The URL slug is your best opportunity to help these people realise that your content is relevant to their needs.
So, hopefully, you now know how important your URL slug is.
So why do you need to modify the default one that’s generated by WordPress? Well, WordPress’s default URL slug is just the title of your content. Sometimes that will be fine. But if we go back to our example blog post, you can see that some default URL slugs are just plain inappropriate. Having a URL that looks like this would not be a good idea because it’s really long:
So, while the default URL slug that WordPress generates should contain your primary keyword (because your content’s title should contain that), it will often be long enough that it could negatively impact your rankings in the SERPs. As a result, I recommend you always change the default slug if the title of your content is more than 3-5 words long. (Note, I’m referring to your page title, not your SEO title.)
URL slug best practice: What makes a good URL slug?
To make the best contribution to your ranking in the SERPs, URL slug best practice dictates that your URL slugs should ideally:
- Be short. According to Neil Patel, the average number of characters in URLs in the top 10 positions in the SERPs is 50-62. That’s the number of characters in the full URL, not just the slug. Google has also confirmed that too many words in a URL will hurt your rankings. So the number of words you can ‘safely’ include in your slugs will depend on your domain names and URL path but shorter is better. In case you’re wondering, the URL in our example has 60 characters.
- Be easy to read. As with all aspects of SEO, your URL slugs should make sense to the people you want to visit your content — your target market. When someone from your target market reads the URL of your content, they should be able to tell whether that piece of content is likely to be relevant to their needs. If they can’t, they’ll be much less likely to click through to consume your content. And if it looks like gobildy gook, they may even think your URL links to a virus. I’m guessing you don’t want your brand associated with viruses.
The words in your slugs should be separated by hyphens ‘-‘ as in our example. Don’t run them together or separate them with underscores. (Google prefers hyphens.)
It’s ok to include ‘stop words’ (a, the, but etc.) if that makes your slugs more readable.
- Contain only lowercase characters. Microsoft servers will generally show uppercase slugs but many Unix ones will display a 404 ‘not found’ error instead.
- Include your primary SEO keyword. Including your primary keyword in your URL slug will tell people and search engines what your content is about. If you can include your keyword near the beginning of your slug, that’s even better. You could also include a second keyword if you have room.
- Contain only letters, numbers and hyphens. Some other characters can be included or encoded but this is usually unnecessary and just introduces opportunities for mistakes.
If that sounds like too much work, an SEO writer can write your slugs for you.
How to use Yoast SEO to change the default URL slug
Ok. Now that you’ve got your slug, how do you tell WordPress that out want to use yours rather than their default one? That’s where Yoast SEO comes in. Just follow these simple steps:
- Open your page or blog post.
- Click on the Yoast SEO icon to open the SEO sidebar. OR Scroll to the bottom of your content until you find the SEO section.
- Open the snippet editor and locate the ‘slug’ field
- Enter your desired slug.
- Save your page (or publish it if you’re ready to publish it).
And that’s it. Pretty easy right?
Important caveat: Changing URL slugs on existing content
So changing the URL slug of a piece of content is really easy with Yoast SEO and the above five steps are all you need to follow if you’re modifying the URL slug on a new piece of content. If you’re changing the URL slug on a piece of existing content, there’s one more thing you need to do.
You need to redirect traffic from the old URL.
Redirecting traffic means all the people (and the search engine crawlers too) who visit your old URL will be automatically sent to the new URL. This means you don’t have to go and find every single internal link on your site and update them to the new URL. More importantly, you don’t have to find every backlink to your content and try to convince the relevant staff on those websites to update the links to your new URL.
There are a few different kinds of redirects. If you’re only changing the URL temporarily for some reason, you can use a 302 redirect. In most cases, however, you’ll be permanently changing the URL so you should use a 301 redirect.
WordPress doesn’t provide an easy way to set up 301 redirects and having chains of redirects can cause issues for users and search engines, so it’s best to develop a good URL strategy so you don’t have to implement 301 redirects very often. But, when you do find you need to redirect a piece of content, the premium version of Yoast SEO offers a redirects manager. There are other plugins and other ways to implement redirects, however, if you don’t want to purchase the premium version of Yoast SEO.
Does a 301 redirect negatively affect SEO and ranking?
A 301 redirect passes 90-99% of existing SERP ranking power to the redirected page. It will, however, take a little time for search engines to discover the 301, recognise it and credit the new page with the rankings and trust of its predecessor. Your webmaster can speed up this process by submitting a new sitemap once the new URLs have been implemented. And if you’re updating your URLs from the WordPress default to SEO-friendly ones, the new URLs should more than make up for any small loss in ranking power with their own increased ranking power.
Your other SEO particulars are also important when you’re trying to improve your content’s ranking in the SERPs. You can use the Yoast SEO plugin to specify these SEO particulars too. If you need some help, check out these articles: