The Ultimate Guide to WordPress Permalinks

As you will probably know or have read around, WordPress is one of the best Content Management Systems you can use when it comes to SEO.

It is very well optimised out of the box, plus you can also find some excellent plugins like WordPress SEO by Yoast that help you fine tune the SEO aspect further. One important consideration when building and setting up a new WordPress site is definitely your URL structure, better known in WordPress as the permalink structure.

It is a fact that URLs are very important for SEO, so you should dedicate some time to deciding what would be the best structure for your site or blog.

Default is Rarely, if Ever, Good

The default permalinks are horrible in terms of SEO, as they make no semantic sense. Here are some examples of default permalinks:

Post Permalink: example.com/?p=123

Page Permalink: example.com/?page_id=123

Category Permalink: example.com/?cat=123

Tag Permalink: example.com/?tag=tag-name

Archive Permalink: example.com/?m=201212 or example.com/?m=2012

Those numbers don’t mean anything to humans, neither do they mean anything to Google and other search engines.

They do mean a lot to WordPress and its database as they are the parameters used by WordPress to find the data within its database, but we’re here to optimise for SEO, so we need something better.

Here are some other in-built permalink options you can use:

Date-based permalink structures are not recommended as they will most likely decrease click through rates on older articles (people generally prefer reading fresh content over old posts).

The numeric permalink structure on the other hand is just a bit better than the default structure but still doesn’t offer any usability or SEO benefit.

The Ideal Permalink Structure

The permalink structures I prefer to use on most of my WordPress sites are the following two:

/%category%/%postname%/

or

/%postname%/

The /%postname%/ structure is now one of the in-built structures that come with WordPress so you can just select it from the Permalinks settings page (just click the radio button for the option ‘Post name’).

These two permalink structures are the most accurate descriptions of your content, and are perfect for search engines and human visitors alike. The question is whether to use one or the other.

However this issue has been fixed in WordPress 3.3 and you can now use this permalink structure with no worries. So, once we can use either one or the other freely, here’s when to use one or the other.

Let’s start from the /%category%/%postname%/ structure. In this case your permalinks will look like this:

Post Permalink: example.com/cat-name/post-name

Page Permalink: example.com/page-name

Category Permalink: example.com/cat-name

Tag Permalink: example.com/tag-name

Archive Permalink: example.com/2012/12 or example.com/2012

Whether you use the /%category%/ part of the permalink is largely a question of flexibility.

On the pro side you have a more structured URL and both the user and search engines can better quickly identify to what category a post belongs to, but on the other hand it might become messy if for example you put posts in more than one category.

So if you always stick and will stick to one category per post, you could use the /%category%/%postname%/ permalink structure.

I myself find I need to put posts in more than one category so I use the /%postname%/ permalink structure most frequently.

It’s your call as to which is more ideal for you, but both are ideal permalink structures.

Removing Category and Tag Bases

If you visit your category and tag archive pages, you will notice that the URL includes /category/ as its base.

For example: http://www.wpmayor.com/category/themes/

We don’t really need that “category” or “tag” in the URL, so you can easily remove it using the WP No Category Base plugin, or even by setting the “Strip the category base from the category URL” option in WordPress SEO if you are already using that plugin.

Changing Permalink Structures

If you’ve already got an established site, and would like to change the permalink structure, you should first ask yourself if it is really necessary.

Unless you have a very good reason to change I would suggest to stay with the permalinks you have in place, so as not to risk running into any SEO issues.

A valid reason would be that you started off with the default WordPress permalinks and now realised that they are not SEO or user friendly at all.

For example, having a URL structure like www.domain.com/?page_id=123 for your ‘WordPress Services’ page is not ideal at all. It would be much better if it looked something like www.domain.com/wordpress-services. This looks better and also contains your keywords in the URL, so better for SEO as well.

So how do we change our permalink structures without a negative SEO impact?

The key is to use 301 redirection to redirect the previous URL structures to the new ones. The code “301” is interpreted as “moved permanently”. 301 redirection is the most efficient and Search Engine Friendly method for webpage redirection. It’s not that hard to implement and it should preserve your search engine rankings for that particular page (it transfers over almost all of your link-juice to your new URL).

In short, it’s the best option when changing permalink structures.

Failing to use 301 redirection will result in 404 Page not found errors when someone visits one of your site’s pages by following an old link. Since all your backlinks would be using the old permalink structure, not having 301 redirection in place also means that you will use all that link juice, therefore you will have a major negative hit in search engines.

So what we will need to do for an effective permalink structure change is this:

Have a redirection system in place

Change the permalink structure

Once you follow the two steps you shouldn’t have any problems with broken links or SEO at all.

As a redirection system you can use Joost de Valk’s redirection tool, it is quite straightforward to set up. If you prefer a more automated plugin solution, I can recommend the following two free plugins:

Subscribe to our newsletters!

44Comments

rolanstein

Hi Jean, and thanks for the clear article.

Just wondering, do you have a recommendation for a customised permalink structure for tags (ie: I’m looking to add a customised structure to the currently blank tag base setting). My general permalinks structure is /%post_id%/%postname%/ (yes, I will change to postname only, but am hesitating because last time I changed the structure I lost my wite ratings on Google and they have never fully recovered). I am now prompted to give a customised structure to the tag base because Google Search Console has just alerted me to the fact that there has been an increase in “404” pages. Sure enough, when I checked Smartphone errors, as suggested, I found 125 URLs listed as 404 errors. I assume this has happened because I deleted a whole lot of tags a while ago. So, thought it was best at this point to put a customised permalink structure in the blank ‘Tag base’.

Mahbub Osmane Piyal

Brittany Lapin

I’ve been in the process of switching from wordpress.com to .org for about a week. Everything has gone pretty smoothly and all of my posts’ permalinks were correct & transferred over no problem. Last night I was working on one particular page for a bit and this morning I realized that all of my posts’ permalinks have now been switched to that one page!! PLEASE HELP!!! I have no idea how to fix this issue!! THANK YOU!!

Garen Arnold

Hey Jean,

I had a question for you on categories and WordPress. I have my categories no indexed so I don’t get duped with a duplicate content penalty. However, I am redoing my blog section and wanted to change the names to different categories. For example, some categories won’t be there and other post will be assigned to different categories. Since, they are no indexed you don’t think it will affect SEO any do you? I think it will increase the usability of the blog section, which will decrease my bounce rate. What are your thoughts on this?

Igor Kolosov

Hi Ashan

You can leave it at sitename.com/sample-post. This is SEO friendly enough. This is the same as it was /%postname%/ when Jean wrote this article
Still, if you have any categories above posts in the hierarchy, it is good to do it as Jean said: /%category%/%postname%/

kristie hill

Santiago

The perfomance diference between /year/month/day/sample-post/ and only /%postname%/ ??? If i use the /%postname%/ permalink, i will use more resources from my server? It will be issues with too many posts, let’s say 10.000 posts???

David

Hey, there! Building a WP site for a client, had a category (like “…com/examplename/”), but wanted to rename a page to that slug, so we deleted the category and tried to change the permalink to “…com/examplename/”. That doesn’t work. WP automatically changes it to”…com/examplename-2/”. Can you please help?

saaied

Paul

Santiago

After read all your post, i don’t know if you still could recommend a permalink change to /%postname%/ even if is in a news and timeless content site planned for too many posts for the future (with a 5 or more posts per day planned). I’m worried about the perfomance of the site with this change in the future for that quantity of pages. If i should make a change i wanna make it now.

aaditya bhatta

Changing your post url will create 404 error because earlier link is replaced by a new one without category or id of the post. For this what you can do is use a plugin “Simple 301 Redirects” by Scott Nellé. Redirect links that are showing 404 error to new link created.

Michael

Hi Jean,

I really love the quality and depth of the posts at managewp.

I had a quick question — You mentioned that you follow the /%postname%/ permalink structure. But, your post name and your permalink are not the same. Is it possible to change the title of the post after the URL is fixed? Can you please help me understand?

Jean Galea

WordPress will select one of the categories, but in that case it’s definitely not ideal to use that permalink structure. If you’re using the category in the permalink then you should make it a rule to only assign posts to one category and not more.

Jean Galea

Gregory Fu

UncatCrea

Thank you for this article.

I am happy to see that the article is part of the one correctly assessing the multi-categories topic.

2 things came to my mind when I read it :
– May you should point the fact that the hierarchy of pages will be visible in the page permalinks (?)
– Regarding SEO, having the ID in the permalink (eg. %id%/%posname%) is a very good idea as it will allow WordPress to create 301 redirections in case a permalink is changed (and in fact, from my experience, it is good for performance too)

Jean Galea

Thanks for your comments Benjamin, performance wise having the id in the permalink should be the same as having no id, and as far as I know WordPress will still create redirections even without the id.