Configuring WP Permalinks 54comments
If you like this post, please subscribe to our RSS feed to read our new posts every day.

Quite often, we hear of the terms (permalinks or pretty permalinks) which can also be called SEO-friendly URLs. These URLs are not only SEO friendly, but I believe they are human friendly as well. By default, WordPress uses URLs that look like a mishmash of letters and numbers with a few question marks mixed in for good measure. These types of links are frowned upon by search engine spiders and as a human being, they are also hard to read.
Fortunately, WordPress provides a way for us to change this linking structure to something understandable. WordPress calls these Permalinks. Permalink settings can be configured a number of different ways. One of the ways to quickly configure permalinks is by choosing one of the Common Options. These common options include:
Default - http://www.domain.com/?p=123
Date and name based - http://www.domain.com/2008/01/15/sample-post/
Numeric - http://www.domain.com/archives/123
There is no sense in using the default option so choose either Date and name based or Numeric if you don’t feel like tinkering with the Custom Structure.
The custom structure of the permalinks settings area allows you to customize the way permalinks are displayed by using any combination of the following permalink tags.
%year% - 4-digit year (for example, 2008)
%monthnum% - 2-digit month (for example, 01 for January)
%day% - 2-digit day (for example, 15)
%hour% - 2-digit hour of the day (for example, 20 for 10PM)
%minute% - 2-digit minute (for example, 50)
%second% - 2-digit second (for example, 24)
%postname% - Text separated by dashes which usually ends up being the post name. (for example, configuring-wp-permalinks)
%post_id% - The unique, numerical ID of the post (for example, 124)
%category% - The text of the category name that the post is filed in (for example, how-to)
%author% - Text of the post author’s name (for example, ronald-huereca)
Example of custom structure in use:
Custom Structure: /%year%/%monthnum%/%day%/
Link Output: http://www.domain.com/2008/01/16/
Make sure that you include the back slashes at the beginning of the custom structure, after each tag and at the end. This will ensure that WordPress writes the correct rules in the .htaccess file via mod_rewrite.
For my own blog, I seem to have done fairly well in the search engines by using the Custom Structure method and using the %postname% tag. I can’t say for sure which combination would do better or worst for search engines. The only thing I can suggest is that you configure your permalinks to look whats best for you.
*WARNING*
Changing the structure of your permalinks affects all of the permalinks on your blog. This is important to know because search engines will have indexed posts on your site via their permalinks. If you change the permalink structure mid stream, you will end up invalidating all of those links.
What to do if you don’t have a .htaccess file?
If you notice that you don’t have a .htaccess file within the same directory as your WordPress installation, you can create one by first creating a blank .txt file and saving the file as htaccess.txt. Upload this file via FTP to the same folder that houses your WordPress installation. Once the file is uploaded, set the permissions to the file as 666. Next, rename the file to .htaccess. Now you should have a blank .htaccess file for which WordPress can write the proper permalink rules to.
Servers That Don’t Use Apache Or mod_rewrite.
If the webhosting server you are on does not have the apache module mod_rewrite enabled, you can still use the permalink settings in WordPress by placing index.php in front of any custom permalink tags.
For example: /index.php/%year%/%monthnum%/%day%/
Equals: http://www.domain.com/index.php/2008/01/16/
Using index.php in this way eliminates the need for a .htaccess file.
I hope this little primer on how to configure your permalinks within WordPress was helpful. I’ve seen too many blogs out on the net that have yet to take advantage of this awesome feature. As I’ve said before, using any sort of permalink structure is better than the WP default. Not only is it beneficial in terms of SEO, but it also makes it easier for human beings to see at a glance, what a particular link is pointing to without having to visit the page.
If you use the custom structure aspect of permalinks, I’d be very interested in knowing which configuration of permalink tags you have chosen to use and why.










