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 advanced. If you have questions leave a comment and I'll be happy to explain what needs to be explained in further detail. At the end of this blog post I refer to other bloggers who are going a similar route. Kind of social proof that I have moved in the right direction with the latest changes in the inner workings here.
I originally stated, “I don't care about rewriting the short versions of the URL.” That means if someone typed for example, http://blog.fcon21.biz/230/ for an article about email marketing tips, into the browser or clicked a corresponding link the navigation bar of his browser showed exactly that URL. Not anymore.
I argued it does not matter as long as the content is what the user is looking for and the search engines can use the meta information for the canonical URL from the HTML Head section.
Well, that was theory.
Rewrite non-canonical versions of your post URL
Not all search engines and other types of robots are taking advantage of the meta information for the canonical URL at this point.
I noticed problems with Google Adsense when requesting a particular page with using the shortcut URL. The AdSense bot did not know what the page is about and served no or totally off-topic ads in many cases. I knew this is not very good. So I needed to fix this problem.
And I mean, rewrite the URL by sending a HTTP 301 Permanently Moved status response header for the new location. Where should I get the new location. From the blog database of course.
Besides that, it seems to be more user friendly as well, when the shortcut URL resolves to the canonical version in the navigation bar. More likely that people will bookmark or share it on social platforms.
Challenge with backward URL compatibility
The challenge was to make sure the “old” versions of all URLs (long and short) which contained date information at some point remain valid and serve the corresponding blog post but with redirecting to the new URL of course.
This was easier said than done. You probably have heard what experts are saying about the mod_rewrite module of the Apache web-server which is the main tool programmers use to achieve such URL related goals.
“The great thing about mod_rewrite is it gives you all the configurability and flexibility of Sendmail. The downside to mod_rewrite is that it gives you all the configurability and flexibility of Sendmail.”
-- Brian Behlendorf, Apache Group
“Despite the tons of examples and docs, mod_rewrite is voodoo. Damned cool voodoo, but still voodoo.”
-- Brian Moore, news.cmc.net
What made it even harder to implement is a tiny syntax incompatibility for pattern matching in different Apache versions. To find that undocumented source of trouble took … Well, too long. But it's done now.
Here's the trick (without detailed explanation):
Version 8 for regular expression syntax which is applied and used in mod_rewrite introduces the literal “-” (hyphen) character in a character class by preceding a “\” (backslash) character.
However, this does not work on older versions of the Apache web server.
To make sure you do not run into problems, use the old syntax, which requires to put the literal hyphen character at the very beginning or at the very end of a character class definition.
[-a-z0-9A-Z\%\+!\.,;] or [a-z0-9A-Z\%\+!\.,;-]
instead of [a-z0-9A-Z\%\-\+!\.,;].
Or in case of a negation [^-a-z] for example.
Sorry for the little pattern matching lesson. Don't worry if you don't understand what this is about. Folks that deal with sophisticated RewriteRules will know.
Even one more shortcut URL for Twitter
Since I was dealing with PHP code anyway, I thought it would be a very nice feature to have my own blog post shortcut URL service. Of course I don't tap into the social media arena that way like if I were using Hootsuite, bit.ly or other URL shortcut and Meme like services.
Directly in the root domain. Sexy, isn't it. And of course it resolves to the full canonical URL of the blog post with one permanent redirect. That means it is as search engine friendly as it can get.
Kind of Social Proof
Copywriter, marketer, blogger, and Wordpress expert Michel Fortin who also messes with the code himself (from time to time) quite recently backed my “remove the date” decision in his blog post, How I Grow My Blog Organically Using These 5 Tips (↑)
And I even pick up his suggestion to move the date stamp on the blog post from the header to the footer of the post. Thanks to Michel's posts I implemented exactly that in the tmplates as well. Looks more friendly now all of a sudden. What do you think.
If you write evergreen content there is no use for shying people away with a publishing date.
I also remember from memory that Chris Garret (↑) shares a similar opinion about the date in blog posts.
Okay, that's it. Enough SEO for some time.
John W. Furst
P.S.: Next thing to do: Finally upgrade the core of the s9y software to fully integrate pingbacks, which are so popular in the Wordpress world.
P.P.S.: By the way did you notice my new Tag flash widget in the upper right corner of the blog layout? Cool, isn't it. What do you think?
Allen, I've used WordPress before, and I like Serendipity better. The WordPress interface confused me; the Serendipity interface is simple. It's also fast, and secure. Best of all, you can install plugins and themes from a central repository without making a single code change.
I liked Serendipity so much I started programming for it. That's when I found out its code is also well-designed. For me, Serendipity is the epitome of blogging.
I have never used Wordpress, so I cannot really say in detail what the differences are. The licenses are different - WP is GPL whereas s9y is BSD, but I doubt that matters to many. s9y uses smarty templating - wp templates are written in php. I think s9y is considerably more lightweight/tight with its code, thereby being faster and using less server resources.
The wp community is much larger, resulting in more experts, more templates, and more plugins... but more does not always mean better. I think the smaller s9y community allows us to be more responsive to users... feature requests, problems, etc, are usually answered swiftly and thoroughly in the s9y community by a core of dedicated developers and users alike.
So, I am running this blog on S9Y out of personal preferences and appreciation for the craft of software engineering.
When I started out blogging, I had installed both Wordpress and S9Y Serendipity. I stuck with S9Y exclusively for a long time.
Nowadays, I also maintain several Wordpress blogs. Why? Basically for the same reason people use Windows and not Linux. Don Chambers brings that point home nicely, when he writes about some benefits of a larger community.
As I don't recommend to use Windows, or Mac, or Linux I also don't recommend a specific blog platform. (No matter what you recommend, people might complain anyway and come back to you saying, you've told me ... now help me.)
Worpress development is to a huge extent marketing driven. Marketers pay programmers to come up with specific solutions, and there we have the latest, greatest viral plugins, themes, whatever designed for the market's needs very quickly.
S9Y is more technology driven, pushed by individuals, and developed by personal preferences. I think you have basically everything you need at your disposal. Fewer choices on “packaged” solutions, but all the flexibility you want if you know how to utilize it.
I think the real question about S9Y versus WP is similar to “Are you a Linux, Mac or Windows person?”