Permalinks are a feature of most blogging applications – they are are the permanent URLs to your individual weblog posts, categories and other lists of weblog postings. For instance, the Permalink for the listing of all the posts I have written in the Search Engine Optimisation category is:
In WordPress, you can control how your Permalinks look and this can have a significant effect on your site’s search engine optimisation. For example, if you don’t change the default Permalink setup on your WordPress blog, the link to your posts will look something like:
where 49 is the post number.
However, if you go to Options -> Permalinks in WordPress and change your Permalink structure to something like /%year%/%postname%/ or even just /%postname%/ the title of your post will become part of the url for your post. If you use keywords and keyphrases which you want your site to be found by in the post title, then you will increase your chances of being found by people who search for that keyphrase. For example the url this post is:
Of course, if you combine that with the advice on category name selection I mentioned yesterday, you get a double whammy!
One word of caution – if you just use /%postname%/ as your Permalink structure, this may cause you problems – according to the Codex page on Permalinks:
the rewrite rules may make it impossible to access pages such as your stylesheet (which has a similar format) or the wp-admin folder
In my own case, my Permalinks are set to /%postname%/ and consequently I can’t access my Awstats folder. I have set my Permalinks to /%postname%/ because that structure gives the maximum SEO benefit – the further down the URL your keyphrases are, the lower they will appear in Search Engine results.
The way around the Awstats issue for me is to change the Permalink structure to /%year%/%postname%/ briefly, access the Awstats folder and change the Permalink structure back. This method is unsatisfactory because anyone following a link to a Permalinked article on the site will get a 404 while the structure is altered, but it is the best I have come up with so far.
59 thoughts on “Boost Search Engine Optimisation (SEO) using Permalinks”
Is there no static publishing option for WordPress? ie. Instead of using rewrite rules the Permalink is an actual static file. Would put less load (less dynamic content) on the server, and avoid the problem with AWstats that you outline.
Not that I am aware of Lee – it is a good question, though. I’ll look further into it and reply again when I know for sure.
True, there is a server side caching plugin (Staticize Reloaded) which comes with WP to cut down on php and mysql usage by automatic generation of static files but these files can’t be accessed directly.
That problem was entirely my own doing – I knew my Permalink structure was incorrect but I went with it to gain search engine rank! The Awstats is the payoff! I could always change the Permalink structure now to get over the Awstats issue but then links to posts on the site would break.
I double-checked and nope, there is no static publishing option for WordPress.
ick. maybe i will end up writing my own software. or perhaps a plugin 🙂
A plugin which could create static pages would be quite a popular one I can imagine – go for it!
WordPress Advanced Cache will do much of this for you. Unlike MT’s static rebuild process, it can rebuild a static page in the same time that WordPress takes to render it dynamically in the first place!
Thanks for all the useful SEO tips Tom.
No problem John,
happy to help – plus documenting the process helps me also so you see it is entirely a selfish action on my part after all!
I’m new with blog.
How to update .htaccess?
I have a msg: “You should update your .htaccess now”
WordPress should do this for you automatically – if it isn’t, then the premissions on your .htaccess file need to be changed to allow WordPress to write to your .htaccess file – chmod your .htaccess file to 766 and that should work.
It’s OK now. Thank you.
If you use something like:
/%year%/%monthnum%/%day%/%postname%/ (The suggested useage in the Dashboard of WordPRess) won’t search engines read the url with all those slashes as the postname being in a 4th level subfolder? My understanding, and this may be outdated, was that at least Google preferred things in the main folders of top level domains.
thanks for stopping by and commenting.
That’s my information as well – hence my own structure is /%postname%/ and my blog is at the top level of my domain.
Hi Tom, great tips. 2 things:
1) My Categories will tend to be more Keyword rich than my post titles. Would you recommend, then, to use this structure: /%category%/%post_id% ? BTW, I’ll be revising my Categories after reading your blog on WordPress Categories
2) I followed your steps (and WordPress’s instructions), but am now getting a “Not Found, Sorry, but the page you requested cannot be found” message. Does it take a while to process through?
thanks for stopping by and commenting.
As to your questions:
1. rather than /%category%/%post_id%/ I would use /%category%/%postname%/ because you will get no seo advantage from your post ID – it is merely a number! Whereas your postname is the title of your post, which will also, no doubt, contain keyphrases.
2. No. The change should be immediate – if you are getting that message, there is an error somewhere. If you want to send me more details or a uri, I may be able to help you further. Also, try the WordPress support site – that is a great fount of knowledge.
I used /%category%/%postname.htm (a mistake?) to edit my permalink structure. Not sure if this will create the possible problems with mod_rewrite (?) as my few beginning blogs are on Hostgator which uses a less than version 2 of Apache
I also have one site on Host4Profit server. My comments do not “show” such as we see here. Is this something I set up wrong. My blogs are new and I posted a comment but it does not show up, only a number1 etc.
Gee before I figure all this out I might not need that learn PHP in 24 hours 😉
Thanks for the optimization tips and I hope it works,
With Sincere Regards,
D Dean Hall
I’m looking into using WordPress or another CMS/Blog system to manage my site, http://www.feedthehabit.com. I’m very SEO savvy and don’t want to jump into anything that will restrict SEO.
This Permalink discussion is great, but ends up being only a part of the SEO fun.
I checked out the source code of the pages and there’s a whole lot of crap in there that doesn’t have to be. Is there a reason why you have a bunch of commented out CSS stuff? What about all the inline CSS stuff? Shouldn’t this all be remotely referenced?
I’m just curious about the flexibility of the WP code. I want to dig into these issues all the way before I dive into WP or another system.
tbh, the only reason that stuff is there is that I haven’t gotten around to deleting it – thanks for reminding me!
WP is extremely flexible – I recommend moving to it. You won’t regret it.
Good day, Tom, and many thanks for your advice – it really works.
Tom, I have a question you might know the answer to. Here it is:
My category URLs look like this –
Is it possible to remove /category part of the URL and make it look
Thank you again,
with best regards
thanks for the feedback – much appreciated.
To answer your question, I am sure it is possible to remove the Category from the url – however, off the top of my head, I’m not sure how you would do it. I’ll mull it for a couple of days and if I come up with something, I’ll post it here.
If you haven’t heard back from me in 3-4 days, prod me to remind me.
Good day, Tom
Have you come up with any ideas yet?
I’ve pondered it over and see one narrow point in this approach.
If you give a name to a category and the same name to the post included into this category, their urls will be the same. This I believe may lead to unpredictable results 🙂
I have just finished redoing a blogspot blog using wordpress and I’m trying to figure out how to optimize the pages. I’d like to configure my permalinks the way that you suggest. Besides the awstats issue, are there any other drawbacks? Does it change the way the posts are archived? I access my stats through my web host, so will the problem you’re referring to affect me?
Karen, there are no other issues that I am aware of. Changing the permalink structure will more than likely change the archive posts address – the only thing I would say on this is that it is very straightforward to change permalinks and also to reverse the change! So, make the change, look at the consequences on your stats and archive posts, and if you don’t like it, change back to your original permalink structure while you re-think your strategy!
I agree. But, I’ve found it somewhat difficult to always get the trackbacks to work. The time it takes to send a trackback and not have it work is a waste. Basically, I follow a rule of thumb. When seeking trackback I don’t bother with a track back unless I see one has already been placed in particular blog, or know that blog accepts trackbacks. So, instead, I post a comment, if available. That still creates a link and often get’s picked up by the search engines. However, be sure to write a comment relevant to the orginal post. Other wise you are just spam, and you’ll anger the blog admin and be banned.
I have just realised I didn’t reply to you – my apologies. I wrote a reply a couple of days ago, I mustn’t have posted it, I thought I had – my bad.
Aynhow, I think you are right – when I thought about it I came to the same conclusion you did – same postname and category name probably = wp confusion!
>>I have just realised I didnâ€™t reply to you – my apologies
Don’t mention it, Tom :))
Existing WordPress structure still seems to work well if we name categories carefully.
Thanks for the reply!
I’m relatively new to blogs and I’m just wondering what will happen to my existing posts (http://abc.com/?p=x structure) regarding the track back functionality (some sides link to me). Will these existing articles also get the new permalink structure or do they remain unchanged after editing the permalink structure?
Thanks for advising
Either address will work for old (or new) posts – for example, see:
http://www.tomrafteryit.net/?p=504 – it is the same as:
Hope this clarifies it for you.
in my opinion it is not the best way to put all in the root. It is better having a structure with one or two sub folders (don’t use more than 3). So you can have Keywords in each name of the folder and in the post too.
So keyword combinations can result from: sports, fun, billard, queues
This really works.
I am using /%category%/%postname%.html cause Google likes to get files with the html-ending. My Site started two weeks ago and there are only a few posts in it (will become more and more…), but I have got top10 Positions for the less pages and the keyword combinations that I put into the whole URL.
Thanks a lot. It now works wonderful 😉
Many thanks to Chris. Very useful info and it seems to be working fine.
Would you give me a hand? I have turned on my custom permalinks in WP using /%categoryname%/%postname%/ , and i use the Permalinks Redirect plugin to assure that i have only one address per post. The plugin issues a 301 to the permalink in use so the PR should be transfered (if i understand it correctly).
This was all done more than a month ago – maybe two, i don’t even recall because i know Google takes a while to sort things out. But after wating quite a while my individual posts have a rank of 0 (or unranked), even though my homepage has a rank of 5. What’s with it, would you know?
I even see some WP sites (like yours!) where the individual posts have a rank…
I’ll be thankfull for any help, as i lost about 30% of my traffic after the switch to custom permalinks.
I suspect what is happenning is that there are very few links to the pages/posts you are referring to and hence they have a 0 PR. I am fortunate enough that some high traffic sites linked to a couple of my pages and so some of my posts have a PR – but many unlinked posts don’t.
Google’s PR is based primarily around links into the page – if you can get some of your posts linked by some high PR pages, you will notice they will get a PR.
Thank you for your reply, Tom. I understand…
So if my posts are addressed like mydomain/?p=10 then they will look to Google as if they were main page itself, just with a querry string attached, so they would have the same PR as the main page; but if they are addresses as mydomain/somecategory/postname they will look to Google as a separate page and thus to have PR they will need to work for their own PR – did i get his right?
If yes, wouldn’t it be better not to use permalinks??
You have most of it correct Eduardo – let me try to clarify it further.
All posts have a permalink, a unique address. If you don’t configure your PermaLinks, the PermaLink will look like your mydomain/?p=10 example – this doesn’t give you any search engine benefits.
If you configure your PermaLinks to be /%year%/%postname%/, then your post will contain the title of your post and if people search for words contained in your post title, you have a greater chance of being found.
The Google PR issue is separate.
Hope this is clearer
Ok, i see. I am mixing search engine results with PageRank.
So if i use /?p=10 i will have the PageRank transfered to my posts, but i will appear better in search engine results if i use permalinks with /%postname%/ – is this what you are telling me?
Not quite Eduardo!
If you use /?p=10 you get no advantage. If you use PermaLinks you get good search engine optimisation and you get PR if someone links to your post.
Thank you Tom, for your kind help and clarification of the matter.
This is great information here, thanks very much!
I’ve just switched my site over to Permalinks – after operating for 4 months with the other system. I want you to know I read the Word Press info on Permalinks, and was mystified – and spent ages looking at my C-panel files making sure my .htaccess was in the right place (I am green newbie) and then I came here and read this thread and suddenly it all flashed before me clear as daylight. So…
I am using %my_site%/%category%/%postname%.html and the category is coming up on my static page URI, but my posts are all coming up as ‘uncategorised’. Do you know how I can fix that?
you need to create categories for your posts.
In WordPress 1.5 it is Manage -> Categories -> Add new
In WordPress 2.0 In the Write Post screen, click on the + beside Category on the right hand side and add categories here.
Hope this helps – welcome to WordPress.
Thanks for the quick reply – and the welcome to WP. 🙂
All my posts have categories – that’s why I am baffled that they come up ‘uncategorised’. If I click on a category from the side bar, I get a page of links to posts under that category, and the URI lists that category, but when I click on the link to the post and the post comes up, the category vanishes and the URI is –/uncategorised/followed-by-the-post-name.html
I just started moving over from blogger, putting my blog on my own url. I have the permalinks on and they work fine for posts that have a category assigned to them, but for the posts that are uncategorized, the link is simply ///.
I am familiar with how .htaccess & php handle this, but not with the specific WP code. I would think that at least they would come up //post-name/
Tom, I also think people need to be conscious of how long their permalink URLs are.
If they are too long (78 characters is a traditional limit for each line), many e-mail programs will split them across lines, breaking the link.
I noticed this, in fact, when I was going to send the URL for this page to someone – at 82 characters it just wrapped.
Maybe the trade-off for having more keywords in the permalink for Google to notice is worth it, but at least one Internet “expert” (Jakob Nielson – URLs as UI) has written about how very long URLs sabotage the second-best way people find your site (recommendations from friends).
I was going to quote from that article, but there are so many good points it’s worth a quick read of the whole thing.
Actually, in light of a more recent article by Nielsen (Search Engines – Leeches on the Web), the value of that secondary channel (recommendations) seems even more important.
(And yes, I’m aware of services such as TinyURL which people can use to take a long URL and turn it into a short one – but the vast majority of people will never go to that extra effort. They will simply copy the address from their browser bar, paste into e-mail, and send – and the e-mail program will break up the URL silently in the process.)
While I can’t say I agree 100% I pretty much like how you say it.
I couldnt agree more!
Hello Tom, thanks for the advice. I’m just setting my blog up today, and I find the whole process quite fascinating. I was wondering if it’s possible to do this:
I want to have my blog at http://domain.com/blog/, but at the same time have short permalinks like http://domainname.com/this-link/.
Is that possible?
Thanks for the great tutorial.
it is possible – in fact it is what I have done on this site! However, they way I have done it required a horrible hack which means now that I have two Technorati profiles splitting my ranking between tomrafteryit.net and tomrafteryit.net/views!
Love this thread!
I’ve learned a lot but I don’t know why (some) images aren’t being found on a single post page. Any ideas?
I thought I could get around the /%postname%/ issue by using /%postname%/%post_id%/ instead. Sure, I have to add a fairly meaningless post id at the end, but the postname is earlier in the url. But when I tried that it didn’t really work — I got a “Error 404 – Not Found” error. What happened?
Comments are closed.