Save 10% on our Pro WordPress plugins with discount code: 10PERCENT
Web Dev + WordPress + Security

WordPress Lessons Learned, Part 1: Permalink Structure

While planning my current site renovation project, I considered changing the format of my permalinks. Reasons for modifying the permalink structure of a site include:

  • Optimizing URLs for the search engines
  • Simplifying URL structure for improved readability
  • Removing the implication that your site content is somehow organized chronologically
  • Removing other unwanted organizational implications (e.g., categorically, topically, etc.)

Like many people who configured WordPress permalinks a couple of years ago, I chose to include the day, month, and year along with the blog URL and post title. For over two years now, Perishable Press has employed the following permalink format:

https://example.com/press/2007/11/05/sample-post/

..which is dependent on the following code structure:

/%year%/%monthnum%/%day%/%postname%/
Update: In the URL example above, and in the examples following, I had to change perishablepress.com to example.com, because googlebot kept flagging the URL as 404 Not Found. Sigh.

At the time, this was the widely accepted and most popularly employed format for permalinks. Much of what we now know about search engine optimization, duplicate content, and canonicalization has changed the way many think about their permalinks. These days, the optimal way of writing your WordPress URLs represents a return to simplicity, readability, and a “flat” directory structure:

https://example.com/press/sample-post/

..which is dependent on the following code structure:

/%postname%/

This is the new format that I have been craving. It’s clean and crisp and represents my current mindset perfectly well. Nonetheless, after contemplating the various benefits, I considered the potential downsides to changing my permalink format:

  • Loss of link equity due to broken links, 404 errors, and other redirection nightmares
  • unnecessary confusion from missing content and broken links inflicted upon site visitors
  • Unforeseen conflicts with WP 2.3 and other scripts, plugins, and themes
  • Need for secondary set of htaccess rewrite rules

Clearly, plenty of great reasons either for or against such a drastic move. Finally, while comparing the options and considering a final decision, I decided to take a few steps back and look at the “big picture” for a moment: is it really necessary to change the format of permalinks this late in the game? No, it is not. A tighter permalink structure may prove beneficial according to several of the reasons previously outlined, but the potential drawbacks associated with permalink modification are not worth the risk. At the end of the day, the permalinks for this site, although dated (pun intended), are well-established and happen to work just fine. Although it would be a complete bonus and possible benefit to restructure my permalinks at this point, I see no long-term benefit to a simplified format. In fact, in the long run, say after another five or ten years, this site will house a virtual ton of content and may very well benefit from the current permalink structure.

As many of us know, permalinks require Apache’s mod_rewrite module and involve various rewrite directives, and an htaccess file. If you have ever experimented with various htaccess tricks, you totally understand the highly sensitive and volitile nature with which they operate. htaccess is powerful stuff — messing with a well-established permalink structure requires modifying htaccess rules, and should be approached with great care and understanding. This is not meant to scare anyone from trying to reformat their permalinks, it is merely a reminder that “if it ain’t broke, don’t fix it,” and, “if it is broke, make sure you know what you’re doing before making any changes.”

Allow me to conclude with a word of advice to new bloggers out there who may be establishing the structure of their own permalinks. If I could go back and begin Perishable Press with the knowledge I have gained over the past two years, I would have went with the simplest format possible. In other words, my permalinks would look something like https://example.com/sample-post/ and that’s it. Including the date string (e.g., /2007/07/07/) in the URL is unnecessary because WordPress inherently organizes your content chronologically. Organizing and displaying your content chronologically is your choice, however, once you decide to include the date in the URL, there is no (easy way of) going back. Likewise, including the post categories in your permalinks cements each category permanently, making it much more difficult to rename or remove it in the future.

Regardless of the permalink structure you decide to use, I highly recommend planning as far into the future as possible and/or necessary. If you have any intention whatsoever of continuing your site for any serious amount of time, it behooves you to contemplate your site as it may exist “x” number of years from now. For example, are you absolutely certain that you will never want to change your categories? Which permalink format affords the greatest degree of flexibility? Factoring such considerations into your decision-making process will serve you well regardless of where your blog ends up.

Jeff Starr
About the Author
Jeff Starr = Web Developer. Security Specialist. WordPress Buff.
.htaccess made easy: Improve site performance and security.

14 responses to “WordPress Lessons Learned, Part 1: Permalink Structure”

  1. Jeff Starr 2009/03/08 2:40 pm

    Hi Palma! :) Great to see you. Yes, the postname format is an excellent choice. You should be fine. Thanks for the generous feedback — it is my honor to help you! :)

  2. Sergey Oganesyan 2012/06/20 9:40 am

    Thank you for your lessons, everything is clear and easy!

Comments are closed for this post. Something to add? Let me know.
Welcome
Perishable Press is operated by Jeff Starr, a professional web developer and book author with two decades of experience. Here you will find posts about web development, WordPress, security, and more »
Blackhole Pro: Trap bad bots in a virtual black hole.
Thoughts
W3C.org has a very thorough list of accessibility tools.
The more you wake up, the more you realize you are still asleep.
7G Firewall v1.4 now available!
I would pay twice as much for a shorter/smaller/lighter phone.
Taking a much needed break in August :)
The Web was better before social media.
WP 5.8 Gutenberg/Block Widgets is breaking many sites. Fortunately Disable Gutenberg makes it easy to restore Classic Widgets with a click.
Newsletter
Get news, updates, deals & tips via email.
Email kept private. Easy unsubscribe anytime.