Permalinks are URLs of your content, such as posts, pages, categories, and other custom post types on your website. Understanding what they are and how they work is an essential piece of making your site accessible and SEO friendly.
This guide will look at why permalinks are important, how to set them and the different WordPress permalink structures.
Are you ready? Let’s get started!
What are WordPress Permalinks?
The official WordPress codex describes permalinks as:
Permalinks are the permanent URLs of your posts, pages, categories, and other archive pages on your website. These URLs are permanent and should never be changed — hence the name permalink.
For instance, the permalink of this guide is https://getstartedwp.com/wordpress-permalinks-explained and the permalink of GetStartedWP home page is https://getstartedwp.com, in other words, the permalinks are the URL structure of every content in your WordPress site.
Permalinks help you to make your content shareable and indexable by search engines.
Types of Permalinks in WordPress
Plain Permalinks
The simplest and the default option in WordPress, it is also called the Ugly Permalink and looks something like this:
p
is the parameter and 123
corresponds to the id of your post or page in the database.
By default in WordPress, the permalinks structure is set as plain, this structure is not SEO-friendly and makes it difficult to read by your visitors.
Pretty Permalinks
Unlike Plain Permalinks, this type of structure is SEO-friendly and appealing. They contain multiple words such as the title of the post or page, category, tag, product name, etc. We recommend using Keywords in the URL to make your content readable and indexable by search engines.
Pretty Permalinks look like this:
How to Set Permalinks in WordPress
Go to your WordPress dashboard and then Settings → Permalinks. Here you can choose one of the permalink structures we mentioned above.
Also, you’ll see the option to enter your own custom structure by using the structure tags that WordPress has available.
Let’s see at each of these options:
Plain – This is the default permalink setting
Day and name – This uses a year/month/date format followed by the post name.
Month and name – This one uses a year/month format followed by the post name.
Numeric – Instead of using a string, uses the ID of the post from the table of your database.
Post name – It uses the name of the post.
Custom Structure – Allows you to set your own permalink tags such as:
- %year% – The year of your publication, eg: 2022
- %monthnum% – The month when the post was published, in two digits, eg: 10
- %day% – The day when the post was published, in two digits, eg: 14
- %hour% – The hour of the day, when the post was published, eg: 10
- %minute% – The minute of the hour, when the post was published, eg: 25
- %second% – The second of the minute, when the post was published, eg: 33
- %post_id% – The post unique ID, eg: 1635
- %postname% – A sanitized version of the post title (post slug field on the Edit Post/Page)
- %category% – The category slug
- %author% – The author slug.
We hope this guide helps you to understand how WordPress permalinks work and the importance of setting pretty permalinks on your WordPress site. If you liked this article, then please subscribe to our YouTube Channel for WordPress video tutorials. You can also find us on Twitter and Facebook.