What is a Slug?

A slug is the part of the web address (Uniform Resource Locator or URL) which identifies a particular page on a website in an easy to read form.

In other words, it’s the part of the web address or URL that explains the page’s content.

For example, if the URL is https://www.treeviedesigns.co.uk/news/this-is-the-slug then the slug is "this-is-the-slug"

Why are slugs important

It forms the title of the page within the browser tabs for easy visibility.

Writing a good slug for your page or post can positively affect the rankings of your page. It allows you to do the following things:

Include your keyword in the URL

The main benefit of a slug is that you can change the words to make sure that it has the words that you really want to rank for. It’s one of the indicators Google uses to determine what a page is about.

Create user friendly URLs

The URL is also one of the things that people see in the search results.

Google Search Results

In the example above

  • URL = http://www.treeviewdesignsdemo.co.uk/smart-forms
  • SLUG = smart-forms

Getting the slug makes it more likely that your page will be clicked on. For example if the slug was to show as /?P=613459 then it is less likely to be clicked on.


Basic rules to follow

Keep it focused

Strip your URLs of words like ‘a’, ‘of’, ‘the’ etc. If possible, strip your URLs of verbs as well. Words like ‘are’ or ‘have’ are not needed in your URL to make clear what the page is about.

Use keywords

It has to make clear what your page is about immediately.

Keep it Short

It makes them easy to read and ensures that the full URL is shown

Don't use Spaces, Underscores and Special Characters

Spaces should be replaced with a 'Dash'