3.2 How to Optimize Slugs for SEO and UX
In this post, I'll show you how to optimize the slugs of individual posts and pages for SEO and UX.
1.Introduction1 lesson, 00:51
2.Introduction to Permalinks2 lessons, 09:01
2.1Permalinks, Slugs, and Links04:31
2.2Why Optimize Your Permalinks?04:30
3.Optimizing Permalinks in Your Site2 lessons, 15:42
3.1How to Optimize Permalink Settings for SEO and UX08:23
3.2How to Optimize Slugs for SEO and UX07:19
4.Conclusion1 lesson, 02:44
3.2 How to Optimize Slugs for SEO and UX
Hello, and welcome back to this Tuts+ course on WordPress permalinks. In this part of the course, I'm gonna show you how to optimize your slugs for SEO and UX. So we've already looked at how you optimize your permalink settings. So we know we've got pretty permalinks set up on the side. But now let's take a look at the specific slugs, and how you can change them. So here is my post Social Media: Time Suck When You Should Be Working or Invaluable Tool for Marketing? And WordPress has automatically generated a massive long slug with that in. Now that's quite long. When we have a look at the post, you can see that we end up with a really long URL that doesn't even fit in the field up here. So let's change that. Now, the core of this post is social media and marketing. So I could simply get rid of all that. I call it Social Media Marketing. And you can see that I edit it in the permalink section here. You can also edit it if you click on the title. And here you can see that you can edit it via this field here. So we'll say that, I'm gonna update the post, I'm gonna view the post again, I didn't refresh the posts that I had before because the URL has changed. So now that's much easier. I could say to somebody my post is at this URL. I probably wouldn't have compensating.co.uk/demo, but I might have mysite.com/social media marketing. And if you wanted to, you could take out the hyphens. But admit you, I think makes it look a bit weird, because we've got one massive great word. It also won't help SEO because Google doesn't recognize social media marketing or one word as a word but it definitely recognizes social media and marketing as three words. So those are optimized for SEO because they've got key words that our post is about and that we'll be targeting for SEO. And that it's also optimized for user experience because it's nice and short and easy to remember. Now the other thing you can do is you can optimize your category slugs. So when you're on an archive page for a category, you can change the slug for each of your categories. And you can also do this for tags and custom taxonomies. So I've got a bunch of categories here which I've added to my site. And WordPress has automatically generated slugs for some of these categories. So for example here you can see we've got a category of publishing and marketing and WordPress has generated publishing and marketing. That would actually be publishing and marketing and then I called it for brevity. So this is quite long, so if I view the archive page for that category, we've got our domain name and then topic, and then publishing and marketing. What if I just wanted to optimize one of those two words? I could either edit that my opening in its own screen and change it to publishing. And that's updated, I go back to categories. The other alternative I've got is to use Quick Edit here. And that's easily easily the quickest way to edit my category slugs, so I've updated that. And then if I view it, you can see it's publishing as a topic. So again nice I need you to remember to use it for experiments. Now bear in mind that sometimes balancing ESO and UX might not always be easy here because I'm not always preferred to keep it as publishing and marketing because I want to optimize both of those for ESO, but having just one of those words is better for UX. So you'll obviously have to make the decision depending on the needs of your site. So, you can also see how I've optimized this one already. So that would have automatically generated websites, newsletters, and I've edited the slug. So it's just websites. So if I view that, we can say that topic/websites. So the slug for your categories, your tags, and any custom taxonomies and the slugs for your posts, pages, and any custom post types can all be edited so that you can optimize them for SEO and UX. Now there is one danger in editing those slugs and in editing permalinks as well. And that's the fact that if this is an old post or pre existing post, not one that I'm creating right now, I might have shared that old URL social media times that when you should be working or unable to offer marketing. What a mouthful. I could have shared that somewhere on social media, or a visitor to my blog might have come along, seen it, liked it and shared it by email with one of their contacts. And when somebody then clicks on that link, it won't work. Because the slug having changed means that that URL won't work anymore because it no longer exists in my site. So if you do edit the URLs for existing posts that are already on your site, it's a good idea to set up a redirection from the old URL to the new one. And you can install a redirection plugin to do that in your site. You also might want to do read out. It's also a good idea to do redirection if you change the permalink settings, and then you can change, that will be a little bit more complicated because you'll have to do some wildcard redirection because you'll have a lot of posts potentially with changes. Alternatively, it might not be possible to do it. So for example, if we go into our permalinks settings, and you were to change from plain to post name, setting up a redirect for that actually would work because the plain one is always going to work because it uses the query string. But if you were going to use month name originally if you started with that and you change that to post name, that might cause problems and it would be very difficult to redirect because you'd have to redirect everything with this in it. So if you do change your permalink settings, it's a very good idea to do it as soon as you set up your site, or as soon as possible after you've set up your site. And if you change your slugs for your posts, it's also a very good idea to do it when you create the post and you first publish it. That's not to say you can't do it later on. But if you do change the slug for a post later on, it's a good idea to set up a redirection so that anybody trying to visit it using the old URL will still be able to access that content. So that's how you optimize the slugs for your posts and your categories for ESO and user experience. In the next part of the course I'm going to wrap up and summarize what we've covered in the course. See you next time. Thanks for watching.