You might have come across the term slug many times in WordPress. In this article we will share what a slug is and its importance.
What is a Slug?
Slug is a unique portion of a URL which helps identify that post or page. It is created in a readable manner and isn’t some jumbled numbers or characters. You can think of it as a short form of your title which helps in explaining the page in a concise manner.
The term slug is often referenced in SEO as it plays an important part in helping your pages rank better in SERPs.
Edit a Slug in WordPress
WordPress lets you edit your post or page slug easily.
Before being able to edit slugs you need to enable the permalinks feature. It can be done by visiting the Settings -> Permalinks from your admin dashboard. Either choose the Post name checkbox or the Custom Structure with %postname% in the url.
Steps to edit slug in WordPress:
- Edit or create a new post and publish it.
- Under the Permalink setting you will see a URL Slug option which consists of the url of the post.
- Edit the slug and replace it with your own slug.
- Click the Update button and the new url with your slug will be saved.
Few tips for using slugs:
- Always remember to use dash instead of spaces.
- The slug should be written in lowercase letters.
- Once a post has been published with a slug, you should avoid changing it in future as it will break the previous link to that post.
- Keep the slug short and make it as descriptive as possible.
Importance of Slug:
- SEO – Slugs help you rank better in search engine pages. There are many reasons for that but mainly due to the ability to add your keywords to the post url.
- Readable and User Friendly URLs – By using custom slugs your URLs become readable and lets you give a glimpse of what the post is about.
Edit Category and Tag Slugs
WordPress also allows us to change the category and tag slugs.
For editing category slugs:
Visit Posts -> Categories. Edit the category you want to change the slug of. In the slug box enter your desired slug and click the Update button.
Similar steps can be followed for editing the tag slugs.
Slugs can play an important role in the growth of your website. It directly affects your SEO results and should be paid attention to. Many people misunderstand a slug as being a small factor overall, but they are very wrong in thinking so.