Permalinks refer to the permanent URLs of your WordPress posts, categories, tags, etc. Many webmasters, especially beginners, do not pay much attention to permalinks, but actually, they are of significant importance as they are the paths that visitors use to browse the site contents, other blogs use to link to the your site, and search engines use to crawl the webpages.
The structure of the permalinks of your WordPress site is changeable, but you should know that making a change does affect all URLs of your site and can lead to numerous 404 page not found errors. Of course, you can create 301 redirects to remove the errors, but why don’t you choose the most proper permalink structure at the very beginning when setting up your site to stop yourself from being bothered by a future change?
This post will mainly explore the structure of WordPress permalinks – how it affects the website SEO, and which should be your choice.
Default Structure – Do Not Use It!
In the WordPress Dashboard > Settings > Permalinks, you can view and change the settings of permalinks. There are several common settings on the page that you can choose, among which the first one is the default setting of permalink structure.
By default, WordPress defines the address of individual posts with a question mark and a string of numbers, just like what shown in the image above. In fact, the numbers in the default permalink structure indicates the place where the content is located in your database.
The default setting is not user-friendly, as it only works for the system and does not suggest any informational or useful content for visitors. Besides, it is not SEO friendly. Why? Because it does not offer any information for search engines, either.
For example, Google states that URLs with relevant and readable words are much better than those with an ID only, thus they can be crawled better. If your permalinks are well structured with keywords of your content included, your site will have more chances to rank better in search engines.
Pre-Made Permalink Structures & Structure Tags
WordPress offers you four options of pre-defined permalink structures which are called Pretty Permalinks, and allows you to set your own by using structure tags. But before making any change, you must make sure that the .htaccess file is writable so that the change can come into effect.
The pre-made structures are easy to understand, but if you do not like any of them and would like to make your own choice by customizing the custom structure, you have to get some understanding about the structure tags. Altogether, WordPress has ten structure tags which you can use to define the permalinks, as listed and explained in below.
The former six tags are widely used, but the others are used by very few websites. When you use several tags at one time, you only need to separate them with a “/”. For example, you want the format of /year/month/post-name/, then you can fill in “/%year%/%monthnum%/%postname%/”.
- %year%: The year when the post is published, for example, 2015.
- %monthnum%:% The month when the post is published, for example, 05.
- %day%: The day on which the post is published, for example, 12.
- %post_id%:% The unique ID of the post.
- %postname%:% The post slug, which refers to the sanitized version of the post title.
- %category%:% The category name.
- %author%:% The author name.
- %hour%:% The hour when the post is published.
- %minute%:% The minute when the post is published.
- %second%:% The second when the post is published.
There is one thing that needs special attention. The custom permalink structure needs to be ended with either %post_id% or %postname% no matter which other tags are implemented. Only in this way can you make sure that a permalink points to an individual post instead of possibly several posts on your site.
Which Permalink Structure Is Best for You?
Technically speaking, you can use whichever structure you like as long as it is in a structured hierarchy. However, there are indeed some popular combinations which are commonly used by certain types of WordPress sites. You can make a choice according to your preference, or you can also refer to the suggestions below.
Post name. Using %postname%, the structure of permalinks should be www.yourdomain.com/test-post/. The benefits of the structure are notable. For instance, the URLs are highly memorable and readable, making things easy to understand. We even use it on this site. If you run a blog, it is a suitable choice for you. You may worry about that it might cause any performance issue, but that is indeed an old story. WordPress has already fixed the problem, after all.
Category + post name. This structure generates URLs like www.yourdomain.com/blog/test-post/. When your site has a clear content structure with a large number of mature and fixed categories, you may need to take this permalink structure into consideration. It tells visitors clearly where they locate, which increases the usability of your site and brings more potential page views.
Month/day + post name. With these structures, the URLs of your site are in this format: www.yourdomaim.com/2015/05/test-post/ or www.yourdomain.com/2015/05/12/test-post/. The combinations are good for large news sites which have many posts to publish on a month or day basis. Besides helping visitors calculate the value of news based on time, the structures also assist visitors in locating the news they need quickly.
In most cases, custom structures work with no accidents, but there are also possibilities of permalinks not working. If you are in such a situation, be patient and look into the reasons carefully. The solutions are usually simple.
Category and Tag Base
Right below the Common Settings of permalinks, you can see Optional settings about category base and tag base which are shown in the URLs of category and tag archives. For example, if you have a category named blog, the URL of the category archives would be www.yourdomain.com/category/blog/. You can change the category and tag base into whatever you like.
Some webmasters may choose to remove the category base from URLs to make things simpler. This task is easy as you only need to set the custom permalink structure as /%category%/%postname%/ and then put a period for category base. If it is successful, you can get category archives like www.yourdomain.com/blog/ (“blog” refers to the category name).