Your source For Inspiring SEO related Guides and Tutorials

What is a Slug in WordPress and How to Optimize it for SEO?

Slug in Wordpress

A slug in WordPress can be defined as the part of URL that comes right after your domain name. It helps identify the subject and the content of each specific page on your website.

In our article of today, I’ll explain you in details what a slug is in WordPress and how you can optimize it for SEO.

If you’re ready to go…

Let’s get started!

What is a Slug in WordPress?

As previously defined, the Slug in WordPress is simply that section of your page URL that comes right after your website domain name.

To help you better understand what that is, let’s take a look at the following article URL from the Backlinko website:

The slug in this example, is “link building tools” which comes right after the domain name: “backlinko.com“.

Screenshot from Backlinko.com, March 2025

It tells us this article is going to be about “link building tools“.

You definitely have noticed as a website owner and WordPress user that everytime you create a page on your wordpress, a slug will be automatically generated based commonly on its content title.

The bad thing about this, is that the slug to be automatically generated won’t always be as user-friendly as you would want it to be for both humans and search engines…

The good thing, however, is that WordPress offers you the ability to customize your url structure or to choose amongst predefined URL structures so you can opt for the one that best suits you in terms of usability, aesthetics and forward-compatibility of your links.

To do so, please follow these easy steps here:

1 – Navigate to your WordPress Dashboard.

2 – On the left side menu, click “settings”.

3 – Then click “Permalinks”.

4 – Choose or customize your URLs structure.

Screenshot from WordPress, March 2025

How to Optimize your URL Slug

In order to help you get the most of your URL slugs in terms of SEO, aesthetics, and usability, here are three recommendations to follow so you can restructure them effeciently:

Think of adding keywords

Always consider adding one to two of your keywords to your url pages to make them easy to find by search engines and help determine what their content is about.

For example, if your website domain name is “yourdomain.com” and you’re targeting keywords such as “google ads“.

Make sure you add this keyword to your url/slug so it is structured as follows: “yourdomain.com/google-ads

Avoid exact match with title

Try the best you can to make it the shortest possible but still looks like your content title. Url slugs shouldn’t go beyond 60 caracters at the maximum and sometimes titles exceed this number.

Therefore, copy pasting your article title as a slug with more than 60 caracters would simply affect negatively your website SEO efforts.

Limit the use of pronouns and prepositions

One of the best ways to help keep your slugs shorter and more precise is through limiting the use of pronouns and prepositions such as “the”, “a”, “through”, “per”, “to” etc.

Let’s consider the following article title as an example and how we can optimize its url/slug…

Making money with the help of google ads

An optimized url/slug can be structured as follows:

yourdomain.com/money-with-google-ads

As you can see, this is still looking like the initial title version but more shorter, and precise thanks to dropping some unecessary words and prepositions.

Another example this time from Neilpatel.com.

The article is entitled as:

19 Startup Metrics Every Founder Needs to Track Today

But for the slug, the website has limited it to “startup-metrics” as you can see here below:

Screenshot from neilpatel.com, March 2025

How to Edit your Slug in WordPress

You can edit your slug under WordPress during the process of creating or editing your articles to publish.

Editing your Slug under Block Editor

In case you’re using Block Editor, you can proceed as follows:

1 – Click “Posts” on the left menu of your WordPress Dashboard

2 – Navigate to the article you would want to optimize its Slug and click “Edit”

3 – Under the “Post” tab on the right side, scroll down to find the “link” section

5 – Click the url in front of it to start editing its Slug

6 – Click “Save” or “Publish” button once done.

Screenshot from WordPress, March 2025

Screenshot from WordPress, March 2025

Screenshot from WordPress, March 2025

Editing Slug in Classic Editor

In case you’re using Classic Editor, you can proceed as follows:

1 – Click “Posts” on the left menu of your WordPress Dashboard

2 – Navigate to the article you would want to optimize its Slug and click “Edit”

3 – Below the title field, you’ll see a “Permalink” with an “Edit” button.

4 – Click that “Edit” button to start editing your slug.

5 – Once done, click “OK” then “Save” or “Publish”.

Screenshot from WordPress, March 2025

Screenshot from WordPress, March 2025

Editing Slug through Rank Math Snippet Editor

Another way you can edit your articles slug will be through the Rank Math snippet editor.

To do so, you can proceed as follows:

1 – Click “Posts” on the left menu of your WordPress Dashboard

2 – Navigate to the article you would want to optimize its Slug and click “Edit”

3 – Scroll down to the bottom of the displayed page to find a Rank Math section with an “Edit Snippet” blue button.

4 – By clicking “Edit Snippet” blue button, a window will show up with different fields to edit.

5 – Head over to “Permalink” field to start editing your article slug

6 – Once done, Click “update” or “Publish”

Screenshot from WordPress, March 2025

Screenshot from WordPress, March 2025

Editing Slug of an already Published Article Driving Traffic

It’s necessary to draw your attention to the fact that in case you change an article’s slug that is already driving traffic, your visitors will no longer be able to access that page content through the old url. Their browsers will be returning a 404 error, instead.

In order to avoid this error, and to make sure you don’t lose your traffic because of this change in your articles slug, it’s important to think of redirecting the urls with the old slug to the new ones through the use of a redirect plugin such as “All in One SEO” or “Rank Math” to name a few.

That’s it GUYS!

Our article for today has come to an end. I hope you learnt alot today regarding URL slugs and how to optimize them in order to take the most of them in terms of SEO.

Featured Image : Designed by Freepik

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *