We use cookies to ensure you can get the best experience on our site. If you keep using this site we assume that you agree to our use of cookies. Privacy Policy OK

What is Slug in WordPress

by | April 10, 2017

Due to the rise of the technology industry that we are observing in the last decades, especially the last one, Search Engines are becoming a more and more substantial factor for business success. If the search engine doesn’t show your website, it could as well not exist for most of your potential customers. Therefore you need to take care equally for your content and for it to be relevant to the users’ queries in the Search Engines.

A small but important step in that direction is understanding permalinks and slugs. And as we’ve mentioned in our article on permalinks, it is crucial to think about the structure before your website is ready. In fact, if you have any hopes of getting a substantial traffic to your online property, you definitely need to think about the permalink and slug structure, while you are creating your WordPress website.

What Exactly is a WordPress slug?

The slug, being it a category or post slug, is building part of the permalink. What is permalink?

The slug is that part of the permalink that identifies the exact page, post or category.

Say, you are writing an article about the polar bears. WordPress will automatically generate the slug, using the title. But you can easily change it to whatever you want.

Of course, we highly recommend keeping the slug relevant to the title of the article. If the title you’ve chosen is something like Basic Facts About Polar Bears you can change the slug of the post to be /polar-bears/. So, when a user enters the article he or she will see the title, but the post will be located at www.yourgreensite.com/polar-bears/.

This way when someone is searching for polar bears in Google there is a higher chance for your article to get higher positions. As you can imagine, the slug in WordPress is as much important as the slug on a site created in any other way.

How to Customize the Slugs in WordPress

In order to be able to customize the slugs on your WordPress website, you’ll have to change the default permalink structure. As the slugs are a part of the permalink WordPress gives you the option to edit them.

By default, they are “plain”.

You can find out how to change that so that you’ll be able to customize your slug in WordPress by taking a look at our WordPress Permalink article.

How to Edit Post Slug in WordPress

You have the option to change the post slug at any time. We highly recommend to choose it while creating the post or the page and never change it. Except in case you’ve misspelled it, the best practice is not to change the post slug and permalink for that matter.

Even if you misspelled it if the post is old it is better to leave it as it is.

On the other hand, if you want to change the post slug that was created automatically out of the post title, you can do that on the same page, and at the same time that you are creating the content.

Right after the post title bar, there is information and link to the newly created content. If the post is assigned to a category the link says Permalink: domainname.com/category-name/post-slug. Otherwise, the link will be similar to the one on the image below.

Just next to that link stands an Edit button. If you are not satisfied with the automatically generated post slug, click that button and change it to your liking. Bear in mind you need to use dashes “-“ instead of spaces.

How to Optimize the Post Slug?

As we mentioned, the slug’s structure is really important for the Search Engines.

People are searching in words, not numbers. Your content is most likely also written in words, except if you have a blog dedicated to the beautiful science, called mathematics.

After you’ve changed the permalink to end with the post name, the post slug will be automatically generated out of the title of the article. And you will be able to change it. The slug, as you already know, should be related to the content and the title of the article.

It should be keyword rich. And last but not the least as short and meaningful, as possible. You should leave the slug to be easily understandable but in the same time not too long.

All of this is important for your On-page SEO.

Related Posts

How to Underscore Text in WordPress

When creating an article, there are some words or even paragraphs that you might want to stand out from the rest of the text. Of course, you can always...

WordPress Featured Images

WordPress Featured Images are a thing for a reason. Visually appealing websites are, naturally, more interesting to the audience. They provide a higher...

Let’s Talk About Posts

We already discussed the main purpose of the post in WordPress. But there is a lot more to them. What is a Permalink? Every post and page in a site...

awardspace logo
Where Ideas Turn Into Websites