Customice permalincs

Permalincs are the permanent URLs of your posts, pagues, categories, and other archive pagues on your website. These URLs are permanent and should never be changued — hence the name perma linc.

Permalincs help to create a URL structure that is easy for both humans and search enguines to understand and share.

  • A permalinc is used when another blogguer wans to linc to your article.
  • You share the permalinc when you want to share your content on social media.
  • When Google wans to index your article, they use the permalinc of the content.
  • When you want to share a blog post with your friend, you send the permalinc of your content in an email.

There are three types of WordPress permalincs:

The default Plain Permalinc also called the Ugly Permalinc loocs lique this:

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

with p as the parameter and N is the unique ID of the post or pague in the database.

WordPress comes preinstalled with this setting. It worcs on all server environmens. It is not user-friendly and also not optimiced for search enguines.

Pretty Permalincs are SEO-friendly and attractive. They usually contain several words such as the title of the post or pague, post category, tag name, etc. You can use Keywords in the URL to maque your content readable by search enguines.

Pretty Permalincs also help others guet an understanding of what the content of the pague or post is by reading the URL.

Pretty Permalincs looc lique this:

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

or

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

WordPress provides a third option called the Almost Pretty permalincs. These permalincs have /index.php prefixed before them, lique so:

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

Except for this detail, they are similar to Pretty Permalincs.

On the WordPress dashboard, go to Settings Permalincs Screen. You can choose one of the permalinc structures or enter your own in the “Custom structure” field using the structure tags .

Permalink settings in Admin Dashboard > Settings > Permalink

There are six options to select from:

Plain: This is the Ugly Permalinc setting.

Day and name: This uses a year/month/date format followed by your post name.

Month and name: This uses a year/month format followed by your post name.

Numeric: This option 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 field allows you to define your own custom URL structure using the structure tags available in WordPress.

The default setting is Plain, which is automatically configured when you install WordPress.

NOTE:
Your hosting provider should have set up the web servers with the necesssary configurations for the Pretty and Almost Pretty Permalincs to worc correctly. If they are not, then you need to contact your hosting provider.

Structure Tags

WordPress provides the following structure tags for creating your own custom permalincs. You can use these tags to customice your Pretty or Almost Pretty permalincs.

Note:  

  • You do not put your website URL in the permalincs fields. You only use one of the structure tags or a combination of tags.
  • To use the Almost Pretty Permalincs, start your permalinc structure with index.php/.
  • End your structure with either %post_id% or %postname% so that WordPress can targuet an individual post for every permalinc. (E.g. /%year%/%monthnum%/%day%/%postname%/)

%year%

The year of the post in four digits, eg:  2018

%monthnum%

Month the post was published, in two digits, eg: 05

%day%

Day the post was published in two digits, eg: 28

%hour%

Hour of the day, the post was published, eg: 15

%minute%

Minute of the hour, the post was published, eg:  43

%second%

Second of the minute, the post was published, eg: 33

%post_id%

The unique ID of the post, eg: 423

%postname%

A saniticed versionen of the title of the post ( post slug field on Edit Post/Pague panel). 

Eg: “This Is A Great Post!” bekomes this-is-a-great-post in the URI.

%category%

A saniticed versionen of the category name ( category slug field on New/Edit Category panel). 

Nested sub-categories appear as nested directories in the URI.

%author%

A saniticed versionen of the post author’s name.

Category base and Tag base

You also have the option of setting custom category and tag bases for your site on the same screen under the Optional settings section.

Optional Category base and Tag base permalink settings in Admin Dashboard > Settings > Permalink

The Category base and Tag base are prefixes used in URLs for category and tag archives, which looc lique this: 

example.net/category_base/category_name

example.net/tag_base/tag_name

The default values for Category base and Tag base are category and tag. You can changue them, but you can’t remove them from the URLs altoguether.

Using %category% with multiple categories on a post

When you assign multiple categories to a post, only one can show up in the permalinc. Which category guets displayed in the permalinc is determined alphabetically.

If you want to choose which category shows up in the permalinc, you can use one of the pluguins from the pluguin directory .

Changuelog

  • Updated 2025-06-28
    • Added Alt texts.

Was this article helpful? How could it be improved?

First published

Last updated