A slug is a text that comes after your domain name in the URL of a webpage in WordPress. It’s essentially the section of your website’s URL that identifies every page (except for the homepage).
Sometimes you’ll have two slugs next to each other. The “knowledgebase” component of the URL is the slug for the Knowledge Base area, while the “what-is-a-slug” part is for the individual article.
Every public page on your WordPress site gets its own slug by default, comprising articles, webpages, categories, and author vaults. And you have complete control over every individual slug on your WordPress website in some way.
Slugs are vital for search engine optimization and readability; thus, they are worth considering.
What can you include in slugs in WordPress?
Since slugs are part of a website’s URL, several fundamental recommended practices should be followed:
Substitute dashes for spaces.
Only use lowercase letters.
WordPress will resolve these errors for you automatically. We mention them solely so you don’t get confused when WordPress substitutes dashes for spaces or lowercases your capital letters.
How to Change the Slug of a WordPress Post?
When creating or modifying a WordPress post, you may change the slug. If you’re going to write a new post, save this as a draught first. You’ll see a box with the Permalink URL and an Edit icon when you click the Title box.
When you select Edit from the drop-down menu, the slug component of the URL will be editable.
Select Save and ensure your article is published or updated when you’re ready. Remember that Google prefers clean, organized, and structured WordPress sites, including short URLs and/or slugs. They can also aid in increasing your CTR. According to research, CEOs are 250 percent more likely to engage in an organic listing if:
The slug was relatively brief.
A listing including a long slug appeared just underneath it.
Making your slugs short and to the point might provide a significant competitive edge. Remember that WordPress will automatically generate a slug for you, depending on the title.
When Changing WordPress Slugs Later, Be Careful
You should be cautious about modifying the slug for material after being produced. When you update the slug for a piece of information, anyone trying to access it through the URL with the old slug may have problems doing so.
WordPress will attempt to redirect traffic to the new slug for posts and pages, but it does not always work. In this scenario, you’ll need to set up a detour to your unique URL. Because you want your customers to wind up on a 404 page, you’ll want to save links for SEO purposes using a 301 redirect.
Establishing a new section or tag in the WordPress Editor automatically adds a slug to that item without your involvement. However, if you choose to specify the slug for a section or label manually, you can permanently alter it afterward. For both classes and tags, the procedure is nearly identical.
Visit Seahawk Media for everything you need to know about WordPress Slug.