I’ve long deplored the “www.” prefix for my websites. There’s very little point in it existing these days, unless you’re actually pointing to a server that goes by the name of “www.[domain name].[top level domain]”. I generally eschew the prefix whenever I can, although I’m by no means as much of a stickler as the No WWW folks. I do endeavor to keep LB a “Class B”-level site. (See the No WWW site for definitions and philosophies in re: “www.” issues.)
However, due to the way that my hosting company configures things and the way that WordPress tends to handle requests, requests to http://literalbarrage.org were often incorrectly (and maddeningly) rerouted to http://www.literalbarrage.org. There are several ways to address this issue, primarily by means of scripting or clever redirects in general cases. WordPress users, though, are afforded an additional line of defense against the accursed Triple Dub via several useful plugins.
After some careful searching, I recently deployed Scott Yang’s Permalink Redirect and Mark Jaquith’s Kill www., Kill index.php plugins. The combination of the two has given me exactly what I was looking for.
By default, WordPress uses some .htaccess trickery to create user-friendly URLs for entries, archives, pages, etc., so that instead of seeing “/blog/index.php?p=1379”, readers are shown the much nicer “/blog/archives/2005/08/31/100-of-your-daily-dose-of-chuckles/”. However, WP will respond with the same content regardless of whether you enter “/blog/archives/2005/08/31/100-of-your-daily-dose-of-chuckles/” or “/blog/archives/2005/08/31/100-of-your-daily-dose-of-chuckles”. Note the missing trailing “/” on the second URL? It might not seem like such a big deal to a regular reader, but to a search engine, the two URLs are different entities, meaning that any given post has a likelihood of having as little as half as good of a page ranking on Google, depending on which URL (“/” or “no /”) others link to. As you can see, if you’re concerned about exposure for your site via search engine hits, this is a situation you’d like to avoid. Scott’s plugin ensures that, to browsers and search engines alike, all such links will be enforced according to a single overriding rule, whether it be “/” or “no /” (I abide by “/”).
By default, webservers will treat “/” and “/index.php” as the same request, yet as you can see, such a circumstance will result in a similar quandry as that stated above. Mark’s plugin is dual purpose in that it will strictly enforce “no www.” and “no index.php”.
My thanks go out to both of them for making my life easier. I know it’s very pedantic and very geeky of me to even be bothered by such trivia, but such is life.