Slugs in WordPress, what are they and how to use them on your website?

Hosting Mautic QuickStart -50% with support in Spanish
24 hours and free training

Send up to 1,000,000 emails/year. Mautic support in Spanish 24 hours, 365 days

Slugs are a very important part when designing a web page and not taking them into consideration can be one of the main factors why your website does not rank in Google.

In my career as a web designer and SEO consultant I have come across many projects that from the beginning have had poor slug management and for that reason that website has not had the expected growth.

The configuration of the slugs in WordPress must be done well from the beginning so that the structure of the web at the content level is visually clear for the user and at the web positioning level it is effective.

In this article you will see what slugs are in WordPress and how you have to work with them so that the project you have in hand reaches the highest possible level.

What are slugs in WordPress?

Slugs in WordPress are basically the structure of the url, it is the name that you add after the name of your domain in each of your pages or entries on your website.

– I give you an example:

Imagine that you are creating your website and you are going to create a page called:

“Where to eat a seafood paella in Valencia?”

If you are familiar with WordPress you will see that by default this CMS takes the title to add it as slugs and the most normal thing is that the url (slug) is this:

youritioweb.com/where-to-eat-a-seafood-paella-in-valencia/

You may also find that WordPress has set this url:

youritioweb.com/2019/10/10/where-to-eat-a-seafood-paella-in-valencia/

These they are not too successful urls and you have control of them since they can be changed as you will see throughout this article where you will also learn how to carry out a good slug strategy so that each of the ones created on your website make sense and are effective.

How to choose permanent links for my website (permalinks)

When you have just installed WordPress, the first thing you have to do is choose a type of structure for all the urls on the web.

If you choose an unsuitable structure for the web that you are going to create, you will have a problem in the future if you want to change it.

To access these configuration options you have to go to the side panel in :

WordPress>settings>permalinks.

Unless you have a newspaper or a magazine where you are especially interested in including the date in the slug because the content is updated daily, it is best to choose a friendly url like the one established by default as the “entry name” option. .

By choosing this option as you see in the image above, the user will see a clean url and Google or the other search engines will better understand the url structure of your website.
Otherwise imagine a url like this for example:

See also  optional imagick module

yoursite.es/blog/?p=123)

The number that appears at the end is the ID that WordPress assigns to that created page.

As you can see, it is not aesthetically attractive, nor does it contribute anything to the user and it is detrimental to the positioning of the web.

* It is important not to change the url structure in the future. If you did, you would have to make redirects, since you would be causing 404 errors (non-existent pages) that you would have to fix, being very detrimental to the SEO of the website if it is not done well.

The recommended thing for usability and positioning is to choose the option established by default “entry name”.

How to create slugs on posts and pages

Every time you create a new page or post, a URL is associated with that content.

This url will be created automatically as I mentioned at the beginning of the article.

In most cases, the ideal is to edit that slug making it as short as possible and optimize it for SEO.

Editing that url is very easy. Once you create the new page where the default title will come to you, you will see (as I indicate in the image below) the url field below it; if you click edit you will be able to change that slug.

* This url field appears once you create the title and click save changes (don’t click publish or whatever you’ve created for now will be visible to everyone).

It is important that the terms used for the slug are lowercase letterslet them go separated by hyphens (-) and that avoid using accents and other characters like letter ñ.

There are more ways to do it…

For example, you need an SEO plugin to manage the different Slugs since automatically generating URLs with slugs that we do not want search engines to visit or show in their results.

with plugin Yoast SEO We achieve this in addition to allowing you to have another way to edit the slugs of any page or post directly, since it also allows you to do it from its options.

Learn to configure this plugin and work well with WordPress slugs in a simple way thanks to this .

How to change slugs in categories and tags

You can just like posts and pages.

To access them you have to go to the option Tickets>Categories.

Fill in the slug field with terms that briefly define the category.

* Tags are created just like categories.

You can change the url of each category by clicking on edit in each of them, but you have to be careful in doing so since you will be generating an error in the old url when it ceases to exist.

See also  Show prices in installments with interest percentages

Also, a change of the slug in categories can influence the entire positioning of the web since all the articles hang from a certain category and if these are being indexed it can generate a significant crawling problem for search engines.

We will see it below.

How to change the Author slug

By default, the author slug is the username.

Unable to change the username of a default WordPress account after you have created it. But as for everything there is always a plugin.

with plugin Edit Author Slug You can change the name of the authors of your website.
Once installed and active, now when editing users, you can assign another name to the author slug.

How to change slugs in online stores (WooCommerce)

Online stores created in WooCommerce have the problem of treating slugs not entirely correctly.

Every time you create a WordPress product or category, it creates URLs of the type:

yourwebsite.com/product/product-slug
youritioweb.com/category/slug-de-la-categoria

WordPress creates a kind of previous directory to organize the information in this way and this can be good and bad at the same time from the SEO point of view, since it is a longer URL and with greater depth of tracking.

with plugin Woocommerce Permalink Manager You can make this intermediate slug disappear so that the URLs of your website are 100% friendly in the following way:

yourwebsite.com/product-slug
yoursiteweb.com/slug-of-the-category

More sites on the web where slugs are worked

Slugs in WordPress are not only created in posts, pages or categories, they also exist in:

  • Attached files.
  • Portfolio and plugin extensions.
  • Filters in online stores.

The urls generated by default in some plugins, such as product filters in Woocommerce, are generated automatically and are not modifiable.

The solution to avoid problems with duplicate content, etc., is to use SEO plugins such as the aforementioned Yoast.

SEO for Slugs

Slugs play a very important role in SEO. Although it is true that search engines like Google go much further than a simple URL.

Everything adds up in SEO and no matter how little it is, the truth is that a well-optimized URL helps a lot in web positioning.

When writing each url of a page, entry or category, it is important to take these factors into account:

The url must include the keyword to be targeted, which will normally be similar to the title.

It should be as short as possible, using 4 or 5 words at most and removing, if possible, articles, prepositions, conjunctions…

Example: If you have written a post about “The best beaches for surfing” you can use a url like “best-beaches-for-surfing”.

If the domain already contains that keyword, it may be a good idea not to duplicate it.

For example, imagine that your website is zapatosbaratos.es. Creating a url called cheapshoes.es/de-tacon/ may be an idea to keep in mind since the domain already includes the keyword.

See also  Prestashop invoice numbering

Be careful indexing urls created by default with plugins, authors or product filters in Woocommerce. A plugin like Yoast SEO helps keep these urls from being indexed.

If you modify a url with a new slug, you have to do internal redirection work on the links that pointed to the old one to avoid double redirection (helps Google tracking).

Beware of cannibalizations: You have to be careful that the urls are as different as possible and of course not to repeat (although for this WordPress already takes care of including a -2 when detecting an equal url).

If the url is unique and WordPress keeps adding a -2, you may have a draft or deleted entry with that url.

Delete it or create a title with a different url.

Beware of mirror links

Mirror links are very common on any website and can cause duplication and confusion in Google when they understand that they are different URLs.

They basically occur when we create internal links without including the / at the end.

Imagine creating a link that points to the home page like this: cheap shoes/de-tacon.

And another link in another part of the web that is cheap shoes / de-tacon /.

This is a mirror link and it must be prevented from happening since Google or the rest of the search engines can interpret that they are different URLs.

conclusion

Slugs in WordPress are very important. I find many projects that are not working at the SEO level because they have a bad job in the urls.

The user needs to see in each slug the theme of the post or page that they are going to read, since it appears in the Google serps or in the browser and invites them to continue reading when knowing what the content is about.

Search engines need the same, make it easy for them because a good part of your SEO strategy involves having some optimized urls.

If you want to make your website go up in Google and have a more user-friendly structure, you have to do an important job of restructuring urls, and if you are working to launch your new website, you already know the importance of slugs in SEO of your web project.

Help us improve our content by sharing your opinion

Web designer, SEO and Digital Marketing consultant | I work as a freelancer making websites for clients who want to grow their business through the internet | In addition, I teach in my Blog how to create a web project absolutely from scratch | You can find me on social media.

Loading Facebook Comments ...
Loading Disqus Comments ...