Skip to content

SEO Friendly Permalink Structure

John W. Furst

I must admit when I first setup my E-biz Booster Blog I did not know much about search engine optimization (SEO).

Finally I have changed and improved my permalink structure. It is not only more SEO friendly but in fact has increased usability, too. Whenever you change URLs it should be your goal to redirect your old URLs to the new ones because you
  • cannot change all links to your site that exists out on the Web
  • don't really want to spend the time to change internal links manually.

It is best to make sure the old and the new link structures work in parallel. That's exactly what I have done. Luckily Google has introduced a new feature in March 2009 that made that change more easy for me. You can read about that in a minute.

Bottom line, you don't have to be a SEO specialist from Stompernet.


However, let me start with the full story



When I originally had set up my S9Y.org Serendipity blog I had chosen the following permalink structure for blog posts.

(Note: I am not using Wordpress for this blog at this time, but don't worry, I'll keep the article relevant for everybody! I am aware that most of you are using Wordpress.)

    %year%-%month%/%id%-%title%


E.g.
http://blogdev1.fcon21.biz/2009-01/230-Email-Marketing-Tips-Edition-16

As you can see I did a couple of things in an unusual way.
  • combined year and month of the post in one virtual directory
    instead of using the more common .../2009/01/... notation

  • use no file extension which is actually recommended by W3C.org and did
    not use a trailing slash “/” either.

  • I also wanted the post id, e.g. “230” as part of the file name because this
    makes the URL more robust against truncation and mistyping. Serendipity is
    actually very good at this and tolerates a lot of bogus while still serving the correct
    blog post.


  • Additionally I configured monthly archives by calling, e.g. ...biz/2009-01/

  • And of course I introduced short URLs in the form of, e.g. ...biz/p230/ with or
    even without trailing slash. Those come handy when used in emails.


What about the date in the URL?



The date in the URL is supposed to provide information about the publishing date of the blog post. That's basically a good idea but I wanted it for the wrong reason.

I thought search engine users will benefit from the additional information in the URL and that it helps them to decide to click on the link. Well, they enjoy it too much and don't even click through to “older” posts. Web users are hunting for the latest, greatest information. Most of them; there are a few exceptions.

However, the idea with SEO is to get people to your site. Depending on the topic of the particular article the date when it was published could be relatively irrelevant to the fact that it might provide the sought after solution to the reader.

There is a lot of “evergreen” content on the net, and on my blog as well. But using the date in the URL simply shies potential web visitors away. I want people to read it. Therefore, the date has to go. Bye-bye. The URL is 8 characters shorter all of a sudden. A nice side benefit.


Now what about the blog post id?



That's definitely a very good parameter to use in the URL because it's a “quick” database index which is good for the performance. And it helps to protect the URL from typos and truncations.

The above sample URL still works as
http://blogdev1.fcon21.biz/2009-01/230-Emablah-blah-blah

You'll notice that I don't redirect the URL (what you see in the browser navigation bar) to the correct address. I only serve the blog post according to the blog post index 230. It doesn't really matter for the user. The link works and it can be bookmarked. I'll talk about the search engines in a bit.


What about SEO?



It's almost safe to assume that the most experienced SEO experts for blogging can be found being active in the Wordpress world.

So let's learn from them. I'll keep it short.
  • The URL should contain keywords in the domain and the path.

  • Cryptic URL parameters, like
    index.php?author=A0076&post_id=234867&category=23&language=en-gb

    are not so good. Easy to see why, isn't it.

  • The shorter the better.

  • Omitting the date has more human than SEO reasons, but in general the structures should not go too deep either because it can limit the set of keywords your page can rank for. E.g.

    .../animals/mammals/small/rabbit/rabbit-flowers-garden

    The flower and garden part in the post has a hard time to compete against the animal part in the path respectively virtual directory structure. This might be a silly example, but it shows the point.

  • Testing and statistical analysis indicates that sites with 1 virtual directory before the post title rank better. There's a lot of debate about this subject and search engine algorithms are modified frequently. So in reality we are never too sure about it. I simply trust my sources (without disclosing them here.)

    That gives something like this:

    example.com/email-marketing/why-squeeze-page/

    With or without the trailing slash “/”. Using the trailing slash gives the hint that the URL is complete and no letters have been lost. So it's good actually for human readability.

    Or you might have seen a lot of wordpress blog posts like this

    example.com/why-squeeze-page/

    This leaves out the category and is shorter as well. Bingo!
    Bingo?

  • Let's not forget a category “email-marketing” in the previous example could have influence the ranking in a positive or negative way. Therefore my sources suggest to use numbers, digits instead. They don't have a negative influence.

    Now I say, “Bingo”!

    That's the perfect place for the blog post id.


My new SEO improved permalink structure



    %id%/%title%/


Easy, effective, elegant, robust.

My original example
http://blogdev1.fcon21.biz/2009-01/230-Email-Marketing-Tips-Edition-16

becomes
http://blogdev1.fcon21.biz/230/Email-Marketing-Tips-Edition-16/

and the associated short version
http://blogdev1.fcon21.biz/230/

Update 2009 04 27: I finally decided to keep all URL strictly lower case, which produces the final version for now. And I also strip characters like [.,;!?%+] off.
http://blogdev1.fcon21.biz/230/email-marketing-tips-edition-16/

You'll notice all three four URLs work, of course.
That's how it should be.

You want to avoid link rot and keep old URLs alive through redirection. I basically achieved that goal with a modified .htaccess file and Apache Mod_Rewrite. I simply have added ReWrite Rules from old versions of the URL to the new ones. Done!

Attention S9Y users: When you save certain changes in the Serendipity (S9Y) configuration in the administration panel it will overwrite custom changes in the local .htaccess file. That's why it is always a good idea to keep a backup with date stamp and a README file for taking notes about particular modifications. I also had programmed a tiny hack in 1 or 2 serendipity core files to make my life easier and introduced additional syntax for requesting a page via Apache Mod_Rewrite.


What about duplicate content?



Now I can access the same resource with many different URLs. That doesn't sound too good for SEO purposes.

The most elegant way to deal with this issue is to do a “301 Permanent Redirect” to the new permalink URL. In this case the displayed URL in the navigation bar of the Internet browser would change as well. And smart browsers could even update old bookmarks automatically.



There is a much easier solution. Thanks to Google.



They allow you to specify the canonical form of the URL now which can be achieved by a very easy change in your template file.

Simply add the following to the <head> section of your index template for blog posts.

That's how you do it in Serendipity s9y. Wordpress uses a different variable, but it is as easy. Just look up the variable or there might be a plugin available that handles the new canonical attribute.

    <link rel="canonical" href="{$entry.link}" />


Therefore I do not need to change the internal links between older posts. Fabulous.

Here's the blog post from Google:

Webmaster Central Blog :: Specify Your Canonical

One last word. This new mechanism supports:
  • same domain
  • cross subdomain of the same domain
  • NOT: cross domains. Use 301 Redirects instead.


What's your opinion, leave a comment for us.

Yours
John W. Furst

P.S. Of course it's always a good idea to keep your site and the sites of your competitors “on your radar” with this SEO plugin.

P.P.S. Update! There are some side-effects that you must consider.
  • RSS readers and applications will re-import your blog posts, because they look new! Let's say you publish the latest 10 posts in your RSS feed, then your last 10 posts will show up in your subscribers RSS feed. This happens eventually after every change. Even the tiny ones. So think beforehand and change it once. (or turn RSS off while you are experimenting. Ideally you have a development version of your blog. [I have one but I messed with the production engine right away. :-)]

  • Do you automatically send email notifications for new blog posts… Hurrah! This is usually triggered via your RSS feed, your subscribers just got a bunch of emails. If you played around around with the settings like I just did, they could have got about 70 emails each. (Is that spam?) No it's not funny. I think I have turned that automatic feature off anyway. Yes, it's off. I usually add some personal comments just for my newsletter subscribers. Therefore, the full automatic approach doesn't work for me.

    (I knew about this, but I was not really thinking about it when performing the changes.)

    So watch out people when messing with your blog permalink structures.

  • Another side-effect of-course is that is seems that you have lost all your social bookmarking “points”. I mean, 0 Diggs, 0 Stumbles, 0 Reddits, … Your entire blog looks virgin, again.

    This might look bad on your blog, but the submitted URLs still work. That means you shouldn't loose traffic from the social sites, only the social proof as seen from your blog goes bankrupt.

    Of course this doesn't have to happen and a smart programmer could implement a solution and write a plugin (there is probably one for wordpress out there) that changes the permalinks only for newer blog posts. Don't know if it's worth to keep a permalink history. It might be easy enough inside the blog software but could get really messy in combination with the .htaccess file and Apache's Mod_ReWrite module. (I guess a very smart programmer is required.)

    As you can see, I just dropped all social proof with the blink of an eye. Well, I have Twitter, haven't I. Probably remove the Dig and Reddit widgets for a while. Let's think about it.


Trackbacks

E-Biz Booster Blog on : "RSS Gone Wild" is a SEO side effect. Sorry!

Show preview
RSS hiccups happen I implemented a couple of SEO related (search engine optimization) changes on this blog. But I did not stop there. I introduced some new features for my readers as well. As a result and the side-effect of it, the 10 or 15 latest

E-Biz Booster Blog on : New SEO Lessons learned already!

Show preview
John W. Furst Finally following up my previous blog post about the SEO improvements on this, my E-Biz Booster Blog. I promise I'll keep this post as short as possible and to the point. And I must warn you. This post might be a bit straight forward and

E-Biz Booster Blog on : Canocical URLs Explained By Matt Cutts (Google)

Show preview
Matt Cutts on Canonical URLsThis shall be a very quick update and summary with my final SEO advice for some time. It seems that my chronological report about the evolution of SEO configuration on this blog confused many readers. I apologize and make it

Comments

Display comments as Linear | Threaded

Justin Brooke on :

*

Thanks for sharing your experience on search engine optimization. This is worth reading and worth suggesting to friends.

Pett on :

*

blogdev1.fcon21.biz - da best. Keep it going!

Have a nice day

John W. Furst on :

*

I put some finishing touch on the new, more SEO friendly permalink structure and have changed all URL to be lower case.

I also stripped away commas, periods, and exclamation marks which I had in the URLs occasionally.

(*) .../Why-.COM-is-the-best-Top-Level-Domain/

reads not as good as

(*) .../why-com-is-the-best-top-level-domain/

What do you think? Over time we got kind of used to domains being primarily lower case.

Yours

John W. Furst

John W. Furst on :

*

It's me one more time.

For those of my readers who are using Serendipity Weblog Software themselves, here is my forum post with a more technical treatment of the subject. ...

(*) How I get my lower case URLs and remove , . ! etc. at

http://board.s9y.org/viewtopic.php?p=86812#p86812

(see the 'hot' link below)

Cheers. :-)

Allen Taylor on :

*

Good read. Some great points to consider here and I'll keep them in mind when I make the planned changes to my blog/website.

I do have to say your approach to permalinks here is unique. I don't think I've ever seen the post ID and folder name used together in the same permalink. I use dates, but I think I like your idea better. One thing I do differently is put the blog post title closer to the front and the date (in your case, post ID) at the end. I do agree that the category names in your permalink can work against you. Here's the string that I use:

/%postname%/%monthnum%/%day%/%year%/

Anyway, you give a lot of food for thought. A shame about the social proof. If you 301 redirect your posts then that shouldn't happen, but there are practical reasons for going the other way too. It's difficult to transition older websites to newer protocols. A lot of things to think about.

John W. Furst on :

*

Allen,

Thanks for the detailed feedback. I appreciate it.

I am still learning some “lessons” from the aftermath and will write another posts on the very same topic of SEO today or tomorrow.

Thanks for the mention on your blog by the way.

:-)

Ray on :

*

Hi John,

You talk of RewriteRules in your post for your S9Y install.

Can you share that with us?

Jm-Experts on :

*

The best article I've read today Smile Thanks!

Jennifer -- JeM [fcon21.biz] on :

*

Thanks for your feedback.

Always good to know.

Comments are closed.
However, if you want to tell me something, drop me a line. Contact Us link in the footer.