A Beginner's Guide to WordPress Permalinks
In this article, we'll explain what permalinks are and give you a tour of all the default permalink structures WordPress offers. Then, you’ll learn how to create custom ones in two ways.
Each page on your website has a unique URL that enables visitors to identify and access it directly. Ideally, you want these URLs to be as easy to read and type as possible. In technical terms, those unique URLs are known as permalinks.
When you use a Content Management Systems (CMS) such as WordPress, it automatically generates URLs for your pages and posts based on the permalink structure you choose. However, it's important to note that some options are more suitable when it comes to readability and Search Engine Optimization (SEO).
What WordPress Permalinks Are
In a nutshell, WordPress permalinks are the unique URLs the platform sets for each of your posts and pages. Take these two permalinks, for example:
They both illustrate unique permalink structures. The first uses the blog post's name as its slug, which is the segment of the URL that identifies a unique page. Instead of its name, the second example uses the post's unique ID as its slug.
From a technical standpoint, both URLs work exactly the same. However, it's easy to see that the first approach is much more user-friendly. Not only is it easier to remember, but it also tells visitors what the page is all about. This is known as a “pretty” (as opposed to “ugly”) permalink.
More importantly, using keywords that explain what your page includes also helps search engines determine their purpose. In other words, they're better from an SEO perspective. If you're not using an optimized permalink structure, you're leaving organic traffic on the table.
The 6 Types of Permalink Structures WordPress Includes (And Which One You Should Use)
Before we jump in, it's important to note that if you're running a new WordPress website, you should always set your favorite permalink structure as early as possible. Conventional wisdom suggests locking down your permalink structure within the first six months since your SEO should still be in the growth stage.
On the other hand, if your website has been around for longer than that, you can still change your permalink structure. However, you may impact your search rankings if you don't implement redirects to your new URLs.
With that background info in mind, let's help you identify the best structure for your WordPress website.
We’ve already introduced this permalink structure above. Here's another example to refresh your memory:
As its name implies, this structure is bare-bones. The slug is actually the designed page ID from your database. It doesn't provide you with any information about the page you're visiting. In most cases, you'll want to use a structure that provides users (and search engines) with a bit more to go on.
2. Day and Name
As the name implies, this permalink structure uses your post or page's name and the day of its publication as part of the URL. Here's an example:
The upside of this structure is it lets your users quickly determine how old a particular post is. In some cases, this can help them assess if it's still relevant without having to hunt for a date in the text. You’ll often find news or magazine sites use this structure — essentially, any website creating time-specific content.
On the flip side, dating your posts does have a downside. For example, imagine you have an excellent post that was published two years ago, and it's considered a definitive source of information on a particular topic. Some readers might simply look at the date and think the advice is no longer relevant, regardless of whether that’s true or not.
To be clear, it's always advisable to include the date of publication somewhere within your post, but there's no compelling reason to add it as part of your URL.
3. Month and Name
This permalink structure is almost identical to the one we just covered. The only difference is, it doesn't include the day of publication as part of your post's URL:
From a functional standpoint, we're dealing with the same set of pros and cons as with the Day and Name structure. It can be nice for visitors to ascertain how old your post or page is at a glance, but it can also make some of your content look outdated.
The Numeric permalink structure shares a lot of similarities with the Plain option. Let's check out an URL using this setting so you can see it in action:
As with Plain permalinks, this setting uses your post's ID as its slug, and it doesn't provide users with any additional information. In this case, you also get a short permalink, but it comes with no other advantages so it shouldn't be your top option.
5. Post Name
Out of all the default WordPress permalink structures, this one is our favorite. It identifies your posts and pages according to their name, which makes for clean and memorable URLs, such as:
The great thing is, you can name your post and pages any way you want and even customize the slugs if those titles get too long. As a rule of thumb, your slug should remain between three to five-words long. That way, it's still short enough for your visitors to remember, and search engines will also be able to easily identify what the post is about.
6. Custom Structure
If you're not sold on any of the structures we've talked about so far, WordPress also enables you to build your own. For example, if you're running a blog, you can set up individual categories for your roundups and reviews and include them in your links. Here's an example of the former:
In practice, WordPress provides you with ten structure tags you can use to build custom permalinks. If you want to know what they are and how to use them, keep reading — we'll cover all the basics in the next section.
Two Ways to Create Custom Permalinks
As we mentioned a minute ago, WordPress offers you a built-in method to create custom permalinks. However, you can also use plugins to achieve similar results if you want a bit more control over the procedure. Let's talk about both methods.
1. Use WordPress' Custom Structure Tags
WordPress enables you to use ten types of structure tags to create custom permalinks. Let's take a minute to get to know them, then we'll see them in practice.
- Date Tags — This category includes %year%, %monthnum%, %day%, %hour%, %minute%, and %second%, and they work exactly as you expect them to. Adding any of these tags as part of your permalink structure will include those numbers within your URL.
- Post ID and Name — These tags are %post_id% and %postname%, respectively. The former displays the unique ID for any of your posts or pages, while the second shows their full title.
- Category and Author — You can add these options using the %category% and %author% tags, respectively.
To use any of these tags, you need to access your dashboard and go to the Settings > Permalinks tab. Once you're in, you can choose any permalink structure you want out of those we talked about earlier. If you want to create your own, select the Custom Structure option at the bottom of the list.
Now, all you have to do is mix and match the structure tags we talked about earlier.
For example, /%category/%post-name/ would result in this URL:
You can use as many or as few tags as you want for your custom permalink structure. However, we recommend keeping things short and avoiding dates if possible, so your content remains evergreen.
When you're ready, remember to save your changes, and that's it!
2. Use the Custom Permalinks Plugin
If you've been using WordPress for a while, you’ll know there are plugins for nearly every scenario you can imagine. Customizing permalinks is no exception. One option is the Permalink Manager plugin.
This tool enables you to customize your post and page's permalink structure and change the URLs of any individual posts a single screen.
To get started, install the plugin, activate it, then navigate to the Tools > Permalink Manager tab. Inside, you'll find a list of all your posts and the option to tweak their permalinks.
The URL Editor tab section also includes tabs for your Pages and Media, which work just the same as the Posts section. When you're done checking out those, move over to the Permastructures tab. There, you can set unique permalink structures for your posts, pages, and media.
As you can see, the plugin also uses WordPress' default structure tags to help you build new permalinks. All you have to do is put them in the order you want and save your changes.
If you're not happy with your new structures, you can always use the Restore to Default Permastructure button below each field. That's pretty much all you need to know to start using the plugin.
A lot of people don't pay any attention to the structure of their website's URLs, which is a mistake. It may seem like a small detail, but using the right permalink structure can boost your SEO and make your website more user-friendly.
As a general rule of thumb, you want to avoid URLs that include long strings of numbers or unwieldy phrases. With this in mind, the best approach is often to use your post names as your default permalink structure and shorten them manually when necessary. If that's not a good fit for your website, you can always create custom permalink structures using WordPress' tags or a plugin.