Understanding and Implementing Permalinks in WordPress Content Management System

1 Comment

wordpress-thumbAnyone who has spent time typing in URLs has seen some really long, esoteric and seemingly bizarre ones.  The ones that look like someone pounded the keyboard’s number and special character region until a thoroughly unmemorable string of characters spilled forth. What you’re seeing in most cases is the raw, automatically generated, database based reference that many Content Management Systems use.  In some platforms you don’t have a choice unless you want to do a lot of labor, writing aliases and redirects.  However, this is not the case in WordPress.  You actually have a great deal of flexibility in what your URLs look like.

In WordPress this functionality is controlled by a feature called “Permalinks.” Permalinks is an industry term, and actually has a bit broader definition than the one we are using here, so apologies in advance for the generalization. Because one use of the Permalinks feature is to make links friendlier and more memorable, you’ll often see it referred to as “Pretty Permalinks.”  Conversely, the default setting which looks something like (http://www.yourblogsite.com/?p=2340) is sometimes called “Ugly.”

Settings | Permalinks in WordPress

Getting Started With Permalinks

To access your Permalinks settings, you’ll need to login to your WordPress Dashboard, then expand the Settings section and click on Permalinks.  If this is your first visit to the Permalinks settings, you’ll probably see a screen of Common Settings, with the Default (aka “Ugly”) option selected.

Beneath the Default options are three commonly used formats and an entry box for creating your own Permalink structure. Of the three built-in options, the first two are the ones I see most often used.

Permalinks | Common Settings in WordPress

There are advantages to these date-driven structures:

  • They are great at letting visitors and search engines instantly see the date relevance of a page.
  • They are “regressive.” If you cut off part of the URL, WordPress will serve up all the articles that fall in that larger date range (i.e. http://www.yoursite.com/2011/09/sample-post/ shortened to http://www.yoursite.com/2011/09/ would show the visitor a list of all articles posted during September 2011.
  • The date-driven structure is very helpful for sites that focus heavily on time/date-sensitive content, such as online newspapers, magazines, and events.

There are drawbacks, however:

  • The date-driven structure can make visitors (and some aspects of SEO) consider your page “dated” as time goes on. Even if it is not the case, a person confronted with two articles (yours and a competitor’s) might believe the one with a newer date was better.
  • If you have to change the dates of your articles frequently, you get into a situation of “url-rot” where incoming links become less relevant.

Custom Structure

This is where the magic happens, as they say.  WordPress has a fairly intuitive and robust collection of “Structure Tags” which you can use to create your own, personalized Permalink structure. Some basic principles to remember when creating your Custom Structure:

  • Never enter any part of your root URL (http://www.mywordpressblog.com/) in the Custom Structure field. It is not necessary and will break your Permalinks.
  • Always separate your Structure Tags with a forward-slash (/).
  • Always “wrap” your Structure Tags in a pair of percent symbols (%).
  • Structure Tags pull their information from the individual article/post. So if you use something like %year% it will use the year the article was created in, NOT the current year.
  • Example: /%year%/%postname%/

Examples of Custom Structure settings and hypothetical output:

  • /%category%/%postname%  => http://www.mywordpressblog.com/self-help/5-relationship-tips
  • /%tag%/%postname% => http://www.mywordpressblog.com/tips/5-relationship-tips

You can even incorporate static elements in your Custom Structure:

  • Fake “html” pages:  /%category%/%postname%.html => http://www.mywordpressblog.com/self-help/5-relationship-tips.html

As with the date-driven formats above, Custom Structures can be “regressive” but only if the structure goes from general to specific:

  • Won’t regress well:  /%post-id%/%category%/%postname%
  • Will regress well: /%category%/%postname% (to all articles in the same category)

A full list of Structure Tags and detailed notes can be found in the Official WordPress Codex.

Cautionary Note About Changing Permalinks

In good CMS platforms, changing your Permalinks setting will update all the necessary redirects to keep your links from being broken.  However, changing them frequently and/or late in a site’s life (when it has accumulated lots of content and incoming links) can create a temporary dip in search engine ranking while they catch up with your new Permalinks.  For this reason, I strongly recommend that you choose a Permalink strategy that suits your need during the design/development phase of your site and stick with it unless you have a compelling reason to change.

 

Need help implementing this tip in your WordPress site? Contact us for our professional services.  We can also provide support & expertise in convenient “blocks” to suit your short and long term needs.

 

I'm the front-man of It's WordPress. I come from a diverse array of backgrounds, enjoying the opportunity to expand my knowledge base and skill set by re-inventing myself. I enjoy environments that focus on emerging information, technology and concepts. I put on the technical hat in my early 20s and never really looked back. I'm love technology and the internet, as well as the outdoors and avidly hike, kayak and camp every chance I get.

About Us

We can take you from concept, through design, development and deployment in one seamless process. Whether you choose a self-managed web site or need a continuing support relationship; we've got you covered.

Click to edit this heading

Request Consulation

Ready to transform your vision into a reality? Just looking to see what it takes to get the ball rolling. Tell us about your project and we can help. No spam. No obligation. Just answers.

More from our blog

See all posts
1 Comment
    • review wordpress theme
    • December 11, 2012
    Reply

    This design is wicked! You certainly know how to keep a reader entertained.
    Between your wit and your videos, I was almost moved to start my own blog
    (well, almost…HaHa!) Fantastic job. I really enjoyed what you had to say, and more
    than that, how you presented it. Too cool!

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.