Browsing the archives for the blogging tag

Canonical URLs in WordPress

Like any good obsessive-compulsive blogger, I frequently pour over my web site statistics looking for interesting stuff. One thing that caught my eye is that search results coming in from Google tends to link to threaded comment pages for entries.

For example, I’d get hits to /blog/2009/03/05/entry-slug/comment-page-1/, which is an URL that’s pretty hard to actually find on the page — it’s only used for permanent links to entry comments, with an anchor to the comment ID tacked on, like this.

What I’d prefer to see is incoming hits to the actual blog entry URL /blog/2009/03/05/entry-slug/ in this case. Luckily, there’s a smart and simple solution — canonical URLs. The Google Webmaster blog explains it nicely with examples.

So I simply add a canonical tag referencing the preferred URL in each page. Now, it’s just the preferred URL on my side — this is just a hint to search engines that tells them that this page is a duplicate, and that I’d prefer them to let results point to one particular page of these duplicates. In 99% of the cases it will be respected, though.

The actual code is just a few lines. Add this in header.php of your theme, somewhere in the head:


<?php if (is_singular()) { ?>
<link rel="canonical" href="<?php the_permalink() ?>" />
<?php } ?>

is_singular is a function that returns true if any of is_single(), is_page() or is_attachment return true — in other words, if you’re currently visiting a single entry, a page or an attachment.

With this, each entry sub-page of comments has the main entry URL as their canonical URL. Now to wait a few days and see when the search engines1 pick up the change.

1 And by “search engines” I mean “Google.”

No Comments

Sharing is Caring

Public service announcement: I read my feeds in Google Reader, and I end up sharing tons of entries I find interesting and/or weird.

Here’s the shared page, or go straight to the feed for it.

There will be the occasional item in Swedish, but most of it is English.

Addendum: I should also mention that I have a habit of sharing things that I know interest people that follow my shared items. Breki wrote about Things recently, so I’ve shared a handful of Things-related entries that show up in my feed.

Want me to share stuff that interests you? Make sure I read your blog and tell me that you follow my shared items, and I’m almost certain to start sharing stuff you’ve blogged about recently.

4 Comments

Spread Thin Across the Internet

Jeffrey Zeldman wrote about content outsourcing and the vanishing personal site, which is exactly the direction I was heading with Reconsidering Blogging. I would have written more there, but it felt tough enough to just accomplish that much.

While I love all these wonderful social sites like Flickr, Tumblr, Twitter and various other clever services that tend to end in -r, I am starting to feel like I spread myself thin across the internet. So many places to post stuff to, so many places that contain fragments of my thought streams. It’s hard to keep track of me.

As I wrote, I feel that I have a certain expected level of quality for things I want to post on my personal site. While I grin just as much as anyone else at lolcats, that’s not really stuff I’d like to post here.

I’ve started experimenting a bit with Tumblr — you can find me here. Just like I enjoy the 140-character format of Twitter, the Tumbler format of posting various short text snippets, quotes and images is also very appealing. That default theme doesn’t quite agree with me about what a quote is, though. I have a habit of finding interesting quotes that can span several paragraphs, so blowing up the text size like that can get confusing. But I’ll fiddle with that later.

But Tumblr is still an experiment for me. I don’t find myself wanting to post there that frequently. Twitter is still the main source for my thought streams. I’ll keep fiddling with it for a while, and if I find a format that works for me I’ll try to incorporate it into my social stream.

So here’s the crux of it: do I try to tie it all together on my personal site, or just leave it with links to the various services I use?

Let’s look at what some other people do.

Jon Tan has a front page that is not the actual blog, but contains the first sentences from the latest blog entries prominently displayed in the center column. He then uses a very condensed format of asides, with just a link to the services he uses, and then a link to a separate page titled Asides, also linked from the top of the page. The Asides page itself looks very good and readable. One column with bookmarks from Delicious, one column with tweets from Twitter, and a third column with thumbnails from Flickr and Upcoming events below those.

Great idea, might steal it.

dooce has a two-column layout with Twitter and Flickr items in the sidebar. Classic blog layout, not much else to say about it. Still looking great though.

It started with Zeldman, so it might as well end there too. He has the two-column layout with a note on where he will be speaking (hey, offline thought streams counts too), a single tweet and a list of the recent entries in the sidebar.

Time to think it over. I’ll probably think by sketching out a new layout for the site. Tends to end up that way when I think design.

3 Comments

Reconsidering Blogging

For some reason I have immense problems writing bloggy stuff while sitting at my desk. So I grabbed my laptop and sat down in the couch and promptly got a strong urge to fall asleep. The comfy couch strikes again! But before I collapse I’ll try to squeeze out an actual blog entry.

The ten entries currently on the front page stretch back a year. The entry before this one was written six months ago. That’s… not really a good update frequency. So for the last week or so I’ve been reconsidering the whole format for this site.

Continue Reading »

No Comments

Lost

When the last 10 posts on your blog spans nearly a full year it’s about time to rethink the whole blogging thing.

Still stuck in southern Sweden. Still doing pretty much nothing at all. Except for playing World of Warcraft. Today it’s new year’s eve, and I treat it like I treat it every year: I ignore it completely.

My sister gave me the first season of Lost for Christmas. Two days later I saw the last episode. 30 minutes later I came home with the second season. The plot pacing is a bit slow, but half the enjoyment is to see the flashbacks and discover how people were before they crashed on the island.

I think I’m going to abandon WordPress and try Mephisto instead. While WP has served me well, the jungle of plugins I need to update annoys me. And I really don’t like the theme format.

No Comments

A Minor Confession

I don’t like the verb “blog.” Actually, I kind of hate it. I despise sentences like “I blogged about this or that.”

But then I thought to myself, “Self, what is it you’re doing here if it’s not blogging?”

Well, I feel like I’m going the same thing I’ve done since 1995 or so, only some people now call it blogging. I still call it writing. This is a blog, but I write on it.

I like words. One might even say I’m a big fan of them, both the words themselves and their visual representation. Typography is how I got interested in etymology. Sadly, blog turned into a hyped-up overused word that started to replace the already perfectly good word write.

1 Comment

NewsGator

As another attempt at decentralizing stuff I tend to do at more than one computer (I recently switched from Thunderbird to Gmail, despite having a very fine IMAP server available), I’ve now started using NewsGator to read most of my feeds.

I use FeedDemon on the laptop. I could easily install it on my stationary machine as well, but then we have the problem of feeds appearing as unread on both machines.

NewsGator has since bought FeedDemon, and will integrate them later — things I read in FeedDemon get flagged as read in NewsGator, and vice versa. I have a few issues with the NewsGator interface — a few changes could make it so much easier to use — but no major gripes.

Also, am I a geek when I put my compilation of World of Warcraft plugins in a Subversion repository so I can check them out someplace else?

1 Comment

I should really stop doing this

The change should have been completely transparent and invisible to you, so here’s the info: I’m running WordPress now.

So that’s the fourth time I’ve switched blog CMS this year. Movable Type → WordPress → Textpattern → MT again → WordPress.

The main reason for switching is that the comment spam problem for Movable Type has become completely unbearable. It can quite literally kill a server. MT-Blacklist helps, but has a flaw that allows some comment spam to pass right through it.

And then there’s the whole “rebuild on every comment” aspect. If MT gets hit with 50 spams in 10 seconds, that’s 50 mt-comments.cgi processes that are all rebuilding a page. Sometimes the same page.

The TextDrive servers can easily push 20,000,000 hits per day. Yet mt-comments.cgi can effectively push the server load up into the 300s. This data speaks for itself — 94% of the hits are to mt-comments.cgi. 3-400 of them are proper comments, the rest is spam.

WordPress and Textdrive are dynamic. There’s no page to generate every time a comment hits.

I still get spam, though. Spammers monitor web services like Weblogs.com and go spam them as soon as they see an updated blog there. I get some spam every time I write a new entry.

Enter Spam Karma. So far it’s stopped spam dead in its tracks, and this far more CPU efficient than MT-Blacklist. It works great, and the focus is to require as little interaction as possible from the blog owner.

In closing, WordPress has matured immensely since I last tried it. This will be my weapon of choice for quite some time now.

8 Comments

Twelve easy steps

Today I read my first feed in a long while. I’ve been clean otherwise. I just kicked the habit when I switched from Windows to Linux, mainly due to the fact that all available feed readers for Linux suck.

I thought I’d miss it, but I didn’t. I quit, cold turkey.

Now that I’m back on Windows again (mostly because I missed a couple of games) I re-installed FeedDemon and eyed a couple of the thousands of accumulated headlines, but I marked most of them as read without reading them. Not very interesting stuff to read.

There are a rare few sites that I always read, though. Expect me to sniff around and make a whole bunch of comments on your latest entries.

Also, it only took two weeks from reinstalling Movable Type to getting hit by comment spam.

No Comments

No longer fair and balanced

It appears that Fox gave up the fight concerning their stated ownage of the phrase “fair and balanced.” Good riddance.

Googling for the phrase lists Fox News as number one, but the rest of the hits on the first page appears to be blogs. Good work, grassroots!

No Comments