Permalinks are the permanent URLs to your individual weblog posts, as well as categories and other lists of weblog postings. A permalink is what another weblogger will use to refer to your article (or section), or how you might send a link to your story in an e-mail message. Especially when they are used to link to individual postings, once a story is posted, the URL to it should be permanent, and never change. Hence.. permalink.
Structure Tags
You can use the structure tags to customize your permalinks.
%postname%
A sanitized version of the title of the post. So “This Is A Great Post!” becomes “this-is-a-great-post” in the URL.
%post_id%
The unique ID # of the post, for example 423
My earlier permalink structure was /%postname%-%post_id%/ which means that it includes both the post’s id and the title. According to this structure, this post would have the URL of iamkarthik.com/setting-the-bes t-permalink-scheme-15/ (15 is the id of this post). Can you imagine the confusion it would cause if I were to make a list post? If I were to post an article on the “21 Best Wordpress Themes” and the post id were to be 25, the URL of the post would look like iamkarthik.com/21-best-wordpre ss-themes-25/. Now I don’t know about you, but it looks very silly to me. Then why did I include the post id in the URL? The logic behind it was that in case I would ever need to change the permalinks, I could redirect the posts based on the id. I was also taking a precaution against duplicate post titles - its easy to make two posts with the same title (post titles such as “Weekend Reading” are most likely to be created every week) and I didn’t want to set my blog on fire by having the same URL pointing to two different posts.
But Wordpress is smarter than I thought.
Now I’m one of those guys who likes to see some proof before they believe what they are told. To do that, I setup a test blog and set the permalink scheme to /%postname%/ (Go to your Administration Panel–>Options–>Permalinks). Next, I posted an article which we shall call “test post”. If you’ve been paying attention, you would know that it would have had a URL of /test-post/, after which I renamed the post to point to /new-test-post/. To complete the test, I typed in /test-post/ in my browser’s address bar and I found Wordpress giving me a sly grin and showing me /new-test-post/!
Ok, so it won on this count. I still had to know what would happen if I posted two articles with the same title. To test this, I made another post with the title “new test post” which would generate the same URL of that of my previous post. But it was strike two for me when I found out the URL of the new post - it was /new-test-post-2/. Notice the number “2″? WP added that to show that there was a post with the same title already. Neat. So no two posts will have the same URL.
I guess I stretched it a bit too far when I created a page with the same title, “new test post”. I salvaged some of my ego there, because WP seemed to display the page that I created for the URL /new-test-post/ rather than the post with the same title.
Three facts present themselves at this point:
- Wordpress is smart.
- Its smarter.
- It gives more importance to pages than posts (which is why it displayed the page rather than the post).
Well, once it became clear that the id of the post was not required, I set out to find the best permalink scheme for search engine optimization. Search engines give a lot of importance to the keywords in the URL and so its obvious that the post title must be part of it. I decided against adding the category of each post so as not to reduce the keyword density in the URL. It also helps to keep the URL short.
Over 90% of the blogs that I’ve visited/read seem to use a permalink structure of /%postname%/. This is bad for SEO for two reasons, one is that it causes a duplicate content penalty if anyone linked to your blog as /%postname% without the trailing slash. Quoting the above example, iamkarthik.com/new-test-post/ and iamkarthik.com/new-test-post would lead to the same content under different URLs. This is strictly against Google’s Webmaster Guidelines. The second reason that this is bad SEO is that, as far as search engines are concerned, the post is on the second level from the domain and hence will be given less importance. Each level can be assumed as a folder, for example, if I have a page called abc.html at iamkarthik.com/subfolder/abc.h tml and xyz.html at iamkarthik.com/xyz.html; abc.html is on the second level, while xyz.html is on the first level thus giving more importance (PageRank) to xyz.html.
So how do we avoid this? We can choose a permalink option of /%postname% or /%postname%.html (or /%postname%.php). I decided to go with /%postname%.html for the simple reason that web-surfers are more accustomed to seeing the extensions of html or php and a page without an extension might confuse them and some may even add an extension of their liking (others may add the trailing slash which would end up in a duplicate content penalty again!). To avoid that, I’m now sticking to /%postname%.html. From the example, the post title would now look like iamkarthik.com/new-test-post.h tml
I’m also using this excellent plugin to redirect my old links to the new ones so that I don’t lose any of the links pointing to my old posts. Wordpress 2.3 does it automatically.
If you found this article useful or have a different opinion, do let me know in the comments.



19 comments ↓
I think using permalinks is good. I have wordpress and changed after reading an article similar to yours. Some SEO experts recommend that using more descriptive permalinks will give search engines a better way for looking up your site. Anyways, I am glad I converted my blog over. Good useful post!

Yes, using “pretty” permalinks is one of the simplest SEO change you can do to your blog. Its a pity though that many blogs still use the conventional form and complain about lack of search engine visibility!
I’m glad you’ve converted - I’m sure your results would have improved!
And as always, thanks for visiting!
My pleasure. I like being able to relate to other bloggers going through the same things I am or was going through. It helps build a community bond I think.
[...] Karthik - Read Karthik’s recent post Setting the Best Permalink Structure. [...]
First time visitor here.
I’ve found you via MyBlogLog, although I guess we’ve been posting comments on the same blogs, for I recall having read your name on other places.
Very good article. I was still undecided about the right permalink structure for my blogs, but your post gave me a great idea: adding that .html extension after the structure tag. I didn’t even know it was possible. Thank you for sharing these tips.
MyBlogLog does send me visitor off and on
And yes, I believe I’ve noticed your name too!
I noticed you have the /year/month/day/postname/ type URL - does wordpress.com let you install plugins? If you are to change to the postname.html format like I have,you’ll need the plugin that I’ve mentioned at the bottom of the post, or something similar so that you don’t break your older URLs!
Thanks for reading and hope you’ve subscribed to my feed?
Karthik,
I also use the year/post/month/day/postname structure
Not sure what I need to do now? I don’t want to use the html extension at this stage and I admit all these permalinks talks exhaust me. It’s like following a particular fashion and number 1 says go there and number 2 says no, no go there instead.
It’s rather confusing to be honest and I see that you can back up your post with some proof of data due to your trialling it all out on another blog.
I guess if your PR suddenly climbs up like mad, then I’ll have to follow suit won’t I?
Great post by the way, it just confused my already confused state about which way to go even more. (Not your fault BTW)
Monika
Lol, I hear you Monika, its easy to get lost in the sea of technicalities.
And I do subscribe to the content is King philosophy. What I also add is, you are sure to be rewarded for writing good content, there is no doubt about that - the question though, is if you want to be rewarded sooner or later! But like I said, the URL of the post is not the only factor, there are certainly more important factors such as the title of the post and the quality of the content in general. But if making a simple change helps you in being rewarded earlier by 5%, personally, I would do it. Especially when there are no known disadvantages in using this method!
Darren of Problogger.net is perhaps one of the biggest proponents of the URL structure that you use. But its common agreement that the year/month/date/postname is at a certain disadvantage. In the end, its really your call
@Monika
I’d read this post earlier, but I bumped into it again: http://www.searchenginejournal .com/seo-friendly-url-structur e/4556/#comment-426969
The comment quotes Loren as saying what I mention in the post. That just about sums up what I meant in my previous comment. The other comments may work to confuse you, there is no need to add the post id in the URL AFAIK.
Hope that helps!
[...] There are many discussions about the best way to do this. You can read about it here, here, here, and finally this one has a few tips from the infamous Matt Cutts. I’ll let you decide for [...]
Thank you for the tip. I found your website on a google search phrase “best permalink structure”. /%postname%.html is the way to go.
[...] offers you to be able to set permalink for your favor. There a lot of reference for you to choose the best permalink that suits on you and search engine. Options > [...]
Change the WordPress permalink structure to the best format, and yes it’s a little bit scary
Today this blog is about 2 months old. It is only 2 weeks ago when I began to put more attention on how search engines see my pages. Let me be honest with you that at this moment the search result from this blog on Google looks bad.
Speaking about sea…
Absolutely true! I strongly advocate for using a properly extended URL like ../thispost.html. I can’t understand why WP used the trailing slash layout in the first place. When you are referencing a single page, without much subcontent, there isn’t a true use for using a pseudo-directory…
[...] off the ground. Other things I didn’t really touch on are actually setting up your blog,nailing your permalink structure, and installing WordPress which is my preferred tool of choice. This is just a basic rundown of [...]
One of my reader said to me that trackbacks to my posts are no longer working after I changed to this permalink structure (/%postname%.html)
Does yours work? (trackbacks, not pingbacks)
Michael, I’m not sure about trackbacks as I don’t use it myself as its not good for SEO AFAIK. Displaying trackback URLs lead to duplicate content, so its best to avoid them if you can since they show the same content as your post URL does as far as a spider is concerned.
Also, the same effect of a trackback is achieved if your reader references your post/blog in his post. Technically, this would be called a pingback - but its quite the same.
Ahh.. I see.. I asked this because one of my readers is not using a WordPress system to blog and somehow pingback doesn’t work (I think pingback only works for WordPress to WordPress, yeah?)
I can’t remember what platform he’s in (Not WordPress and not Blogger)
Excellent ! Thanks for all the detail in this post.
I don’t want dates in my urls.
And thanks for testing what happens with two posts of the same name - and that WP takes care of this just fine.
I will try using /%postname%.html.
Leave a Comment