What Is a URL Slug?
A URL slug is the part of the URL after the last backslash. For example, the article you’re reading now has a URL that looks like this:
The URL’s slug is “/what-is-a-url-slug.”
Why Is a Slug Important for SEO?
As you can see from the example above, a slug can be very powerful for keyword SEO. If a user were to search Google for “what is a slug,” the keywords in the URL structure of your content helps signal to Google that your content should be included on the SERP. A good slug can improve a user’s experience if it clearly states what the webpage is about.
Sometimes you may see a webpage URL with a chain of characters, letters, or numbers. These slugs can be confusing to users, and they may hesitate before clicking. Those kinds of slugs don’t look very trustworthy.
A good URL slug also helps the Google crawl bots understand how to get to your page and confirms the content on it.
Are Web Slugs Important for Search Engine Ranking?
The short answer is yes.
Using SEO keywords in your URL can help you rank for your target keywords. Google uses the URL as a factor in ranking your page, so if the URL slug includes your keywords, then Google will be more likely to rank it.
Is There a Difference Between a URL Slug and a URL?
- The URL slug is the last part of a full URL.
- The URL itself is the entire web address for the page.
To see this in action, let’s review one of the examples included in a previous Semrush guide to on-page SEO basics:
In this image, the entire address: https://www.semrush.com/blog/on-page-seo-basics-urls/ is considered the URL.
The last element, circled in red, is the slug.
Slug & URL Formats on Different CMS
There are different reasons for using various content management systems (CMS). Each CMS may use slugs differently.
For example, if you build a site with Wix, you can customize and change your slugs. However, there are some specific slugs you cannot use. Such slugs are reserved for Wix apps and are considered unavailable.
Shopify URL Formats
Shopify follows a very specific format when it comes to URLs:
- /products/subfolder — product pages
- /collections/subfolder — product category pages
- /pages/subfolder — web pages
It can be difficult to change the slugs. Shopify web URLs are interconnected, so changing a slug could cause broken links.
You can try to apply a parent-child URL structure for your own slugs by using a layer of filtering or tags. However, these tags won’t be as flexible for products. These URLs will also be difficult to migrate away from Shopify if you ever choose to do so.
According to the Shopify community forums, you may need to ask the Shopify support team for customized slugs.
Bigcommerce URL Formats
Bigcommerce is a website builder platform that includes the option to create an online store. It’s arguably more customizable than Shopify when it comes to URL structure, but the platform does still follow a specific format.
The platform provides all the tools you need to open an online store. Bigcommerce’s tools are easy to use, which can be attractive to people that are not too keen on building and customizing their setup.
WordPress URL Formats
WordPress allows greater freedom when it comes to slugs. You can edit the URL of the pages and blog posts you upload, and change them whenever you want.
This image above features the slug for StudioHawk’s Melbourne location page. As you can see, the field can be edited and changed. This is handy if StudioHawk wants to target some SEO keywords for Melbourne.
Poor URL Slugs
Poorly structured URLs can look like spam or a scam. To a user, this can be very off-putting and they may not click through.
For example, let's review this URL:
This URL will likely inspire some important questions: what is Z? Is this URL pointing to an about us page? Are those map coordinates? Why are the words ‘open now’ featured? Is it a shop?
Let’s take a look at this URL:
The NLA stands for the National Library of Australia, but which record are we looking at?
Bad URLs are confusing for search engines and crawl bots. If the URL doesn’t indicate what is on the page, why would a user click-through? Why would they trust that URL? How is a crawl bot supposed to index the NLA page? Who searches for “5038390?”
Unless a user was given that number and specifically entered it into a search, how would this web page ever be returned in a SERP?
It is always worth trying to customize your URL slugs for both user experience and for indexing purposes. Make the slugs as simple as possible so users can find your pages with ease.
URL Best Practices
Start Your URL with HTTPS
HTTP protocols offer secure and encrypted connections. If you don’t have this protocol, most web browsers will alert a user that they are heading to an unsecured website. More often than not, this will deter a user from continuing through.
Have a Clear Domain
If you can, match your brand name to the domain name. This helps users and search engines easily understand where they are.
For example: “ https://semrush.com” points to Semrush's online tool suite. You can see their brand name in the URL so you can be assured that when you click through you will land at Semrush’s website.
Notice that there is no “www” before the address? While technically it is still part of the URL (and you can include it if you'd like), convention no longer requires it.
Say you have a subdomain for your site's store. That would look like this:
In this case, the above URL would take you to your site's store. Google views subdomains as separate websites, meaning Google would crawl and index them separately from your site.
Optimize Page-path with Keywords
Here, you’d add your target keywords to the URL slug; this is easy for crawl bots to understand and matches up with the on-page content.
We’ll look at this URL for example: https://www.semrush.com/blog/on-page-seo-basics-urls/
From one glance at the URL, we can tell that this page is a blog post about on-page SEO basics.
Some good tips for URL structure also include:
- Avoid placing a year in your URL. You’ll be able to easily update the content without changing the URL. Any page authority or ranking the page has earned will be maintained and the content remains evergreen. If you do need dates in the URLs, just remember to redirect if you update to a new year.
- Include keywords whenever possible. The URL is a big flashing sign that tells search engines what your page is about. If someone searches “how to make a blueberry pie,” and the URL slug on your page is “how-to-make-a-blueberry-pie,” it obviously serves search intent. The URL states clearly what is on the page.
- Be clear with the slug to avoid content duplication. If you have similar URL slugs, Google may struggle to differentiate the page content, and hence choose not to serve either page up on a SERP. A site audit can help avoid any URL parameter crawling issues.
How Can Semrush Help You Find URL Structure Issues?
The Site Audit tool can help you locate and address any URL structure errors your site may have. To use the tool, you'll need to create a project for your domain.
If you already have a project set up for your domain, click through to your dashboard to see the Site Audit card:
Once the tool is open, you’ll need to configure the audit’s settings, including the crawl scope, any website restrictions, and more. Once you’re happy with the settings, select “Start Site Audit:”
Once the audit is complete, you'll be able to view any errors from the dashboard or from the "Issues" tab:
As always, you can also use the Keyword Magic tool to find the best keywords to include in your slug.
SEO can be used in all parts of your online presence, even in your URLs. Every bit of on-page optimization helps you in the SEO world.
You can use Semrush to find keywords, check your URLs, and more, so you are working the search rankings as best you can.
Remember to be clear with your slugs so users and Google know exactly what is on your page.