Many people use WordPress to host their blogs (heck, I even wrote a book on that very subject). WordPress is a fantastic piece of software, however it always pains me to see someone using the default permalink structure.
What is a permalink? That's the permanent URL for a particular post on your blog ( for example, the permalink for this post is http://www.scottexplains.com/2010/04/improving-your-wordpress-blogs-permalinks.html, though Scott Explains runs on TypePad. Oddly enough I'm writing a book about TypePad too. Shocking!). These URLs should never change (hence the "perma") because any time they change you risk breaking all the links people have created pointing to your blog.
By default WordPress produces permalinks that look like this:
That permalink tells you nothing about the content of the post, even worse it doesn't tell search engines (all hail the mighty GOOG) a darned thing either. Now, compare that default link to this one:
That's a lot of information! First off we can tell this post was published on December 7th, 2009 and it probably has something to do with homemade crackers.
I don't know about you, but I like the second one a whole lot better than the first (and so do search engines since it gives them a bit of text to index).
How do you set this up on your own WordPress blog? Read on to find out.
Oh, do note that this tutorial only applies to the self-hosted version of WordPress available at WordPress.org, not the hosted version at WordPress.com (this version uses better permalinks by default).
Go to your blog's Settings
The permalink structure setting can be found in your blog's settings section. Go to your WordPress blog's dashboard and click on the Settings item located on the lefthand side of the screen (partially pictured above). This will reveal a few more options including Permalinks which you should go ahead and click on.
Choose a Permalink structure
As you can see WordPress comes with a few stock permalink structures (including the default) and a way for you to customize a permalink of your own choosing. I generally select the "Day and name" option since it gives both the publication date and the title of the post in the URL, but you can feel free to pick whichever you would like.
If you want to get fancy and customize your own permalink structure be sure to reference this page that lists all the available variables that you can use.
Why doesn't WordPress have a better default?
I know what you're thinking, "If those default permalinks are so crappy why does WordPress use them in the first place?" The answer is simple: compatibility. You see, no matter which permalink setting you use WordPress itself will still be using the default permalink internally.
Let's take a look at that default URL one more time:
The interesting stuff starts happening at the question mark there. That question mark tells WordPress, "Hey, I'm going to pass you a bit of information in the rest of this URL so pay attention!"
The 'p' stands for post, and the number following the equal sign is the post ID. Each post you enter into your WordPress blog is stored in a database (sort of like a spreadsheet, though much more flexible). WordPress automatically assigns each post a unique number to identify it. The default URL tells WordPress which post it should display on the page.
No matter which permalink structure you use, WordPress still needs that post ID. Using some server side trickery, called mod_rewrite, WordPress is able to respond to both the default URL and a different permalink. This basically maps the default permalink structure to the alternate structure you pick in the Permalink settings allowing the server to answer to both permalinks, and everyone is happy.
Sadly, not every hosting company supports this and that's why the WordPress default is what it is. This allows WordPress to work on the widest variety of hosting services.