Previously on the CogitActive Saga:
After deciding on WordPress Multisite to operate several personal websites, I had to address additional considerations before to create the network.
Not so long ago (i.e. when I set up my WordPress Multisite network), there was an additional step in the
Prepare Your WordPress section of the Create A Network article.
Verify that Pretty Permalinks work on your single WP instance.
While the WordPress codex doesn’t list this step anymore, using Pretty Permalinks remains the recommended way to go, irrespective of the Multisite feature implementation. In keeping with the series on Uniform Resource Locators (URL) formatting (see To www or not to www? and A domain-based or path-based network?), this post explores which permalink structure is best.
What are permalinks?
There are many well-written articles on this topic, and it is not my intent to add another (not necessarily as well written, anyway) to this list. Instead, I will reference – as I usually do – the sources in which I have found something of interest (see footnotes). Needless to say, the WordPress codex is an excellent place to start1.
Permalinks are the permanent URLs to your individual weblog posts, as well as categories and other lists of weblog postings . . . The URL to each post should be permanent, and never change — hence permalink.
In addition to this amazing resource that is the codex, WordPress provides a fully-fledged system to manage permalinks. Thus, there are three basic types of permalinks available: the ugly permalinks, the almost pretty permalinks and the Pretty Permalinks.
Here is an example of an ugly permalink:
This format contains the Post ID number (i.e. 8427) rather than words (e.g. my-post-title). In fact, this permalink reports the query string (i.e. ?p=8427) which will determine the returned resource. In this example, the request corresponds to the content stored in the 8427th row in the wp_posts table of your database.
Clearly, this is not user-friendly (i.e. not readable to human), hence the name “ugly”. That is why, to improve the aesthetics, usability and accessibility of your links, you should avoid using ugly permalinks and choose the Pretty Permalinks instead2.
What are Pretty Permalinks?
There are a large number of Pretty Permalink structures that you can choose from in the Settings > Permalinks screen – apart from Plain (the default setting), which is an ugly permalink3. Without going into details, there are five Common Settings listed:
- Day and name
- Month and name
- Post name
- Custom Structure
Let me use the Post name structure to illustrate what a Pretty Permalink looks like:
Instead of the not so human-friendly query string described earlier (i.e. ?p=8427), this URL contains a nicer identifier (i.e. my-post-title) targeting the individual post; the ID number of which is still 8427. Thanks to Pretty Permalinks, the URL is semantic that is immediately and intuitively meaningful to non-expert users.
Your own permalink structure
To my opinion, among the aforementioned listed options, only the last options – Custom Structure – is worth mentioning. It allows many
combinations permutations as it provides 10 structure tags. Thus, you can choose the format that suits you the best or that makes
it easy for visitors and search engines to navigate and refer to your content4. Yet, you should keep your URLs as short and simple as possible, and you don’t want to use too many tags.
In addition, it is important to
make sure to end your structure with either %post_id% or %postname% so that each permalink points to an individual post1. As already alluded3, the %post_id% tag will have limited value as it does not utilize keywords; making the %postname% tag a clear winner. As the WordPress codex explains, the latter is
a sanitized version of the title of the post1. In non-technical language, it means that “My post title!” becomes “my-post-title”.
You almost certainly want to be including your post name in your permalinks.Tom Ewer
In fact, it is quite popular to use only this tag; hence, the Post name option described earlier. However, as pointed out by Kevin Muldoon,
it may not [be] suitable for websites that publish multiple times per day on the same topic5. In this scenario, including date (%year%, %monthnum% and %day%), or even time (%hour%, %minute% and %second%), information may prove helpful. Now, given my weekly publishing schedule, this should not be a concern to me. Furthermore,
using dates in your URL never had many benefits6, as explained by Joost de Valk – a Search Engine Optimization (SEO) expert from Yoast.
Ending your URL with the post name is the preferred method and optionally you can prefix the post name with the category.Joost de Valk
From an SEO perspective, another tag with clear semantic value is %category%. In addition to creating
a hierarchical structure of content5, it
ensures that visitors know what kind of post they are viewing5. Furthermore,
including category information in your URLs can make sense in the context of sites with discrete and well-defined sections of interest4. I believe that this is exactly my case! As stressed by Kevin Muldoon, there is a potential pitfall using categories, though. This approach
restricts you from ever modifying your categories5.
So, which permalink structure is best?
Actually, there is no such thing as the best permalink structure because not every site will benefit from the same structure. However, the opposite is true! Don’t use the default – Plain – permalink. Apart from being ugly, as in not user-friendly, it is apparently not so pleasing to search-engine spiders either.
Anyway, whichever permalink structure you decide on, the most important is to stick with it! As for my own decision, I choose the format that suits me the best:
To be continued…
1 See Using Permalinks. ^
2 I will not cover the almost pretty permalinks, but you can read the aforementioned codex article for more information on that matter. Similarly, I will not address the ins and outs of permalinks, but if you wish to know more on this topic, you may consider starting with the articles referenced in this post. ^
3 Honestly, I don’t see how the Numeric structure can
improve the aesthetics, usability . . . of your links as compared to the ugly permalink. ^
4 Tom Ewer (2016) The Ultimate Guide to WordPress Permalinks. wpmudev. ^
5 Kevin Muldoon (2014) A Guide To WordPress Permalinks, And Why You Should Never Use The Default Settings. Elegant Themes. ^
6 Joost de Valk (2017) The perfect WordPress SEO permalink structure. Yoast. ^