Find out what slugs are in WordPress, how they affect SEO, how they function, and how to properly name them.
How To Change Slugs:
- Navigate to Posts, Pages, or Categories.
- Select a page, post, or category.
- Click on “Edit”
- Find the permalink section.
- Edit it and type in your slug.
- Then click on “Save” and “Save Draft”
What Are Slugs
In WordPress, there are parts of the URL of a page or post that are called slugs. They are essentially sections at the end of the URL. It is the part of the URL that explains what that specific page is about. For example, this page’s URL is “https://labinator.com/slugs” and the slug is “slugs“.
Slugs are the indicators for the search engine to know what a certain page is about. They tell the user and search-engine what type of content or purpose a certain part of your site has.
This is very important because the slug helps the search-engine identify information about your site. It also helps the reader know what the site is going to be about. This makes the slug crucial for SEO and making readers click on your site.
Where Are They Found
The slug is used for four main purposes in WordPress. It is used as a part of the URL, as mentioned before, for your pages and posts. It is also used for URLs for your site’s categories. Lastly, the slugs can also be used for your author URL.
The page slugs can give you a lot of information about what the certain page is about. Like this URL “www.example.com/about” has the slug “about“. This tells you that the site is the about page. This also applies to posts like this one where the slug shows what the main topic of the post is, for example, this post is about slugs and the slug is “slugs“.
The category/tag slugs simply just tell you what category the page you are visiting is in. This means that the URL “www.example.com/videos/cat-video” has the slugs “videos” and “cat-video“. In this example, the slugs tell us that we are on the videos category and are on the cat video page for that section.
Author slugs allow you to change the slugs for the author page of your WordPress site. This is not that important but we still include it in this tutorial and show you how to change them.
How They Affect SEO
As stated before, slugs are crucial for your SEO. Slugs tell the search-engine bots what your page is about and the contents of it. This means if you write a really good slug then you can potentially increase your search rankings.
A good slug can significantly help the search bots, but it can also help the person reading your slug. Writing a simple and clean URL that is short is key to optimizing your page. Since slugs are apart of the URL, they play a big role in creating a good URL.
Your slug should be easy to read, short, and focused on the main topic of the page. Putting the keyword of your page into the slug can significantly help your SEO. If your page is about the best cat food then the URL should be “www.example.com/cat-foods“.
How To Name and Change Them
How to Change Post Slugs
First navigate to Posts on your WordPress dashboard.
Then find the post that you want to edit or change.
Click on Edit on the post that you want to change.
On the next page, find the permalink section and click on Edit.
Then type in your slug and then click Save.
Then click on Save Draft and exit the page.
How to Change Page Slugs
Navigate to Page on your WordPress dashboard.
Then select the page you wish to edit and click on Edit.
Repeat the same steps you used for changing a post slug.
After that, click on Save Draft and exit the page.
How to Change Category/Tag Slugs
Navigate to Posts from your WordPress dashboard.
Then go to Categories or Tags from there.
Select the category or tag you want to edit.
Click on Edit.
In the slug section type in what you want.
Then click on Update at the bottom.
Now you can exit the page.
How to Change Author Slugs
First install this plugin which is required.
After activating the plugin, navigate to Users.
Select a user and click on Edit.
Go to the Author Slug section at the bottom.
Change your slug there and then click Update.
Now you can exit the page.
How to Name Good Slugs
In this section, we will teach you how to name your slugs to optimize them for SEO and readability. This section will be split up into smaller parts that show the main things your slugs should have.
First, your slugs have to be short and concise. They should be simple and get straight to the point, avoid using words like “how, to, a, and, why,” or any other words that do not have a function or purpose.
You must make sure that your slugs do not include any nonimportant numbers. Your slug should not be “post?=p2432“. If your page is about WordPress SEO, then your slugs should be “wordpress-seo” but not “how-to-wordpress-seo-ultimate-guide“.
Furthermore, your slugs should always have the primary keyword for the page. This helps by improving SEO and gives the reader an idea of the main topic before they even click on the page. If your page’s keyword is “Ethernet Vs. Wifi“, then the slug should be “ethernet-vs-wifi“.
How to Make 301 Redirects
If you want to change a slug of a page that has already been published, then you are going to run into a couple of problems. After changing the slug of the page, the old link for the page will not work. If someone has the link saved then it will not work. This entire process will result in a 404 error, but thankfully, it can be easily fixed.
To do this we will be using this 301 redirection plugin that will allow us to redirect people from the old page to the new one. Though this process should only be used after changing slugs and not any other redirection. The first step is to download, install, and activate the plugin. Then navigate to your WordPress dashboard and follow the directions below:
Navigate to Settings from your dashboard.
Then select the 301 Redirects option.
Then at the top input the URLs you want to redirect.
Then click on Save.
Now you can exit the page.
Your Perfect WordPress Solution
If you want more awesome tutorials or the right plugins and themes for your page then look no further. Our services can help you get your WordPress site running in only a couple of days, and our plugins and themes will give you the best bang for your buck. You won’t have to worry about any WordPress problems or technical difficulties anymore.
Best Collection Of WordPress Guides & Checklists
Our complete and latest collection of WordPress guides and resources that cover everything you need to get the most out of your WordPress website.
Download Them All!
All of our guides will be sent to your inbox