Choosing the Best Permalinks Structure in WordPress

Permalink is the complete address that you see and use for every page, post, or any other type of content on your WordPress website. Its name, “permalink,” plays with the word “Permanent” but is sometimes also referred to as a direct link.

That same permalink includes the domain name and the slug that appears after the domain name in the URL. The slug can contain the category name, the date, or almost any other name you choose.

However, an ideal permalink should be easily understood by both users and search engines, and it should be shareable. It should also be between 55-60 characters long. But what constitutes an ideal permalink structure in WordPress sites?

In this post, I will explain the importance of having the correct permalink structure in WordPress and the impact that your chosen permalink structure can have on your site’s Google ranking and SEO in general. Enjoy the read!

If you’re not interested in the details, jump straight to the section about the ideal link structure in WordPress.

Permalinks Should Be SEO Friendly

Using the correct link structure is an important part of technical SEO optimization. Search engines, as well as users, use these URLs to index and visit your site. The chosen constant link structure affects how they evaluate and see your site.

A URL with random characters or unnecessary words doesn’t particularly encourage people to visit it. On the other hand, a concise and descriptive constant link is more search engine-friendly and encourages sharing.

Here are some options for constant links (Permalinks):

In the past (versions 4.2 and below), WordPress used a default permalink structure that wasn’t search engine-friendly, like this example:

The number you see is the ID of that specific page or post, and each of these IDs is unique, of course. In this example case, it’s post number 47 in WordPress’s database.

However, even though Google identifies and sees the content of that specific page properly, a URL in this style doesn’t contribute much to site promotion. You can see that this URL doesn’t describe the content of the page well and isn’t a user-friendly sharing link. Moreover, it doesn’t look professional at all…

If your URL contains relevant keywords for the content, it provides Google and users with additional information about the page’s content compared to a URL containing only an ID number, as shown in the last example.

Considerations for Choosing Link Structure

You should ensure that the choice of permanent link structure fits your site’s goals. If you manage a news site, it might be appropriate to include the publication date in the URL (although this is rare).

On the other hand, if the content you’re writing is timeless and relevant even after a couple of years, it’s not recommended to include the publication date in the URL, as it might make the content seem outdated.

In general, the recommendation is to use clean and simple permanent links. For most sites, it makes sense to use the post/page name right after the domain name. For WordPress, the choice should be this:

Defining the best permalinks structure in WordPress

However, in certain situations, adding the category before the post name could be logical based on the hierarchical structure of the site. For example, in e-commerce stores and WooCommerce websites with many products, or when your site’s hierarchical structure is more complex than standard websites.

In this case, it might make sense to add the category name before the product name for clarity. But note that this option could result in longer URLs.

Let’s delve a bit deeper into choosing the ideal link structure for WordPress sites.

What’s the Ideal Link Structure for WordPress Sites?

In general, the recommendation is to use a simple and clear link structure as mentioned above. In most cases, the ideal link structure is having the post name at the end of the URL (after the domain itself), and you can add the category name before the post name.

From the perspective of site promotion and on-page SEO, having the key phrase or keyword appear in the URL as part of the post’s name, whether it’s the first word or later on, is beneficial.

What About Using Dates?

Using dates in the permanent link structure has never shown significant advantages. Adding the date to the link structure creates a sort of “expiry” date for your posts.

This expiry date might discourage people from clicking on such links, as most users usually seek the most up-to-date content, assuming it contains the most relevant and current information. Therefore, this type of link structure is not recommended.

In the past, there was a need for numbers in the URL to be indexed by Google News, but that’s not the case anymore.

Here’s a video where Matt Cutts explains why he changed the permalink structure on his blog (which runs on WordPress) from a structure including the date to a simpler structure displaying only the post name:

And what about using a category in the permalink structure?

It can be said that in most cases there is no need to add a category in the permalink structure. On the other hand, if your domain name is nice and short, it may be appropriate to add the category name in the fixed link, provided there is logic and hierarchical need for it.

Important to note, if you’re adding the category to the URL, be cautious about duplicate content in cases where you assign posts to more than one category.

If you’re using an SEO plugin like Yoast, for instance, in this case, it will take care of the canonical URL pointing to the primary category, so you don’t need to worry about duplicate content if that’s the situation.

Beyond that, using categories in the URL requires a prior understanding of the category structure on your site. This is because if you change the name and address of the category later (which happens often in the life of a site), the link to the relevant post and the category page itself might break.

Here’s a video that briefly discusses the value of categories in the URL structure.

If I summarize the video in one sentence, there’s no significant difference between whether the keyword appears in the category or in the post title.

However, despite the aforementioned, it might be appropriate to use categories in the fixed link structure for virtual stores and e-commerce sites with many products. We won’t delve into this topic right now since it requires a separate post, which will be coming soon, so keep following and subscribe to the newsletter…

Should the keyword appear at the beginning of the URL?

Not necessarily. If the keyword is in one of the first words of the fixed link, it’s nice, but it’s not necessary because it will appear as the first word in the URL, and the value of the location in the URL is quite minor. Matt Cutts also explains this better than I can. Have a look at the video.

Additionally, it’s worth noting that you shouldn’t stuff words into the URL just for ranking purposes; it may be perceived as spammy content for users and won’t contribute much to your site.

3 More Tips on URLs in WordPress

Here are a few more tips related to permanent links and the URL structure in WordPress sites:

1. Shorter is Generally Better

As mentioned, the recommendation is to have a URL that is as short as possible. First, because a clear and concise URL is better for users and search engines. Second, long URLs tend to signal that the page has less authority and requires more clicks to reach from the homepage.

Pay attention to the following URL for a product in Best Buy that describes the situation:

Example of an improperly structured URL

Use a shorter URL whenever possible so that Google understands the actual topic of the page. A study by confirms this and shows a decrease in average ranking position as the URL length increases:

Google Position relative to the URL length

2. Remove the www Prefix from the URL

This section is not intended for those who are unsure of what they’re doing.

Google truncates the URL in search results after 512px, which translates to 55-60 characters. One way to shorten the URL (by 3 characters) is to remove the www prefix from the URL.

You can do this through the WordPress admin interface. Go to Settings > General and remove it from the address.

Removing www from the URL

After doing this, you need to update Google with the change. Go to Google Search Console (Google’s site management tool) and select the preferred domain.

The images below depict how to do this in the previous version of Search Console. For information on the new version, take a look at the post I wrote about Google’s Search Console.

You can do this by clicking on the property in question, then on Site Settings and selecting Preferred Domain as shown in the following images:

Site Settings - Google Search Console Choosing Preferred Domain - Google Search Console

Note that you need to perform a server-level redirection from the www address to the non-www address, as Google might treat them as separate addresses. Here’s a way to do it in Apache servers via the htaccess file:

RewriteCond %{HTTP_HOST} ^www\.(.*)$ [NC]
RewriteRule ^(.*)$ https://%1/$1 [R=301,L]

This redirection should be done without hesitation. Choose a preferred domain and implement a permanent 301 redirect from the www version to the non-www version, and vice versa if you decide otherwise.

3. Number of Words in the Slug and Stop Words

In WordPress, the slug is the part of the URL that comes after the domain name. There’s no definitive rule for the number of words in the slug, but generally, it’s recommended to keep it under 4-5 words.

Moving on, it’s important to note that it might be advisable to remove stop words. In the context of SEO, these are common words that search engine algorithms tend to ignore as they don’t add significant value to the link or post content. Some examples of stop words you should consider removing include: “and,” “if,” “on,” “with,” “the,” “is,” and so on…

It’s worth mentioning that you should use a hyphen (-) to separate words in the URL, rather than an underscore (_). Otherwise, the separation between words won’t be clear to search engines.

In Conclusion

To summarize the discussion about permalinks in WordPress, pay attention to the following key points:

  • In most cases, use the /%postname%/ structure, where the post’s “slug” is the only part that appears after the domain name.
  • A shorter URL is a more accurate URL for Google and enhances sharing convenience.
  • Avoid using categories in the URL, unless in cases like virtual stores, e-commerce sites, or complex hierarchies.
  • Consider removing the “www” prefix from your domain but remember to update Google and implement redirection.
  • Note that the URL length should not exceed 60 characters.
  • Set the slug manually and remove stop words.
  • Strive for a URL length between 55 and 60 characters.

I hope this guide has shed some light on permalink structures in WordPress and which structure is suitable for your site. Choosing the right permalink structure will have long-term implications for your site’s URL structure, so consider the consequences before making a decision.

I would be glad to hear if you have any further insights or thoughts on the topic in the comments below… 🙂

Roee Yossef
Roee Yossef

I develop websites & custom WordPress themes by design. I love typography, colors & everything between, and aim to provide high performance, seo optimized websites with a clean & semantic code.


Leave a Comment

Quick Navigation