Having optimized permalink settings on your WordPress site is imperative to long-term success and viability. Not only do permalinks impact your SEO rankings, but they also indicate where users can find any individual piece of content on your site. There’s a big difference to both search engines and to visitors between https://example.com and https://example.com/blog/category/post-title-with-keywords. In this article, we’re going to walk you through the various ways you can configure your WordPress permalink settings so that you’re pleasing not only the Google bots, but your flesh-and-blood visitors as well.
What is a Permalink?
As we said above, a permalink is the permanent URL to your site, blog posts, pages, categories, tags, and any other individual piece or taxonomy on your WordPress site. If it’s visible, there’s a permalink for it. You can configure the basic permalink structure for your site under Settings – Permalinks in your WP dashboard.
Within WordPress, you can choose between 5 preset permalink structures of varying quality and use. Each of these will only appear after the primary installation directory. So if you’ve installed in example.com/blog, these will appear after that. If you have installed in the root directory, then it will be after the TLD.
You can also set up a custom structure using 10 different variables that change based on the post’s meta-data and publishing information. Some of these are much more useful (and usable) than others.
Additionally, if you’re a theme or plugin developer, you will want to make yourself familiar with the_permalink() hook. It will let you tap directly into WordPress itself to grab links, even if the permalink structure or individual URLs change.
Things to Keep in Mind
When considering permalinks remember that both Pages and Posts work a little differently. Posts use whatever structure you choose in Settings – Permalinks. Pages, however, will always use the “post name” option. Which is a good thing. This means that the slug for your pages won’t adapt to any changes you make. You won’t ever have your About Me page show up as something like example.com/2022/06/about.html if you restructure things in the future.
Speaking of slugs, the terminology used regarding URLs in WordPress can be confusing. A permalink is the entire URL structure for your site. The permalink is the same for all posts, except for the slug. The slug, then, is the final part of the permalink that identifies the specific content.
For example this is the full permalink for a specific post: example.com/blog/category/unique-post. However, only /unique-post is the slug, as it is a unique identifier for that single piece of content. Slugs can be anything you want, and they can be changed at any time on an individual basis. Slugs stay the same even if you change your permalink structure.
When to Use Different Permalink Structures
WordPress uses plain permalinks by default, which is why we suggest configuring your WordPress permalink structure immediately after installation. Because the plain permalinks are, to put it nicely, plain bad.
Not only does this version of permalink not include any keywords (bad for SEO), it is also identified not only by post ID but also using a query string. Like we said…bad. Users won’t be able to remember the post ID, search engines won’t see keywords or topics, and can often make search engines think your site isn’t legit.
When should you use the Plain permalink?
Pretty much never. There is rarely, if ever, a case where Plain will be more useful than any other structure. Even Custom with a %post_id% is better than Plain. And even that is pretty terrible.
Day and Name, Month and Name
Both the Day and Name and the Month and Name permalink structures have their uses. Though they tend to be limited for most WordPress site owners.
If you run a news site or produce content that is timely in any way, this permalink structure might work for you. While most content on the internet is published with a date visible somewhere on the page, that date usually gets adjusted when the content is updated. If you’re using one of the Day/Month and Name options, the date will never change even if you update the post.
That is it’s biggest weakness. Often, you want visitors to be able to see the most recent update to a post. You don’t want them to see outdated content. Or maybe more importantly, you don’t want them to think the content is outdated. Even if the date on the post itself says the current month and year, if the URL permalink shows the post was created 6+ years ago, can they be sure the content is truly up to date?
Even if it is, the specter of doubt is there, and that affects your credibility.
When should you use the Day/Month and Name permalink?
If you run a news or timely site where the dates are important for your content, this permalink structure works really well. It will definitely show that the content is outdated and is part of an archive when people discover it. Because timely sites like that don’t usually update posts, but rather publish new ones on the topic, this permalink configuration helps delineate and organize information. If, however, you update your content to keep it evergreen, avoid this one.
Much like the default Plain structure above, we don’t see the Numeric permalink getting a lot of use. Because they’re not very useful, frankly.
This structure doesn’t add anything that you can’t set up using the custom structure (as you can see in the image above). Because it defaults to the %post_id% variable, it doesn’t have SEO juice. And /archives/ being your site’s default base for content isn’t useful. If you want to have a structure like this, customize it with the base you want (such as /blog/ as an example) and a variable that hits on SEO and reader semantics.
When should you use the Numeric permalink?
Never, really. It doesn’t serve much of a purpose with the current state of the internet.
Post Title is far and above the most useful of all the permalink structures, and it’s probably also the most widely used. It isn’t perfect for every single occasion, but it’s useful in some degree for every site.
This one is simple and straightforward. When you create a post, WordPress adds its title as the slug. If you title an article “How to Customize your WordPress Permalink Settings,” the software automatically sets that title as the permalink, word for word. You can always edit the permalink slug (see below)
Because you’re using the Post Name permalink structure, the URL won’t contain any extraneous information. No dates, no categories, nothing. It’s a simple, straightforward way to create easily remembered URLs for your users that are also easily parsed by search engines.
When should you use the Post Name permalinks?
If you’re not running a site that has a lot of custom taxonomies or complicated category structure, this is likely your best option. It’s simple and makes it easy to use Posts in a similar way to Pages if you need to. You can use configure your permalink settings like this to create landing pages or pillar articles/cornerstone content that can be adjusted and updated regularly, yet still appear in your site’s feed as new content when you need them to.
The Custom Structure permalink configuration gives you full control over how you want your site to appear. Not only can you use the variables that we listed above (such as %category% and %postname%), but you can also use static strings.
In the example above, the string /articles/ will be placed as part of the slug regardless of the installation directory (which might be /blog/ like ours here at Elegant Themes). The %category% and %postname% variables will change depending on the category of the post (if you have multiples selected, only the primary category will be used here), and %postname% is the URL slug that you set in the post editor.
One thing to note is that you must include at least 1 variable in your Custom Structure. If you include only a string, WordPress will kick it back with an error that says “a structure tag is required when using custom permalinks.” This makes sense because WordPress would have no idea what the individual identifier for content would be.
When should you use the Custom Structure permalinks?
You can see in the section above how many different variables WordPress includes. So you should use the Custom Structure permalink when you need or want something specific that none of the other options provide. Give this one a look if you’re especially keen on custom taxonomies or working as many keywords into a URL as possible. While permalinks like this are longer, they give Google a better idea of how your site is structured.
How to Edit Permalink Slugs
Once you’ve configured your WordPress permalink settings, the only other thing you need to take care of is making sure that each post has the right slug at the end. As we said above, the slug is the final part of the URL that shows the individual content identifier, be that keywords or post ID.
By default, WordPress includes the entire title of the post as the slug. If you want to change that when you’re editing a post, navigate to the Permalink metabox in the Gutenberg Editor (pictured below) to edit the URL slug to whatever you want it to be. If you wanted the slug to simply be /wordpress-permalink-settings, you would just change it in the URL Slug field to have the overall URL update.
And if you’re a Classic Editor user, it’s just as easy. Simply click on the Edit button next to the URL under the post title field.
After that, it’s the same as in Gutenberg. Just type in what you want it to be and hit enter. And with that, you’ve configured your whole WordPress permalink settings.
Wrapping Up with WordPress Permalinks
Permalinks don’t have to be confusing. In fact, they’re one part of WordPress that, if done correctly, are truly set-it-and-forget-it. You should absolutely make sure that your site is fully navigable by both users and search engine crawlers. Customizing your WordPress permalinks is definitely one of the easiest parts of WordPress setup and one of the most important.
What is your preferred method of customizing your WordPress permalink?
Article featured image by rupadaratan / shutterstock.com
This content was originally published here.