So, WordPress 2.3.2 came out tonight, and the site has already been updated. But, it did remind me to write about WordPress permalink structure.
WordPress has great permalink structuring, but you can make it even better. You can customize it to your needs, and what you’re site is using WordPress for.
Right now, ChristopherPrice.net uses the “default optimal” structure for permalinks. Articles are URL’ed as /year/month/day/article-title.
This is a good structure for browsing the site. You can delete the article title and see a list of the articles made in a particular year, month, day, etc. However, if you’re gunning for top ranking on a web search engine, it isn’t the best for several reasons. However, I went with the default like many do when they roll out WordPress initially… WordPress knows best. And, they did… it is the best structure for the average WordPress blog.
Now, here’s the deal with search engines. They like keywords. They also like things to be neatly in one place. They hate subdomains and they hate confusion. The date-based structure WordPress uses by default is acceptable, because many articles are going to be in the same/similar place. But, it’s not keyword-rich. A better structure would be /category/article-title.html (as it stuffs the category’s keyword and only the article title… along with a .html to ensure people know that it’s an actual web page (no confusion about if there’s a trailing / at the end of the URL).
But, this isn’t always the best title either. For example, PhoneNews.com usually has to put the category title in the article. For example “Sprint launches its 1,000th phone”. That then becomes /sprint/sprint-launches-its-1000th-phone.html
Two Sprint’s. Not good. Even Sprint knows that having a Sprint and Nextel wasn’t a good decision… we’re not going to make the same mistake in the URL world.
So, PhoneNews.com is going to use a different structure… drumroll please! /article-title-number.html (Yes, it’s just that simple).
The reason for this is two-fold. One, it puts all the articles in one place, at the root of PhoneNews.com. Second, it ensures the keywords are what search engines read, and gives them priority over someone else using the same keywords. The article’s number is added at the end for diagnostic purposes (being at the end it is usually skipped over by search engines).
This actually didn’t work in earlier versions of WordPress. It broke things like browsing by date or category.
Now, if you’re inexperienced, I don’t suggest doing this. There are many guides online to manipulate WordPress permalink structures, I’m just pointing out the new structure we’ll be using over at PhoneNews.com.
Okay, if you are WordPress savvy, the specific structure is /%postname%-%post_id%.html
Oh, and ChristopherPrice.net now reflects those changes… but the old backlinks will still work thanks to some robust WordPress plugins.
Christopher,
Thanks for the hints on this. I noticed you had linked to my post on making WordPress static. This little trick will most assuredly fix a little bug I encountered in making the blogs static. A few times, the browser would display the raw HTML instead of rendering it. With each post having a .html at the end, this just might fix that issue. I won’t test it until I have to convert another blog, though, but knowing the popularity of blogs at work, that might be really soon.
Anyhow, thanks for the tip. It adds a bit of “professionallity” to a WP site.
Ammon
Hi Ammon, I actually found a workaround to that, which is why I edited that part of the article out shortly after publishing.
With a few curl tweaks, you can get articles to export as index.html inside of the directories. Then, curl downloads the articles and makes the directories… which you can batch upload back to the server.
Granted, your server will then have thousands of directories, each holding a single file… but it sure beats having a bunch of periods in the permalink structure.
Which reminds me, I still need to report that flaw (though, at this point, it may have to stay since some already have permalinks based on that flaw).
It’s the first time I commented here and I must say you share us genuine, and quality information for bloggers! Good job.
p.s. You have a very good template for your blog. Where did you find it?
The WordPress theme I use was custom-built for MechaWorks. It’s deployed on all MechaWorks sites.