When you write a blog post WordPress may give you a URL like this: http://example.com/?p=1234 to link to the post. Not very memorable is it? This is the default permalink structure WordPress uses. The problem is that search engines and readers don’t know what type of content they will get if they click on that link.
The number in that link is the blog post or page ID that WordPress uses in the database to identify the individual blog post or page. However, using that as the URL is pretty ugly and can be hard to remember. This is where permalinks come into play. You want your links to be more user-friendly and it’s simple to do.
Terminology You Need To Know
Permalink - The permalink is the URL link to an individual blog post or page.
Tags - These are place holders that when rendered WordPress will insert the value.
Permalink Settings
There are 6 common settings in the permalink settings that you can choose from. A majority of website owners choose the Post Name option. This allows you to use the name of your blog post or page as the permalink and URL.
Plain - This is the default WordPress setting and uses the blog post or page ID number for the permalink. Example: http://example.com/?p=1234.
Day and Name - This option will display the day your blog post was created and the name of the blog post for the permalink. Example: http://example.com/2020/01/01/wordpress-is-awesome/.
Month and Name - This option will display the month your blog post was created and the name of the blog post for the permalink. Example: http://example.com/2020/01/wordpress-is-awesome/.
Numeric - This option will display the post ID of the blog post for the permalink. This option is similar to the Plain option but without the “?p=” and adds “archives”. Example: http://example.com/archives/1234/.
Post Name - This option will display the post name of the blog post for the permalink and is the most used. Example: http://example.com/wordpress-is-awesome.
Custom - You can use the available tags to create any type of permalink you like. For example, if you want to use the author name and post name in the permalinks you could create a custom permalink like this: http://example.com/%author%/%postname%. WordPress will automatically insert the correct information for the %author% and %postname% tags.
Tags you can use are:
- %year% - inserts the year the post was created
- %monthnum% - inserts the number of the month the post was created
- %day% - inserts the day the post was created
- %hour% - inserts the hour of the day the post was created
- %minute% - inserts the minute of the day the post was created
- %second% - inserts the second of the day the post was created
- %post_id% - inserts the post ID
- %postname% - inserts the name of the post
- %category% - inserts the category of the post
- %author% - inserts the assigned author of the post
Updating the website’s permalinks lets users and search engines know what to expect when they visit a website. The permalinks can have SEO implications so make sure to use the settings most beneficial to your SEO strategy.