Use the same permalink base for different post types/taxonomies

In general, using the same permalink format for multiple content types in WordPress is not possible. This might be a major issue, particularly if you want to apply the silo schema to your permalink structure. You can easily solve this issue using Permalink Manager, regardless of how you want your permalinks to be structured.

Some of the functionalities presented in this article are not available in free version (Permalink Manager Lite).

Buy Permalink Manager Pro

The WordPress permalink system is sufficient for many users, but it can become problematic when you want to optimize the URL structure of your website. Unfortunately, WP does not allow for the duplication of permalink formats for multiple content types, which can be a hindrance for those looking to organize their website in a specific way.

In this article, we will explore the reasons behind this limitation and discuss how you can use the Permalink Manager plugin to overcome it. By understanding the importance of permalink formats and learning how to customize them with this plugin, you can create a more cohesive and user-friendly website structure, as well as improve the way search engines understand and index your content.

What are rewrite bases and rewrite rules?

The concept of permalink bases and rewrite rules can be confusing at first glance. However, it is important to understand how these elements work in order to optimize the organization and structure of your website. In WordPress, rewrite bases are predefined slugs that are used to identify the type of content being requested based on the URL address. This helps to reduce the number of database requests, improving the performance of your website.

Rewrite base
It is crucial for these permalink bases to be unique for each content type, as WordPress uses them to detect the requested URL and properly load the corresponding post or term.

When a visitor attempts to access a page on your website, WordPress compares the requested URL to an array of rewrite rules. These rewrite rules are essentially a set of permalink format patterns that allow WordPress to identify the content being requested. If the requested permalink matches one of these patterns, WordPress will convert the URI into a database query, load the appropriate template file, and deliver the requested page to the visitor.

If the permalink rewrite bases are not unique for each custom post type and taxonomy, WordPress may be unable to accurately detect the URL and may return a "not found" error. One issue that emerges here is that certain rewrite rules (permalink formats) take precedence over others. Furthermore, when WordPress reads the URL, it does not care whether the post, page, or term exists; it simply has to match the permalink format with possibly the greatest priority.

The rewrite base, which is the first fragment of the URL after the domain name, plays a crucial role in this process. Take a look at the example below. If you use the same rewrite slug for both products and product categories permalinks, WordPress will treat any URLs starting with "/shop/" as product category permalinks. As a result, whenever a visitor accesses any product page, WordPress will attempt to load a product-category page that does not exist.

"Product category" permalinks (WordPress detects them correctly)

"Product" permalinks (WordPress sees them as product categories and returns 404)

If you are using WordPress and want to use the same URL structure for multiple content types, such as products and product categories, you may be disappointed to learn that WordPress does not allow for the duplication of permalink formats by default. However, this does not mean that you are out of luck if you want to create a more cohesive and intuitive website structure.

One option is to use a plugin such as Permalink Manager. This plugin allows you to customize the permalink structure for each post type and taxonomy on your website, giving you more control over the way your URLs are organized. With Permalink Manager, you can easily create a consistent base for all of your content, regardless of the post type or taxonomy it belongs to.

To cut a long tale short, the plugin allows you to set the same rewrite base/slug for different content types since it does not use rewrite rules (regular expressions) to detect the content. To be specific, it identifies posts and terms based on their complete custom permalinks rather than their slugs. The plugin can easily detect them as long as you keep the permalinks unique as a whole.


Below is a basic case study, but you may take it as an example and mimic it in any more sophisticated permalink structure. We have one custom content type and two taxonomies (one hierarchical and one non-hierarchical) available, as shown below. For each content type, the rewrite slug ("car", "manufacturer", "transmission") parameter is unique.

Our objective is to apply the same base ("cars") for the permalink of all three content types:

Permastrucutres settings

As previously said, you can use Permalink Manager to make multiple post types and taxonomies use the same permalink structure based on your needs. Following the steps outlined below should make it simple to make advantage of this feature.

There are a multitude of different ways to change the permalink formats, but this article just covers one usage of the Permastructures editor. If you're not sure how to use it, please check out this article.

Before we get started, keep in mind that this is a very basic example that will just give you an idea of how this functionality may be used. The first step is to change the permastructure settings. To do so, go to the admin section "Tools -> Permalink Manager -> Permastructures". You may simply modify the permastructures of all custom post types and taxonomies as shown below.

cars/%car% cars/%manufacturer%/car%

Old permalink formats in Permastructure settings
As you can see, the permalink base for each of the content types is different by default.

Above, you can see Permastructures' settings page. To apply the same permalink structure, simply edit each of the fields displayed analogously to the configuration shown below.

New permalink formats
In this case, the newly created custom permalinks will begin with the "cars" base after the updated settings are saved.

Please remember to save your changes after adjusting the settings by clicking the "Save Permastructures" button at the bottom.

Apply the new settings to existing URLs

After you configure the permalink formats with new bases, Permalink Manager will use them in all new post and term permalinks. You will need to regenerate their permalinks if you want to update them in old elements as well.

Regenerate/reset tool
The existing custom permalinks will not be automatically updated if you change the permastructures. You will need to use the "Regenerate/reset" tool to apply the new URL format to them.
Go up