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.
In previous versions of WordPress it was recommended not to use the /%postname%/ permalink structure due to the possibility of performance issues relating to the way in which WordPress fetched posts.
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:
Both plugins are created by Automattic developer John Godley, and they can effectively help you set up the 301 directs with minimal hassle.
So there you have it, you should now have a very good idea about what permalink structure you should use and how to set everything up. If you have any questions, just drop a comment below.
Creative Commons image courtesy of Yandle.
The Thus
Hello,
I have setup and configured as you shown in article but still my articles are ranking in Google like domain.com/category may I know how to selve this issue ??
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’.
Cheers
rolanstein
arun
Hi thanks for the lovely post , i am going to change my permalink structure and redirect them to the new one 🙂
Aabha
Good advice on using permalink.
I believe that %postname% is the best permalink structure. I use %postname% in the url structure.
Mahbub Osmane Piyal
it helped me, thanks a lot
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!!
Pallavi
Pls help in the permalink structure for page numbers. my http://www.profitdeal.org home page has more than 643 pages but it is not navigating the page numbers when we click ……pls help
Manish
Go to Setting -> Permalink -> Save Changes
Jobazine
sir, I have already established my website wth monthly 1 lakh visitors with category/postname permalink, should i change it for high traffic?
please help me
Camilo
Hello, thanks for the info. My site does not uses posts, it only uses pages, and I want to have a structure like Post Permalink: example.com/cat-name/page-name
I had to add the plugin “categories for pages”, I can use categories now, but my permalinks remain like Post Permalink: example.com/post-name.
How to add my category in my permalinks for pages?
Binh WPOS
I believe the Advanced Permalink doesn’t work anymore.
jaime
hi!
I am trying to change my permalinks but to a larger extent. not sure if it can be done.
I have a site calle i.e:
freedomain.co.rg
hence my permalinks look
freedomain.co.rg/post-date-month/
but i want to get something in the lines of
mynewdomain.com/post-date-month?
is this possible?
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?
Garen
Free Ads
Great info, thanks for the post.
Gaush Alam
Great Post ! What do you think about using the /%postname%/%post-id%/ permalink.
Igor Kolosov
That is also fine, but why would you want to show your post id in the URL?
Artin
Hi and thanks
I use %post_id%-%postname%.html in my websites
Muhammad Ahsan
Nice Trick Man
Ahsan khan
Hi,
I am new in WP and want to know about permalinks in deep,
so i want to discuss about my site permalinks in google snippet preview(GSP),
currntly permalinks showing in GSP like it
sitename.com>catogary>subcatoigry
but it should be like it
sitename.com/postname
currently my permalink setting is
post: sitename/sample-post/
this is my blog sietv dot com
Best Regards
-Ahsan Ajmal Khan
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%/
Glamorous Bite
Hi Jean,
Is there a way to omit the subcategories from the url and keep just the category and post name?
Thank you.
kristie hill
Is it possible to change the structure of future permalinks, but not past posts?
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???
Ajayallvetmed
This was a wonderful post. Thanks for sharing.
Phil Amery
Hi,
a valuable and informative article indeed
still it seems like I can hardly solve my issue
here is in brief:
this is the structure I want to achieve:
Blog category pages:
domain.com/blog/catagoryname1/
domain.com/blog/catagoryname2/
Blog post pages:
domain.com/blog/postwhatever1
domain.com/blog/postwhatever2
I simply tried several combinations under Permalink settings but simply couldn’t achieve a fully functional version.
Here is my last setting which ended up in working pretty well but got 404 pages for the correct blog post URL:
Custom structure: /blog/%postname%
Category base: blog
So the idea is to make my blog categories accessible under the /blog/ folder and all posts under the /blog/ root
I want to follow a logical hierarchy but now I simply got stuck.
Would appreciate any valuable suggestion or tip.
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? 🙁
ayyan
Can we use tag id in permalinks? if use, please give any example.
indranil
how can i make the permalink as mywebsite/username
saaied
i’m think this premalink is best … and use in my website
/%category%/%postname%/
Paul
i use
/%category%/%postname%
i remove the final ‘/’ after “postname%”
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.
Thanks in advance for your valuable time!
Paul
I’ve always heard that the best permalink structure is the one that will give you the smallest URL, which is why I always choose just the post title in the URLs.
Watch Teller
Hi Jean Galea and anyone,
I had problem to setup /%postname%/ permalink structure, my theme (with theme sample data and image)only allow default permalink if not all my page and post shown “404 page not found” except “Home” page. What cause this happen??? Is it cause by theme’s sample data and image???
I would like to setup /%postname%/ permalink structure, HELP???
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?
Thanks,
redLodyas
Just started using ManageWP, and ended up here from the admin panel, starting to like this ManageWP.
Gregory Fu
I considered using “/%category%/%postname%/” once, but had a concern: When a post is assigned to more than one category, which one will be used and are there any side effects?
Can anyone shed any light on this?
Thanks, and thanks for the post!
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.
UncatCrea
As said in the article, don’t use it if you intend to affect more than one category to your posts. (From my experience, WordPress simply picks up the first one.)
Jean Galea
Agreed, thanks for your comment.
Gregory Fu
Thanks guys
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)
Finally, it would be nice to have a second part on CPT.
Again thanks.
– Benjamin
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.
A second part on CPT is a good idea indeed, thanks.
Alyona (@alyonatravels)
Very interesting post! I found it useful! Thank you
Jean Galea
Welcome Alyona!