All the tips to create a good slug in WordPress
Far from being useless, the slug is found in the URL address of a web page. It includes:
- only lowercase characters;
- no accented characters;
- no special characters except ”_” and ”-”;
- no space.
If, like me, the web page slug has piqued your curiosity, let’s see what it represents. But first, let’s specify that slugs are very important page identifiers for SEO.
Slug is the part of the URL of a website or blog allowing the identification of a content.
It can be a post, a page, a category or any other specific content.
The slug must be easy to read. That’s why you have to edit it in such a way as to explain at the same time the content of the web page it identifies.
For example, in the URL ”example.com/optimize-content”, the slug consists of the phrase ”optimize content”. The reader who reads this slug understands that the content he is about to discover will provide information on content optimization.
Slugs: what is their importance?
The slugs on the pages of a website or a blog are important for two main reasons.
- The first reason is the ease of identification of content that they bring to users as explained above.
- The second reason is related to SEO. Indeed, search engines consider slugs to establish the SEO ranking of web pages. It is by reading the slugs that search engines try to understand the subject matter of a page.
From the above, we understand that the slug of a URL can bring a definite advantage regarding the referencing of a web page. Let’s also remember that slugs contribute to the improvement of the user experience.
What about WordPress’ slugs?
In WordPress, we can identify the slug on the content editing screen. Just go to the menu ”Pages” or ”Posts” of WordPress. Then, ”all pages / posts” and you will find the slugs.
In a first installation of the WordPress CMS, the URLs are presented in a not very SEO friendly form . You will see for example links that look like the following:
It is therefore necessary to remedy this and to edit another type of slugs.
Ideally, you should set up the title of the WordPress page as a slug and delete the numbers. To do this, let’s go to the WordPress settings, option PERMALINKS.
In the permalinks menu of WordPress we will discover several slug options:
- Post name;
- Custom structure (you can choose tags as “author’s name”, “category”, etc.);
- Month and name;
- Day and name;
We will choose the option that suggests the title of the publication as a slug. It will help users and search engines (like Google) to know what the page or post is about.
Once you’ve done that, WordPress will automatically create optimized slugs for your posts and pages.
How to optimize slugs in WordPress?
When you create or change a new content (post, page, etc.), WordPress gives the possibility to edit the slugs. In front of the permalink of each page, there is an edit button.
If you want to change the slug of a WordPress page you just have to click on it. You can also optimize the permalink for search engines and users with some tags (author’s name, category…).
Note that the optimization of slugs must be done whether it is a WordPress site or any other website. Optimizing the permalink of a web page requires certain precautions to impact the SEO of the latter. Here is an overview.
Integrate the main keywords in the slug
We need to make sure that we insert keywords or groups of keywords in our slugs. This makes it clearer what the content of a page or post is about.
You can use a plugin to check if your slugs are well optimized and that the good keywords are in it. It can help you if you are struggling with keywords.
Paying attention to function words
To optimize the URL slug of a WordPress page or post, you need to pay attention to function words (the, and, the, a, etc.). These elements are embedded in the slug when it’s automatically generated by WordPress.
Sometimes they are useful, but in general we can do without them. A direct, short slug that indicates the necessary information is preferable.
The slug is unique
On WordPress or elsewhere, the slug of a web page URL is used only once. You can’t use it to identify multiple pieces of content.
Be short and descriptive
There is no need to include too much data in your URL slugs. This is useful when you want to use the same URLs to make updates to your posts.
For example, a date in a URL slug informs users and search engines when the post was published.
If you make updates to the post, the URL slug will not change. Thus, it will not allow Google and other search engines to understand that you have made updates.