What is Permalink and the best practices
Posted on August 22nd, 2016
What is Permalink?
A permalink is a URL that points to a specific web page typically by a content management system. Permalink is called so because they are permanent links and not supposed to change. Permalinks are used commonly as a URL to a blog or forum entry. One cited early use of the term ‘Permalink’ was by Jason Kottke on March 5, 2000.
Features of Permalinks
1) Permalinks are permanent static links to a web page.
2) Permalinks are usually rendered simply. They can be in human readable form.
3) Permalinks remains unchanged. So that they are less susceptible to link rot (link death). Link rot refers to the process by which hyperlinks pointing to other webpages or other resources becomes unavailable permanently. Such a link that works no longer is called as a broken link or a dead link otherwise.
4) A change in permalink can cause the users accessing the webpage getting a 404 not found error.
5) WordPress uses permalinks to point to the websites using WordPress as the content management system.
6) A permalink is a link to an individual blog post.
7) Not using permalinks is a poor blog etiquette.
Let us see an example for the main url and a permalink
Example of a main URL:
Example of a permalink:
What is the difference with the Permalinks and normal URLs?
If you have a blog, it is always good that you use the permalinks to point your blog entries. When using permalinks, you are pointing to a specific entry not to the main blog page. It will help to locate a particular entry. If you do not use the permalink, you are just pointing to your blog page.
You can find a permalink under any blog entry. One way to perform this is by putting your cursor over each link under or above a post. As you hover over a link, a little box will be displayed saying permalink.
There are many types of permalinks. The different types of permalink are given below.
Types of WordPress Permalinks
As WordPress uses permalinks commonly, we are going to see the different types of WordPress permalinks. There are three basic types of WordPress permalinks. They are discussed in detail below.
The default permalink type is ‘ugly’. They are look like as shown below.
Where, N is the post ID number. It will work on all server environments but it will not be looking nice as some other options. This is because they use numbers as the ‘N’, process id and so that they are not in human readable form. That’s why they are called as ‘ugly’ type.
mod_rewrite: “Pretty Permalinks”
The next type of the permalink in WordPress is a pretty permalink. These permalinks are visually appealing. This tends to be the most used by WordPress and even websites other than WordPress. This will be your domain name followed by a clean string of identifiers of individual posts.
A Pretty Permalink will be looking like as follows.
There are many other type of Pretty Permalinks but these two are most common and versatile.
We can create Pretty Permalinks with mod_rewrite or lighttpd. As these are human readable, these are hackable also because one can understand what each parameter means, they can try modifying the links to navigate to other locations.
PATHINFO: “Almost Pretty”
The PATHINFO Permalinks look much like mod_rewrite permalinks. The exception with the Pretty Permalink is that here they have /index.php inserted before them. These will be look like follows.
The both are similar and anything mod_rewrite permalink can do, PATHINFO permalink can do with the help of /index.php.
These are improvement on ugly permalinks.
Selecting the Permalink structure in WordPress
You can select the Permalink structure to be used in WordPress.
To do this, go to Settings → Permalinks panel.
You can choose common Permalink structures there. You can enter your own ‘Custom Structure’ field using the structure tags.
The PATHINFO Permalink can be activated by start your Permalink structure with /index.php/.
There are six options to select from there. They are:
Plain: This is the “ugly” permalink setting.
Day and name: This uses a year/month/date format followed by the posts name. The name here refers to the slug of your post.
Month and name: Same as the second one but without the day information.
Numeric: This option just uses the ID of the post from the row in the wp-posts table of your database.
Post name: This one uses the name of your post.
Custom Structure: This will allow you create your own structure using the full set of structure tags.
If you need any further assistance please reach our support department.