18 March, 2023

What is a slug? How to optimize your URL slugs in WordPress

Quick summary: A slug is an important part of a URL that comes after the domain name; together they form a permalink that leads to the source page.

Slug is probably a familiar term if you work in SEO. But the details of What is a slug? how to optimize slugs effectively in WordPress are still a fairly vague topic. Knowing about these gaps, MONA Media will help you answer the question What is a slug and give you plenty of useful tips for optimizing slugs that are user-friendly and meet SEO standards. Let's dive in.

What is a slug?

What is a slug

Slug is an important part of the URL that comes after the domain name; the two combine to form a permalink to the page. Put simply, the slug is the part after the “/” and its main job is to identify one specific page on the website. 

Example: In the link https://mona.media/dich-vu-seo/ the slug is “dich-vu-seo”, which describes the page the user is heading to.

Why is the slug so important in SEO?

The slug is one of the signals Google and other tools take into account when ranking a web page. Users can easily tell what a page is about from its slug, and decide whether to keep scrolling through the content.

Why SEO slugs matter

In particular, optimizing slugs also gives you an important advantage in SEO Onpage and improves usability for users. Example: easy to read, easy to remember, easy to understand…

Optimizing slugs also makes URLs friendlier to SEO. Specifically:

  • Keywords in the URL: You can change or split the keywords in it so that the ones you really want to rank are there. This is one of the signals Google uses to work out what a page is about.
  • Make URLs user-friendly: In search results, people often see the URL. On a results page you'll see many different URLs on a given topic. So you need to make sure the slug matches what people expect.

How do you set slugs in WordPress?

When setting a slug, you need to know 2 basic rules:

  • Hyphens replace spaces
  • Use lowercase letters only

WordPress's automatic slug creation already follows these rules, but if you set slugs by hand you need to follow them yourself.

A guide to creating slugs in WordPress

How to create an SEO slug for a post

How to create a URL slug for a post

You can set the post slug while you're writing, by hovering over Permalink right below the post title and editing it. When you've finished editing the slug, click Save so WordPress updates the information automatically.

How to create a slug for a WordPress page

As with a post, you can set a WordPress slug by finding the Permalink URL and clicking Edit. Then enter the page slug you want, and click Save or Update when you're done.

How to change a Tag or Category slug

In theory, when you create a new Tag or Category in the WordPress editor, WordPress immediately assigns it a slug automatically, with no input from you. However, if you set a slug by hand for a Category or Tag, you can come back and change it later. The process is the same for both Tag and Category.

The steps are: Go to Post → Post or Categories → Tags. The next step is to find the Tag or Category you want to edit, hover over it and click the Edit. Finally, you need to enter the slug you want into the box, then click click Update at the bottom of the page.

How do you change the Author slug?

How to change the Author slug

By default, the Author slug of an author's archive page is the username. You can't change the username of a WordPress account after it's created. What you need to do is use a free plugin to change the Author slug.

Once the plugin is activated, you'll see a new Edit Author Slug field on the user's profile. You can change how the author archive is handled.

Optimizing WordPress slugs effectively

Here are 3 simple ways to optimize slugs most effectively:

Method 1: Don't stuff keywords

The first thing to do is avoid inserting lots of keywords. This means using too many similar terms in an attempt to improve rankings. Doing so makes URLs look unnatural. Keyword stuffing also harms your website, damaging its reputation and lowering the quality of the traffic it gets. You may even be penalized by Google. It can also cost you potential customers' trust, which lowers conversion.

-> See more: The SEO-standard keyword density you need to know

Method 2: Keep slugs short

Keeping slugs short for optimization

Keep slugs as short as possible by using the minimum number of words needed to describe your page. Short URLs are easier to remember and read, which makes links more appealing to potential visitors.

Short slugs are also useful when sharing links on social media. Twitter, for example, has a fixed limit of 280 characters, so you don't want to waste space on a page address. You'll also have more room for meaningful content and for tags that start with #.

To create these short links , from the WordPress dashboard you should use the tool Quickly Add Other Links. You can create slugs just one character long with Pretty Links.

Method 3: Include important, relevant keywords

Through effective keyword research, you can find the best terms to use in a slug for SEO. This process lets you see metrics such as search volume for words and phrases on the main search engines.

Then you'll know which keywords are popular and whether they relate to your target audience. You can then work them into your slug using Pretty Links.

The most important thing is to pick and use suitable keywords in shortened URLs, because this catches your target audience's attention and inspires them to click. Using irrelevant, confusing or vague terms can hurt conversion.

Duplicate slugs: how to fix them

How to fix duplicate slugs

A duplicate slug in WordPress hurts your website's SEO and can leave users unable to find your post. The cause may be keyword spam, using too many tags in a post, or attaching content incorrectly, which leads to a duplicate slug.

To fix duplicate slugs in WordPress, you can try the following:

  • Delete the post entirely.
  • Rename the tag.
  • Change the WordPress path.

Alternatively, you can block Google index or redirect secondary pages to a main page.

Removing the subfolder slug in WordPress

To remove the subfolder slug in WordPress, go to Advanced and choose Permalinks. Look at the “Change URLs” section, and under “Strip the category base (usually/category/) from the category URL” click “Remove”.

When you've finished editing, scroll to the bottom of the page and click “Save Changes” to apply all these changes. That completes creating a slug in WordPress.

As you can see, optimizing the slug for every web page, post, category and tag is necessary, to help you rank better in search and be friendlier to readers. We hope the information MONA has shared above helps you understand What is a slug and know how to set up the slug for your website. If you want to raise your website's rankings sustainably with MONA's SEO service, don't hesitate to contact us for advice and to get SEO price list right away.

-> You might also like: Roundup of the 10 best WordPress SEO plugins

Frequently asked questions about slugs

What is a slug?
A slug is an important part of a URL that comes after the domain name; together they form a permalink that leads to the source page.
About The MONA Group: Founded in 2016, with more than 200 staff, MONA has delivered 14,000+ projects with an 85% client retention rate. MONA provides website design, full-scope SEO, custom software and AI automation solutions for businesses. Consulting hotline: 1900 636 648. Explore MONA SEO services and AI tools at work.
MONA has a podcast: listen instead of readingEpisodes on AI, automation & SEO for Vietnamese businesses
Nghe ngay
About the author

CEO & Founder · The MONA

Founder of The MONA, who built a services company of 200+ staff with 14,000+ projects delivered. Khánh Hùng shares how he thinks about building systems that run themselves, automating a business, and the real lessons from delivering projects at MONA.

Views 1,6K
Rate this article 4,8/5 · 11 ratings

Professional website
design services

Own a website with a beautiful, 100% exclusive design and a lifetime warranty, with the ability
to expand features flexibly as your business grows, starting today!

Contact Mona

    MONA có riêng một Người "Bạn Thân" cho bạn - Người Account sẽ đồng hành, hỗ trợ, hướng dẫn, đặt đồ ăn cho bạn mãi mãi, từ đây về sau!
    MONA will never sell your information or send you spam

    NHẬN TƯ VẤN SEO MIỄN PHÍ !

    Đội MONA tư vấn hệ thống quản lý giáo dục trực tuyến
    Hỏi đáp giáo dục 4.0
    Tạo cuộc hẹn miễn phí với MONA để giải đáp và tư vấn mọi thắc mắc về giải pháp số hoá ngành giáo dục
    Thời lượng cuộc hẹn
    45 Phút
    Ngày và giờ
    Thứ 2, ngày 25 tháng 12, 2023
    [9:30 - 10:15]

      Chọn ngày và giờ
      Khung giờ
      Back
      Hãy cho MONA biết bạn là ai
      0:00