Knowledge Base

How Can We Help?

What is Permalink and the best practices

You are here:

What is Permanent Link?

A permanent link is a URL that refers to a specific internet page typically through a content management system. Permanent link is called so because they are permanent hyperlinks and not intended to change. Permanent links are commonly used as a URL to a blog or forum entry. One cited early use of the term ‘Permanent Link’ was by Jason Kottke on March 5, 2000.

Characteristics of Permanent Links

1) Permanent links are permanent static links to a web page.

2) Permanent links are usually rendered simply. They can be in human readable form.

3) Permanent links remain unchanged. So they are less susceptible to link rot (link death). Link rot refers to the process by which links 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) Changing a permanent link can cause the users accessing the webpage to get a 404 not found error.

5) WordPress uses permanent links to point to the websites using WordPress as the content management system.

6) A permanent link is a link to an individual blog post.

7) Not using permanent links is a poor blog etiquette.

Let us see an example for the first URL and a permanent link

Example of a basic URL:

http://www.domain.com

Example of a permanent link:

http://www.domain.com/what-is-permanent-link

What is the difference with the Permanent Links and normal URLs?

If you have a blog, it’s always good that you use the permanent links to point your blog entries. When using permanent links, you’re pointing to a specific entry not the main blog page. It will help in locating a particular entry. If you do not use the permanent link, you’re simply pointing to your blog page.

You can find a permanent link under any blog entry. One way to do that 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 various types of permanent links. The different types of permanent link are given below.

Types of WordPress Permanent Links

As WordPress uses permanent links commonly, we’re going to see the different types of WordPress permanent links. There are three basic types of WordPress permanent links. They are discussed in detail below.

Default: Ugly

The default permanent link type is ‘ugly’. They look like as shown below.

http://example.com/?p=N

Where, N is the post ID number. It will work on all server environments but it will not be looking good as some other options. This is because they use numbers as the ‘N’, process id and so they are not in human readable form. That’s why they are referred to as ‘ugly’ type.

 

mod_rewrite: “Pretty Permalinks”

The next type of the permanent link 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 can be your domain name followed by a clean string of identifiers of individual posts.

A Pretty Permalink will be looking like as follows.

http://example.com/2012/post-name/

or

http://example.com/2012/12/30/post-name

There are many other type of Pretty Permalinks but these two are most common and flexible.

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 areas.

PATHINFO: “Almost Pretty”

The PATHINFO Permalinks look very similar to mod_rewrite permalinks. The exception with the Pretty Permalink is that here they have /index.php inserted before them. These will be looking like follows.

http://example.com/index.php/yyyy/mm/dd/post-name/

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 Permanent Link structure in WordPress

You can select the Permanent Link structure to be used in WordPress.

To do this, go to Settings → Permalinks panel.

You can choose common Permanent Link structures there. You can enter your own ‘Custom Structure’ field using the structure tags.

The PATHINFO Permanent Link can be activated by start your Permanent Link 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 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 contact our support department.

Leave a Comment