Blog

What is a slug and why is it important?

Afbeelding What is a slug and why is it important?

The slug of a website is a part of the URL that comes after the domain name. The slug is usually written user-friendly, so that the content of the relevant web page can immediately be understood by the visitor. Read in this blog article what a slug is exactly and why it is important.

What is a slug?

A slug is a term that often comes back when setting up your WordPress website. It’s one of the basic parts that comes with every post or article you write. Each post is linked to a URL, which allows people to find your post. The slug is the part of the URL that describes the article and comes after the domain name. In the example, the slug is underlined:

https://voorbeeldwebsite.nl/ example-slug

You can always choose a slug yourself. You can think of the subject of the article that has been posted. For example, it is already clear to visitors to the URL what the keywords of the article will be. Of course, you are also free to choose something completely different.

In most cases, a dash is placed between different words by WordPress to keep the slug clear. This is one of the conditions that WordPress sets for a slug. All conditions to a slug are:

  • It should only contain lowercase letters
  • Special characters must not be incorporated in a slug
  • Spaces are replaced by a hyphen

Use slugs for categories

Many sites post in certain categories. For example, you can think of the categories ‘house’, ‘garden’ and ‘kitchen’, or ‘manual’, ‘step-by-step plan’ and ‘what is …’. You can also create a slug for these categories. For this you have to choose a name that is shown on the website, with a slug next to it. This describes WordPress as the URL-friendly version of the name you want to display. For this you can only use (lowercase) letters, numbers and / or hyphens.

Slugs determine your SEO

When determining the results, a search engine also takes into account the URL of a particular website. For example, Google likes user-friendly URLs with as few unnecessary words as possible. It can therefore be worthwhile to manually adjust the automatically created slug.

Conjunctions such as ‘and’, ‘or’, ‘if’ and similar words often add nothing and make for less user-friendliness. Google knows that and therefore ignores these URLs. So remember to remove these words from your URL so that you rank well in search engines. As a guideline, take less than 75 characters, including your domain name.

For example, you can write an article called: ‘Useful tips and tricks for all succulents.’ This is often automatically translated into a slug like this: ‘/handy-tips-and-tricks-for-all-succulents’. Such a slug is super long and gives little substantive information. Google will probably not show this URL quickly. It then makes sense to adjust the slug to something in the form of ‘/tips-tricks-succulents’. This slug is a lot shorter, clearer and therefore more user-friendly. There is a good chance that you will score better in Google with this.

Last year, a new Google SEO ranking factor was added that Google takes into account.

Slugs change after publication: yes or no?

You can change a slug to a new slug at any time. For example, you can think about this when you expand the content of an article just a bit and the URL no longer covers the load. Yet this is not a wise thing to do. All old URLs that point to this page suddenly stop working.

You can fix this by redirecting a 301 redirect from the old slug URL to the new URL. This is often not so convenient, since it can take a lot of time and your website becomes extremely slow. So only adjust your slug if it is really necessary. For the old URL, arrange a 301 redirect to the new page, so that visitors always end up on the right page.

Conclusion: slugs and their function

A slug is therefore a part of the URL, which indicates what the specific page is about. You can also organize different parts of your website with a slug. A good URL with a slug consists of less than 75 characters, including the domain name. So always try to adjust the automatic slug to at most the most important words. Your URL will automatically score a lot better in the listings of search engines. You can adjust your slug as many times as you want after publication, but only do this if it is really necessary. Your old URL will no longer point to anything. If you still want to replace a slug, it is also smart to build in a 301 redirect from the old URL to the new URL.

Need help? Outsource it!

Do you still have that it does not work or do you not want to put so much time into it? For our WordPress specialists , this is daily work. Leave it to the experts and outsource your WordPress maintenance. Check out our WordPress Maintenance Packages. Haven’t figured it out yet? Contact us via live chat or call us on 030 20 72 488.

Was this article helpful?

Yes No

We'll assist you promptly and professionally!

Check here all benefits.

Also check the article
Also check the article
© WPmaintenance.com 2011 - 2024 | All rights reserved | WordPress Maintenance is part of Artitex