Webtricks Online | How to Create Custom Permalinks in WordPress

Do you want to create custom permalinks in WordPress for posts, pages, and other post types?

Recently one of our readers asked if it was possible to create their own custom permalinks aka page URL structure in WordPress.

In this article, we will show you how to create custom permalinks in WordPress without affecting your SEO.

Creating custom permalinks in WordPress

Since this is a comprehensive tutorial on creating custom permalinks in WordPress, we have created an easy to navigate table of content:

Permalinks are the permanent URLs of your individual blog posts, pages, and other archive pages on your WordPress site. Custom permalink is basically a URL structure applied to a specific page in WordPress without affecting the rest of your URL structure.

WordPress comes with an SEO Friendly URL structure which allows you to use an easy to understand URL structure for both humans and search engines.

For example: https://ift.tt/359PKv8

This is much better than URLs from the old days: https://ift.tt/2KCTldh

WordPress provides website owners with multiple options to choose from. You can view them by visiting Settings » Permalinks page.

Select permalink structure

Aside from changing the main permalink structure, WordPress also offers ways to customize the individual URLs of posts, pages, categories, tags, and other areas of your website.

You can also use WordPress plugins to create completely custom permalinks for specific sections of your website that overrides the default WordPress settings.

Let’s take a look at all the options one by one. We’ll start with the default built-in options that come with your WordPress website.

If you want to change the whole URL generation scheme for your website, then go to Settings » Permalinks page.

Select permalink structure

Simply select a URL structure for your individual posts. You can also use the tags shown on the screen to create a custom structure for your WordPress URLs.

Don’t forget to click on the Save Changes button to store your changes.

We recommend using a URL structure that includes the post name in the URL. This makes your URLs more SEO friendly and meaningful.

Note: You should change to a SEO friendly permalinks for all new WordPress blogs and websites. However, if you have an existing website that’s already getting traffic from search engines, then changing permalinks can affect your SEO rankings.

How to Change the Category and Tag URL Prefix in WordPress

By default, WordPress uses /category/ as the base for your category URLs and /tag/ for the tags pages. For example:

https://ift.tt/2rSvxeP
https://ift.tt/2XtQEzS

Category and tag base

You can change these base prefixes from the Settings » Permalinks page to anything that you like. For example,

https://ift.tt/2KF8RWa (for category pages)
https://ift.tt/37k09WX (for tag pages)

Once you have the permalink structure setup, WordPress uses that as a template for all links on your site. However, you do have the option to modify the URL slug aka keywords inside the URL structure for individual posts, pages, and custom post types.

You can customize the slug part of the URL from the post edit screen inside the WordPress content editor.

Simply edit the post, page, or custom post type and click on the title field. You’ll notice the Permalink field appears on top of it.

Edit post slug to create custom URL

Go ahead and click on the Edit button next to it, and then change the URL slug to a custom permalink. Once you are done, click on the Save button to store the new permalink.

Customize post permalink

You can use this method for all post types including WooCommerce products, MemberPress courses, etc.

In the earlier step, we showed you how to modify the category and tag base prefix in WordPress. In this step, we will show you how to change the URL keywords for an individual category or tag.

Simply go to Posts » Categories page and click on the Edit link below the category you want to customize.

Editing a category details in WordPress

WordPress will now load the category details. From here, you can change the category slug to customize its permalink.

Change category slug to customize permalink

Similarly, you can edit an individual tag by visiting Posts » Tags page.

Edit a tag

You can also edit any custom taxonomies using the same method.

WordPress automatically adds the ‘/author/’ base to URLs leading to author archive pages. For example:

https://ift.tt/340oCyA

The problem is that WordPress does not come with an option to change the author URL base or the slug.

Luckily, as the saying goes, there is a plugin that can help.

Simply install and activate the Edit Author Slug. For details, see our step by step guide on how to install a WordPress plugin.

Upon activation, go to Users » All Users page. Next, click on the ‘Edit’ link below a username.

Editing a user details in WordPress

On the next page, scroll down to the Edit Author Slug section, and you will be able to choose an author slug or add your own. Don’t forget to click on the save changes button to store your settings.

If you want to change the author permalink base, then simply head over to the Settings » Edit Author Slug page. Here you will see an option to change the author base and even choose different author bases for users with different user roles.

Change author base

For more details, see our guide on how to change author URL slug and base in WordPress.

All the above methods allows you to customize WordPress permalinks to a certain extent. However, they cannot help you create completely custom permalinks.

That’s because WordPress by default doesn’t offer this functionality.

Luckily, there’s a plugin that can help. If you want to override the default WordPress URL structure for specific sections on your site, then follow the steps here.

The first thing you need to do is install and activate the Custom Permalinks plugin. For more details, see our step by step guide on how to install a WordPress plugin.

Upon activation, you need to edit the post where you want to create a custom permalink. Instead of editing the permalink field at the top, you’ll find the option to create a custom permalink below the editor.

Creating a completely custom permalink for a post

Similarly, you can also create custom permalinks for categories. Go to Posts » Categories page and click on the edit link below the category that you want to change.

Editing a category details in WordPress

On the category details page, you’ll find the option to create a custom permalink for that particular category. You can even create a URL without the category base prefix.

Editing the category permalink

You can manage and disable all your custom permalinks by clicking on the ‘Custom Permalinks’ menu in the admin sidebar.

Manage your custom permalinks

Simply select the custom permalinks you want to delete and then click on the Bulk Actions menu to select ‘Delete permalinks’ option.

After that click on the ‘Apply’ button and the plugin will remove those custom permalinks. The deleted permalink will be replaced by your default WordPress permalink scheme.

WordPress automatically handles changes made to post and page URLs. However, it may not set up redirects for your custom author permalinks or completely customized permalinks.

In that case, you’ll need to set up proper redirects to avoid 404 errors on your website.

First, you need to install and activate the Redirection plugin.

Upon activation, you need to visit Tools » Redirection page to set up redirects. You need to add the old link in the ‘Source URL’ field and the new URL in the ‘Target URL’ field.

Setup redirects

After that click on the ‘Add redirect’ button to save your changes. For more details, see our beginner’s guide to setting up redirects in WordPress.

We hope this article helped you learn how to create custom permalinks in WordPress. You may also want to see our ultimate WordPress SEO guide to get more search traffic to your website.

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.

The post How to Create Custom Permalinks in WordPress appeared first on WPBeginner.



from WPBeginner https://ift.tt/2ptVD74
via Webtricks Online

Share this

0 Comment to "Webtricks Online | How to Create Custom Permalinks in WordPress"