1. Home
  2. Knowledge Base
  3. SEO Suite
  4. WordPress Permalink Structure & Changing Individual URLs

WordPress Permalink Structure & Changing Individual URLs

WordPress Permalink Structure & Changing Individual URLs -  Rank Math SEO

A permalink is simply the hyperlink used to direct people to a specific webpage. It’s considered permanent because it generally shouldn’t change as this can break existing links to the corresponding page (however, in practice, changing permalinks can have huge SEO benefits).

For example, our homepage is located at https://rankmath.com/, our blog is at https://rankmath.com/blog/, and a single post follows the ideal permalink structure: https://rankmath.com/blog/schema-markup/

Not only this, but Permalinks are also used for archive pages, static pages, and any content on your site that needs its own URL.

Permalinks comprise your site’s domain name as well as a slug, and it’s extremely important to make sure that your permalinks are SEO as well as user-friendly.

Permalinks play an important role, and it has an impact on SEO, user experience as well as branding.

2.1 Search Engine Optimization

The most beneficial use of permalinks is SEO. Permalinks help to boost the page rankings on the search engine results pages (SERPs) as it informs the search engines what posts and pages are all about.

It also helps the search engines to index the posts/pages better for the relevant keywords. For example, if your post contains information about desserts and chocolates, your post will be something like this: https://www.test.com/desserts-chocolates.

2.2 Good Site Architecture

Having your website organized is important as it provides high-quality UX for website visitors. Permalinks help to organize your website’s structure and lead to better user engagement.

With the help of Permalinks, users can easily understand how the content is organized on the website, making it simpler for them to sink in the information on the subjects they’re reading about.

WordPress comes with a default permalink structure that includes ?=123, which includes the post ID to identify the post. However, this structure isn’t helpful in terms of SEO, and you should consider changing them. The following steps will walk you through the process of changing the permalink structure.

In order to change the permalinks, go to WordPress Settings > Permalinks

Go to Permalinks

In this, you can choose from the variety of structures that are available:

Permalink Settings

By default, Plain structure is used by WordPress. However, this is not the best option suitable for your SEO. You can select a different setting and then save your changes.

You can also create custom permalinks in WordPress. Let’s have a close look at how you can achieve this.

Custom Permalinks are useful when you want to assign a custom path to individual posts, pages, tags, or categories. Following are the ways to create custom permalinks:

You can change your website’s permalink structure in WordPress. In order to do so, go to Settings > Permalinks. Click on the radio button next to the Custom Structure.

Custom Structure

You can select from the available tags (we’d cover them shortly) and then click on Save Changes. Once it is saved, all posts on your WordPress website will follow this new structure.

4.2 Change the URL Slug for an Individual Post/Page

You can also change the slug for an individual post/page in WordPress. To do so, edit a post that you want to change the slug for.

In the Classic Editor, you will find the permalink just below your post. Click on Edit and then change the end of the URL.

Slug for post/page

In Gutenberg, you will find the URL slug in the Article > Permalink section.

Gutenberg -Slug

You can type your desired slug in the URL Slug to either make it shorter or more focused. Once done, click the Publish or Update button to save your changes.

4.3 Edit Snippet Using Rank Math

You can edit Permalink using the Snippet Editor of Rank Math. If you’re using Classic Editor, then you need to scroll down a bit to get to Rank Math’s Meta Box. But if you’re using the Block Editor, Meta Box can be accessed by clicking the Rank Math SEO icon on the top-right corner of the page.

Click Rank Math SEO icon in Gutenberg Editor

It will open the metabox where you have the option to edit the snippet.

For editing the snippet, click Edit Snippet as shown below.

In the Preview Snippet Editor, under the General tab, you can see how your SERP would look when someone searches for the keyword. From here, you can also edit the Permalink. Rank Math also includes a length indicator to give you an idea of the length of the full URL. We recommend keeping it below 75 characters.

Preview Snippet Editor

WordPress includes ten permalink structure tags you can use to create unique permalinks.  Now let us look at the tags available in the permalink settings.

Tags available in the permalink settings

5.1 Year

The %year% tag will add the year of the post in 4 digits, for example, 2022.

5.2 Month Num

The %monthnum% tag will add the month of the year in 2 digits, for example, 02.

5.3 Day

The %day% will add the publication day of the month, for example, 14.

5.4 Hour

The %hour% will add the hour of the day, for example, 12.

5.5 Minute

The %minute% tag will add the minute of the hour in 2 digits, for example, 40.

5.6 Second

The %second% tag will add the second of the minute in 2 digits, for example, 15.

5.7 Post Id

The %post_id% tag will add the unique ID of the post, example 342.

5.8 Post Name

The %post_name% tag will add the post-name slug, example “My Best Post” will be “my-best-post”.

5.9 Category

The %category% tag will add the entire categories slug from the Posts > Categories section.

5.10 Author

The %author% tag will add the author name slug from the Users > Profile section.

6 Rank Math’s Strip Category Base Option 

If you want shorter URLs, you can enable the strip category base option from Rank Math > General Settings > Links section, as shown below. If this option isn’t available for you, make sure you’re using the Advanced mode of Rank Math.

Strip Category Base Option in Rank Math

The Strip Category Base option will discard the category names from the category archive URLs. This will result in cleaner URLs and redirect them without causing any errors.

Rank Math allows you to choose a permalink structure for your WooCommerce products. You can find the permalink settings by navigating to Rank Math > General Settings > WooCommerce, as shown below.

WooCommerce Permalinks Features

Let us look at each setting in detail:

7.1 Remove base

You can remove the unnecessary prefixes, such as shop and product, from your URLs by enabling the Remove base option.

Remove base option

7.2 Remove category base

By default, WooCommerce adds /product-category/ before the actual category appears in your permalink, which is not suitable in most cases. By enabling the remove category base option, the /product-category/ will be removed from the permalink.

So if your permalink is yoursitename.com/product-category/category-name, after enabling the remove category base option, the permalink will look like: yoursitename.com/category-name which is easier to read.

Remove Category Base Option

7.3 Remove parent slugs

The parent category slug will be removed from your product page permalinks when the Remove parent slugs option is enabled. 

Remove parent slugs option

8 WordPress URL Redirection

As we’ve seen that Permalinks aren’t meant to be changed, but it’s also not possible to have the same web page URL. But you need not worry as URL redirections come to your rescue in this scenario.

WordPress has the feature to create auto-post redirects whenever you change the slugs of posts. But this is only applicable to posts. You cannot create redirects for pages, taxonomies, or CPTs.

9 Auto Post Redirect By Rank Math

URL Redirection makes sure that any number of attempts to locate an old URL is redirected to the new address. Rank Math makes it very easy for you to set up redirections and automatically drive the users to the new URL. This ensures that there is no loss of website traffic due to a broken link.

By using Rank Math, you can even create redirects for all posts, pages, taxonomies, and CPTs when compared to WordPress URL Redirection.

auto post redirect

If you still have any questions about Permalinks – you’re always more than welcome to contact our dedicated support team. They’re available 24/7, 365 days a year.

Was this article helpful?

Still not using Rank Math?

Setup takes less than 5 minutes including the import from your old SEO Plugin!

Learn more about the PRO Version

Still need help?

?

Submit Your Question

Please give us the details, our support team will get back to you.

Open Ticket

Related Articles