WordPress Slugs | A Beginners Guide

WordPress Slugs | A Beginners Guide

Have you ever heard of WordPress slugs or permalinks?

If you are a WordPress user and trying to optimize your WordPress posts or pages for on-Page SEO then you may have come across to these terms.

Various guides and tutorials about on-Page SEO emphasize the importance of slugs in your search engine optimization.

In this post, we will explore what is a permalink and what is a slug in WordPress and why we should bother about to get them right in first place.

We will also be discussing what is the best permalink structure from SEO point of view.

What is a Permalink in WordPress?

In simple words, a permalink is the URL of your WordPress post or page. WordPress assigns a unique URL to each post and page to make it unique from each other and searchable for users.

Search Engines use this unique permalink to determine the type of your post or page content.

Online users can simply take this unique URL to share your content with other users online.

In below example we can see how WordPress assign a unique permalink to post or page, WordPress simply take your post or page title and make a valid URL including your website domain.

What is a Permalink?
What is a Permalink?

The permalink contains the full URL including your domain name, so in our example, it will include https://www.webwhistles.com.

The remaining part of the URL is called Slug which we will be discussing in the next section.

As mentioned above, WordPress automatically creates the permalink for you by adding post or page title to your website URL. But you can always change this.

Simply click on the Edit button next to permalink and change whatever you fancy. In our example, we have just added wordpress-slugs.

What is a Slug in WordPress?

Slug is the bit of text which appears after your domain name in the URL of a post or page. This is the essential part of URL as it makes your URL unique from other posts and pages.

In our example, wordpress-slugs is the slug of our this post. As mentioned above you can always modify the slug to your own needs whenever you want.

What is a Slug?
What is a Slug?

Keep in mind one thing, if your post is already live with its automatically generated slug and you plan to change it to something else.

Never forgot to set up a 301 redirect for that post as users will be looking for your old URL. Without a 301 redirect, they will receive a 404 error which is Page Not Found.

Why is WordPress Slugs Important?

WordPress slugs are important for two main reasons.

  • It plays a big role in your WordPress Search Engine Optimization, search engines identify the relevance of your post or page content to the query entered by visitors. So slugs are readable by search engines, that’s why we need to pay attention to set up SEO friendly slugs.
  • An easy and clean slug help visitors to identify what content they should expect from this URL. In our above section example, users should expect content related to WordPress slugs.

Optimizing your slugs will give you the advantage to optimize your website well for search engines.

How to Setup WordPress Slugs?

In this section, we will guide you how you can setup slugs for your posts and pages in WordPress. If you want to jump to the specific section you can click on the links below.

How to Setup WordPress Post Slug?

You can change the slug of a WordPress post or page anytime you edit or create the post/page. Just below the Title box, you will see permalink URL section. Click on Edit button.

WordPress Slug Section
WordPress Slug Section

When you will click on the Edit button, you will able to change the slug portion of permalink or URL.

Edit WordPress Post Slug
Edit WordPress Post Slug

When you finish editing your post slug, click OK and Publish or Update your post.

How to Setup WordPress Page Slug?

Just like the post, you can set up a WordPress page slug by looking for the permalink URL and click Edit.

Edit WordPress Page Slug
Edit WordPress Page Slug

Enter your desired slug, click OK and make sure to Publish or Update your page.

How to Change WordPress Category/Tag Slug?

Whenever you create a WordPress category or Tag, WordPress automatically create the slug based on the name without asking any input from you.

You can always go back and change the slug.

 This process is the same for Categories and Tags 

Go to Posts->Categories/Tags, then look for category or tag which you want to change and click on Edit.

Edit WordPress Categories
Edit WordPress Categories

Enter your desired slug in the box provided and make sure to click on Update at the bottom of the page.

Change WordPress Categories Slug
Change WordPress Categories Slug

What is the best WordPress Permalink and Slug Structure?

By default, WordPress uses permalinks with a lot of numbers and question marks in it which makes the default permalinks of WordPress a bit messy and non-readable.

The default structure of permalinks in WordPress is not suitable for sharing your URLs or for search engines. In default settings of the WordPress permalinks, WordPress takes the best words from your post/page title and remove some words like “the”, “an” and “a”.

Default WordPress Permalink Settings
Default WordPress Permalink Settings

This can raise a problem for your website’s structure as you may lose the targeted keywords in your slugs.

As we have now a better understanding of what is a slug in WordPress and what is a permalink, still you will be wondering which structure is better for you.

How to Change WordPress Permalink Structure?

If you go to Settings->Permalinks, you will see 6 options for permalink structure.

WordPress Permalinks Options
WordPress Permalinks Options

Plain and Numeric is the least user-friendly because it doesn’t tell users about your post/page content.

Day and name and Month and name are good for any website publishing news. As it indicates that when a story was published.

All first four options are not great for a blog, especially if you are publishing an evergreen content.

The Custom Structure provide 7 different tags which you can use to create a unique permalink.

So which one is the best option for a blog?

For SEO reason, almost all blogs use Post name and Custom Structure.

Both slug and permalink are part of any post and page URL that’s why best practices apply to both.

Here are some points you should always consider when setting up your slugs or permalinks.

  • Keep Permalinks and Slugs Short
  • Never change them after publishing them ( Unless it’s absolutely necessary )
  • Always use the targeted keyword in slug
  • Make sure your slug is relevant to the post/page content
  • Avoid duplication of slugs

Tips for SEO Friendly Permalinks and Slugs

Here are some tips to create SEO friendly permalinks and slugs.

Shorter is Better

The shorter URLs you have, the better is will optimize your post/page in search engines.

Moz suggests to keep your URLs under 100 characters but Backlinko suggests to keep your URLs even shorter.

Shorter slugs are easy to remember and process than the long ones. The “wordpres-slugs” is definitely better slug than “wordpress-slugs-a-beginners-guide”.

During the process of indexing and crawling search engines are looking to find the exact match to the user query.

If search engines find the exact match then the particular post or page has an extra advantage on the posts/pages with longer slugs.

For example, if a user is looking for WordPress Slugs then our this post has a small advantage on the other posts with longer slugs.

Of course, this is not the only one ranking factors for ranking a page on search engines. There are a lot more important on-Page SEO factors which you have to consider.

Include Keyword You Want to Rank For

You should always help search engines to find your content and tell them which keyword you want to rank for by including those keywords in title and slugs.

For example, let’s say you want to rank for “iphone x features” and you wrote a post with the title “10 iPhone X Features You Need To Know”.

WordPress by default will create this slug : “10-iphone-x-features-you-need-to-know”. This slug is a bit long one and it will take time to get indexed for “iphone x features” keyword.

Much better slug for your post will be “iphone-x-features”. You can edit the slug and make it like this one.

This way you are telling directly to search engines that this post is about “iphone x features” and we want to rank for this keyword.

Remove Stop Keywords

When you are creating posts or pages you should try to avoid the stop words from your slugs. These are the common words that don’t add any value to understand the nature of your posts content.

For example. wordls like “a”, “the”, “on”, “and”, “is”, “of” and other ones.

If you check the previous section example, you will notice that we have removed all these kind of words.

Use Dashes to Separate Words

Using dashes (-) to create slug is a common practice nowadays. So you should always use the dash (-) as a separator within your slug.

Wrapping Up

A slug is an important part of any post or page URL and it should be unique for all posts or pages. When you are creating WordPress posts or pages, you should spend some time to optimize slug of your post or page.

Always keep your slug short and descriptive, use a dash (-) as a separator and lowercase characters.

If you change the slug of a post or page in future, make sure you always set up 301 redirects. Otherwise, it will have a negative impact on your SEO ranking.

Got a question about WordPress Slugs or any suggestion about this article, please let us know in the comments box below.

You May Also Like

About the Author: WebWhistles

Leave a Reply

Your email address will not be published.