If you're new here, you may want to subscribe to my RSS feed or via email. Thanks for visiting!
What’s a Permalink?
A permalink is nothing more than the URL to your posts and pages. It’s called a permalink because it’s something that shouldn’t change, otherwise you’ll break other people’s links to you. I’ll break them down into 2 different types:
Not Useful, AKA default:
http://domain.com/?p=123
It works for any server environment, but offers you nothing by which to identify the post, unless you’re a savant who just remembers those sorts of things. It’s not useful, despite it’s relative simplicity. It doesn’t tell a human or a search anything about the contents of the URL.
Useful, AKA mod_rewrite / PATHINFO:
http://domain.com/year/month/day/post-name
http://domain.com/category/post-name
See how much better it looks and how more useful it is? There are a variety of ways to build the structure beyond the name. The /year/month/day/post-name is default, but you can use a variety of other descriptors, such as author and category as well. You can even use hours, minutes, and seconds, but I think it’s easy to agree that it’s too granular and would be distracting in most conceivable uses.
The only difference between the mod_rewrite and PATHINFO variants is that mod_rewrite requires use of the Apache webserver with the mod_rewrite module activated and small changes to the .htaccess file. PATHINFO permalinks will look the same, but require the element index.php between your domain name and the rest of the permalink.
Your Options | Permalinks page will allow you to choose which method you prefer:
The debate rages over whether you should or should not include dates in your permalink structure. I’m not going to re-hash that here, but I use them as it’s an easy way to distinguish posts from each other and let you know when it was made. It works for me but opinions differ, and you are free to choose your own structure.
I Want To Change My Permalink Structure, What Do I Do?
If you’ve already set up your permalinks, or accepted the default style, but would now like to change to a different format, all is not lost. Plugins exists to issue a “301 Redirect” so that browsers and search engines are redirected to the correct permalink so that you will not lose search engine rankings and traffic.
Scott Yang’s Permalink Redirect WordPress Plugin and Dean Lee’s Permalinks Migration Plugin will assist you with updating your permalink structure while still retaining your readership, existing links, and search engine position. The Permalink Redirect WordPress Plugin also will prevent you from having duplicate links for the same content. It can redirect your domain.com to www.domain.com (and vice versa) and prevent duplicate entries from traffic coming to your directories with or without the trailing slash at the end, so it has additional value that you may find useful.
So which permalink structure do you use, and why? Do you prefer dates or no dates?
Tags: How To, HowTo, mod_rewrite, pathinfo, permalink, Permalinks, redirection, WordPress, WordPress Plugins
4 responses so far ↓
1 Clearwater Beach Real Estate // Dec 28, 2007 at 3:42 am
oh can I give a testimony to NOT changing once set up - I foolishly changed mine from date in front to back and totally lost 1/3 of my indexed links - I’ve been told spiders will reindex in the next month or so when I asked should I now jus t delete the original and repost to be found again. This is such helpful info - I’m subscribing to stay out of Google H*LL “-) Glad Michael Martine helped me find your blog - great info thanks - Cyndee Haydon
2 Robert // Dec 28, 2007 at 6:54 am
You can change, but you need one of the above plugins to do the redirects for you. Of course it’s cleaner not to in the first place whenever possible.
If the search engines have already found / not found the links then it might be too late though.
Do you have a sitemap? That helps search engines index your site quicker. See the Google XML Sitemaps entry on the plugin page if you don’t have it already.
3 Charlotte Real Estate // Jan 5, 2008 at 6:48 am
Yes the sitemap is a big help…I was going to tell of a friend whole lost 1/3 of her posts… but she wrote above. I publish a “newsy” blog- dates are not only just fine but essential. Terry McDonald
4 manele noi // Jan 6, 2008 at 11:06 am
i prefere just /%postname%
Leave a Comment