Permalinks, as the name suggests, are permanent links to pages or posts, categories or tags on your website which makes it easier for your visitors and search engines to navigate around your website.
Table Of Contents
- 1. Why Changing Permalinks Is Important?
- 1.1. Effective Permalinks Help With the SEO
- 1.2. Custom Permalinks are easy to Remember
- 1.3. Short Permalinks are Easier to Analyze
- 1.4. Customized Permalinks Prevent Duplicate Content
- 1.5. How to Change The Permalink Structure?
- 2. Building a Custom Permalink Structure
- 3. What is the Best Permalink Structure for WordPress?
- 4. Customizing Category and Tag Base Settings
- 5. Conclusion
- 6. Understanding Permalinks – Video
Having a well-organized permalink structure makes your website both user, as well as, search engine friendly. Fortunately, WordPress allows changing permalink structure quite easily without affecting the content of your website.
1 Why Changing Permalinks Is Important?
Changing permalink structure on your website carries many advantages including search engine optimization and better user engagement.
However, to understand the reasons as to why you should care about permalink structure, there are a few things that you might want to know about. So here are the best reasons to customize permalinks for your website.
1.1 Effective Permalinks Help With the SEO
The most practical and beneficial use of permalinks is SEO.
Having a permalink that gives a hint about the keywords of the content of the post helps search engines like Google to index it better for relevant keywords.
For example, if your post contains information about politics and media, you might want to make the permalink of your post at http://www.Domain.com/Politics-media or something similar to it.
1.2 Custom Permalinks are easy to Remember
Sometimes, developers use permalink customization to make things more readable and aesthetically more appealing to retain the uniqueness of the website.
It is preferred to have a short and easy to memorize permalink structure that is easy to type and share over the phone or by word of mouth.
1.3 Short Permalinks are Easier to Analyze
How many times have you closed a website or not bookmarked it because the URL looked fishy? Plenty of times, isn’t it?
There is something about long URLs with weird numbers and characters that make you not want to look at them. Custom Permalinks can change that notion.
WordPress has the option to create short, clear, simple, and to-the-point permalinks so that your URLs look professional along with your website.
1.4 Customized Permalinks Prevent Duplicate Content
There is a chance that sometimes you will have posts with almost similar titles. In that case, you might want to separate the original one from the new post while still keeping the keywords in the link.
This can be done using several methods, one of which is to include a date and the name of the post in the permalinks. This will separate the permalinks even if the post titles are almost the same.
1.5 How to Change The Permalink Structure?
You can change the permalink structure by logging in to your WordPress dashboard and then hitting Settings from the left-hand side. From settings drop-down box, click on the Permalinks option.
There are a bunch of options that you can use to customize the permalink structure.
You can either use the pre-formatted permalink structure, or you can enter your own in the Custom Structure Field.
There are six different options for changing the permalink. Each option carries its own significance.
- Plain: A plain permalink can be termed pretty useless as it only contains the post ID and that’s all. You get nothing fancy or useful from this option. You should use this option only if you want the shortest possible URL for your post.
- Day and Name: Selecting this options inserts the year/month/date format into each URL, where the permalink contains the date on which the post is published and also the title of the post. The name is the title/slug of your post.
- Month and Name: This option is similar to the above options, except that there is no day included in the link structure.
- Numeric: This option adds the numerical value into your permalink structure. The number is ID of the post from the row in the wp-posts table of your database.
- Post Name: This one simply uses the name/title of your post. This is usually the most SEO friendly version of your URL and should be used on most websites. The only exception is a website that wants to rank in Google News because of the requirement of a number in URL by Google News Approval team.
- Custom Structure: You can use this option to define your structure using the full set of structure tags available in WordPress Codex.
Eg:
http://www.domain.com/%post_id%//%year%/%monthnum%/%day%/%postname%/
When you use WordPress without making any changes to the permalinks, the default style of the permalinks is, of course, the “Plain” version.
2 Building a Custom Permalink Structure
There are a total of 10 types of structure tags in WordPress Codex that allow you to define your custom permalinks. Among them, 7 of the most important ones that you will come across more often are listed below:
- %postname%: Your Post’s slug.
- %Post_id%: The Unique ID of your post from the wp-posts table of your database.
- %category%: This involves the main category of your post.
- %year%: The year of the post published.
- %monthnum%: The month in which the post was published.
- %day%: The day in numerical format on which the post was published.
- %author: Usually practical in magazine type websites and when multiple authors are posting on your website.
All these should be used in the “Custom Structure” option in the permalink settings sub-menu.
If you are into micro-managing your URLs, you can use specifics like %hour% %minute% %second%, although, it is pretty difficult to think of a scenario where you would want such level of specific details.
It should be noted that when putting together custom permalink structure, it is advised to include at least one %postname% or %post_id% for WordPress to target a particular post, as these are the only tags that give the absolute identification of a post.
If for example, you wanted to create a custom permalink structure comprising of custom IDs and post name – the input would be something like this: /%id%/%postname%/
You can also access the settings for the custom category and tag bases on the same screen under the Optional Settings section.
3 What is the Best Permalink Structure for WordPress?
Depending on the type and niche of the website you are running, there are a few options to choose from as your permalink structure.
Say, for example, if you are running a news website that posts multiple articles per day, you might want to stick to Name and Date option which can be done by entering the following input in the custom structure:
Some search engines also require you to have a unique number, except the date, in your news article URL. Using Post ID in your URL structure comes handy in this case.
It is recommended to use post name for everything else (/%postname%/) or use it in conjunction with category (/%category%/%postname%/) to boost SEO as it provides room to use more keywords in the permalink.
It should, however, be noted that, in case you use the category and often find yourself in a place where you changed the categories of the post, then, the category permalink structure is not recommended in that case as it would break the links when you move a post from one category to another.
This will cause a 404 error and will adversely affect the search engine rankings.
You should always utilize the best permalink structure to rank better on the search engines.
4 Customizing Category and Tag Base Settings
You will be able to see the category and tag section under the Optional Settings of the Permalink Settings page. This will allow you to change the field values of category and tags.
By default, the values for this is Category and Tag. So, for example, you have a category on your website as Design, in that case, your typical permalink would look like is this:
Likewise, if you have a tag named Technology, the URL would look like this:
These fields are usually used for archives and changing them will allow you to change the URLs that are used for archives.
For Example, you can change the categories to cat and the tag to a topic, which in our example would look something like this:
If you looking for a simple look for your URL, you might want to skip the category base altogether. This would change the URL from http://www.Domain.com/cat/design to http://www.Domain.com/design which indeed is much better.
If you are using Rank Math WordPress SEO plugin to manage the On-page SEO, you can use the same plugin to remove the category base.
Just head over to Rank Math > General Settings > Links and turn the option on for ‘Strip Category Base’. Doing so will strip “/category/” from all your category archive pages. Always proceed with caution and make sure your category names and post names don’t clash.
Also, there is a less hectic method that you can use to remove the category base without using any code changes or plugin. All you have to do is insert the /%category%/%postname%/ as your custom permalink structure and then enter a period (full-stop) for the category base.
It should be noted that to use this method, you need to enter %category% in your custom structure and then add periods, failure to do so will bring up 404-page errors for all your categories and posts.
5 Conclusion
In addition to creating neat, more manageable and better-looking URLs – permalinks can be used to direct traffic to your website because of some level of SEO integration right into your post links or URLs.
While the Post name and date are probably the most used in the permalink structure, choosing a link structure depends on your personal preference.
It is however recommended that you set the permalink structure of your website on the very first time when you are setting up your WordPress website and also not change it too often.
If, however, it is imperative to change the permalink structure in future – you must use a redirection plugin such as Redirection or Simple 301 Redirects to ensure that you do not lose any traffic and inadvertently cause a rise of 404 errors on your website.
Or, you can use Rank Math’s built-in Redirections module.
So, if you want to modify the structure of your WordPress permalinks, you can either use the fields that come built-in in the permalink settings or you can just create custom permalinks using the custom field option in the permalink settings.
Also, in case you want to include category and tag base in your URLs, you will have to use the Optional Settings on the permalink page. You can remove the category base by following the procedure listed above.
That was a quick WordPress tutorial to set up the best format of the permalink structure for your website. If you want to optimize the overall structure of your entire website, you should look into silo structuring.
6 Understanding Permalinks – Video
Here is a video that will help you understand WordPress permalinks further.