pls ShareBuffer this pageTweet about this on TwitterShare on Facebook1Share on Google+0
Elegant Themes for WordPress

URL slugs are one of the most important components of any WordPress site. But what are they, exactly?

If you have worked with WordPress in the past, you have probably heard the term “URL slug” at least once or twice. Automatically generated from the title of a blog post, slugs appear at the end of the post’s permalink. They are usually only a few words long, and can be directly modified either before or after a post’s creation.

For example, a post titled “URL Slugs Tutorial” might appear as http://yourblogname.domain.com/url-slugs-tutorial. The full URL is the permalink, and the bolded bit is the slug. There are a few things you can do with this slug – and a few things you should know about it, as well.

Optimizing Your Slugs and Links

Although it is entirely acceptable to leave your URL slugs as-is after creating new posts, I would recommend taking at least a few measures to optimize them. While there exists no evidence to suggest that placing keywords in your permalink will improve your search rankings, Google does make it clear in its SEO Starter Guide that a well-structured URL makes it easier for the search engine to crawl your pages. Perhaps more importantly, according to Google overly-long URLS tend to be harder to share, and less trustworthy.

With that in mind, here are some best practices for your permalinks:

  • Keep things simple. Use as few words as possible, and make use of shortlinks if necessary. For example, a post titled “Choosing the best coffee maker for your morning cup of joe” could have its slug shortened to “best-coffee-maker-morning-cup.”
  • Regularly check the trash folder on your blog, and empty it if there are any posts sitting there – otherwise, you might end up with duplicate urls.
  • Unless it is absolutely necessary, do not change your slug after you have published a post. Doing so will break any existing links to that post on the web. This includes shortlinks.

A Few Additional Points

Before I wrap up, I would like to go over a few points of confusion I have seen clients express in the past. Firstly, URL slugs are permanent after a post is created – nothing short of manually editing them will cause them to change. You can edit a post’s headline and update its content to your heart’s content.

That said, there is one thing you should avoid doing. If your permalinks are configured to include the post’s date of publication, leave that untouched once a post has gone live. Even something as simple as changing the day on which a post was published can break existing links.

Closing Thoughts

And that’s all there is to it. You now know everything you need to about how permalinks work in WordPress. If you have any further questions about the platform as a whole, check out the  WordPress Codex.

About AJ Morris

AJ Morris is the Managed WordPress Product Manager for Liquid Web, a fully managed hosting company. He has extensive experience both developing WordPress sites and speaking at WordPress events. AJ leads product and go to market strategy for Liquid Web’s Managed WordPress product line. Liquid Web's Platform as a Service solution for WordPress hosting allows you to seamlessly host multiple sites and access top-quality 24/7 Heroic Support®.

pls ShareBuffer this pageTweet about this on TwitterShare on Facebook1Share on Google+0