WordPress offers many permalink structures. There are some popular ones which many sites and Blogs use, and there are some which amazes us and force us to think why would they use such a permalink structure. Well, now is the time to let go that confusion and get your facts right. Also I’ll try to answer the age old question, “What is the best WordPress permalink structure?”. Here’s a detailed guide that explains about various types of permalink structure’s in WordPress.
What are Permalinks?
First things first, if you’re wondering what are Permalinks, then here’s what WordPress Codex has to say:
Permalinks are the permanent URLs to your individual weblog posts, as well as categories and other lists of weblog postings. A permalink is what another weblogger will use to link to your article (or section), or how you might send a link to your story in an e-mail message. The URL to each post should be permanent, and never change — hence permalink.
So in short, permalinks are URLs or website addresses. Note the word “permanent URLs” written in above explanation. Thus, it can be said that permalinks are something that is permanent and they are not something that can be changed again and again. You certainly won’t want to create 404 (website URL not found) error in your site.
To change a permalink structure go to settings > Permalinks. This should be done at the time of setting up your site for the first time. Decide on a permalink structure and stick to that. Consider all the options and then decide which one suits you best, as that permalink structure will generate all the URL’s of your posts and pages. This is something done once while starting out the site/blog.
WordPress by default offers four types of permalinks structure and the fifth one is the custom structure. Let’s take a look at each of these in detail:
- Default: E.g. http://example.com/?p=123. This is the default permalink structure of WordPress. Looks ugly, but works on all server environments. Here 123 is the post ID number. These are definitely not recommended, and of course they are not SEO friendly.
- Day and name: Their structure is /%year%/%monthnum%/%day%/%postname%/ This means that the URL structure will include the year, then month, then day and then the post title. E.g. http://example.com/2011/07/23/sample-post.
- Month and name: Their structure is /%year%/%monthnum%/%postname%/ The URL will include year, month number and then the post title E.g. http://example.com/2011/07/sample-post
- Numeric: E.g. Their structure is /archives/%post_id% The URL will include archives (as a text) and then post ID number. Archives will be compulsorily added in the URL. E.g. http://example.com/archives/123
Here’s a more detailed explanation.
- %year% :
The year of the post, four digits, for example 2004 - %monthnum% :
Month of the year, for example 05 - %day% :
Day of the month, for example 28 - %hour% :
Hour of the day, for example 15 - %minute% :
Minute of the hour, for example 43 - %second% :
Second of the minute, for example 33 - %post_id% :
The unique ID # of the post, for example 423 - %postname% :
A sanitized version of the title of the post (post slug field on Edit Post/Page panel). So “Hello World how are you!” becomes hello-world-how-are-you in the URI. Starting Permalinks with %postname% is strongly not recommended for performance reasons. - %category% :
A sanitized version of the category name (category slug field on New/Edit Category panel). Nested sub-categories appear as nested directories in the URI. Starting Permalinks with %category% is strongly not recommended for performance reasons. - %tag% :
A sanitized version of the tag name (tag slug field on New/Edit Tag panel). Starting Permalinks with %tag% is strongly not recommended for performance reasons. - %author% :
A sanitized version of the author name. Starting Permalinks with %author% is strongly not recommended for performance reasons
You may be familiar with some of these structures, and some may look like alien. E.g. %hour%, %minute% are never seen to be used by any blog, and why should any one should use them, as there are many other SEO friendly permalinks available.
What is the Best WordPress Permalink Structure?
The million dollar question, right. Pro’s or experts have different opinions here to the extent that a debate can be started on this topic. But let’s not delve deeper. These three type permalinks are the most popular:
/%year%/%monthnum%/%day%/%postname%/
/%postname%/
/%category%/%postname%/
Of these, /%postname%/ is still used on many popular blogs, and it’s the most SEO (search engine friendly) permalink structure. Why? The reason is simple, because it includes post name (also referred as post title). Therefore all the keywords which you use in a title are in the URL also. But if you noticed the above detailed permalink explanation, then many times this is written – “not recommended for performance reason”.
Now here’s the explanation given by WordPress, as what exactly is this “not recommended for performance reason”.
The reason is that these are text fields, and using them at the beginning of your permalink structure it takes more time for WordPress to distinguish your Post URLs from Page URLs (which always use the text “page slug” as the URL), and to compensate, WordPress stores a lot of extra information in its database (so much that sites with lots of Pages have experienced difficulties). So, it is best to start your permalink structure with a numeric field, such as the year or post ID.
In the /%category%/%postname%/ structure also, it again starts with a text field. Those who want to include their category name in the URL will find this structure very useful. The category name is basically a keyword. E.g. WordPress. All the posts which are related to WordPress, will go in this category and the URL will also be like this E.g. http://example.com/wordpress/introduction-to-wordpress. Here, “wordpress” is a category name and introduction to wordpress is a post title. And hence this URL.
Now, here’s one more permalink structure that is becoming popular: /%post_id%/%postname%/. Why use this structure? Because URL will be shorter compared to /%year%/%monthnum%/%day%/%postname%/, and also it includes post name.
Here comes a question. Does the above statement from WordPress about “performance reason” really makes a difference?. In one word, NO. In real world situation, one cannot find any increased loading time if we compare any of these permalinks. So there’s not much need to worry about. Technically, they are correct in saying that using text field at the start of post URL increases loading time and it will generate more queries. But this doesn’t have any significant performance issues. We can ignore this reason given by WordPress for now.
From SEO point of view, /%postname%/ is is the best permalink structure to use because the URL is shorter and also contains keywords for that particular post. Some even edit the permalink of the post, and may even add some more keywords and make the URL longer, for SEO purposes. But of course, after doing all this, we already know that “content is the king“.
So, what do the experts use?
As said above, there is a debate on which structure is the best, therefore the experts too have different opinions. By expert, I mean the most popular Blogs on their particular niche. So here we go:
/%year%/%monthnum%/%day%/%postname%/
This structure is used by:
Mashable
Tech Crunch
Smashing Magazine
/archives/%year%/%monthnum%/%day%/%postname%/
This structure is used by:
ProBlogger
/%postname%
This structure is used by:
Copyblogger
Chris Brogan
Conclusion
After reading this long post, if you are really confused, then there’s one thing you can do. Go ahead and use /%postname%/ structure. In the end, it still cannot be proved that which is the best permalink structure or which structure has more SEO advantage over other. Shorter URLs doesn’t mean that they have any advantage, and are better than others. Readability is also something that should be considered. A URL with just the post id really looks ugly, and is definitely not good for SEO. Shorter URLs doesn’t mean they will rank higher in search engines and if you are thinking that people will just type in the URL and will come to that particular post, then you are wrong. Visitors don’t remember and they don’t type the complete URL in the address bar. They’ll either bookmark the post or will type the term in Google and they will arrive to the site.
Of course, its your Blog, and after all, its YOU who needs to decide what to do and how to do. So now that you are armed with all this information, go ahead and use any permalink structure that suits YOU.
For more information, refer this Using Permalinks page from WordPress codex.
Rahul says
Good tip! I think a lot of people leave it at the strange and ugly URLs that most of the CMSs create by default. Apparently, the claim is that this is better for SEO as well. I have been using /%category%/%postname%.html as my permalink structure for a while.