30th August 2008 : SEO

Back in 2004, FiftyFourEleven.com published an article that concludes with a question: 'what is right and what is wrong?' with regard to the trailing slash. In a rather comical way, the writer appears utterly bamboozled by Yahoo! and Google's opposing approaches to the revered trailing slash. Reading the article, I could imagine his anguish...
"Yahoo does", he whimpers, sitting on the cold concrete floor of the darkened cellar, arms clasped tightly around his legs, pulling them in whilst shaking violently from head to toe, a cold sweat dripping down his forehead, "but...but...Google doesn't". His shaking intensifies, veins bulging from his forehead as he screams, "aaaaaaaaaarrrrrrrrrrrrrggggggggggghhhhhhhhhhhhhhhhhhhhhhh!!!!!!!!!!!!!!!!!!!!!!!!!!!!!".
This guy appears to be in need of some closure.
The answer is that as long as you're in control of your own website, it doesn't make any difference, it's an aesthetic concern and therefore a matter of taste.
In other words...outside of OCD World, there really is no right or wrong answer. Nothing external to your web server on the internet gives a flying monkey one way or the other. As long as your website is available when someone navigates to one of your URLs, rather than sending back a server error message, the search engines are not going to care one little bit.
Your web server cares, however. It cares a lot. As long as your .htaccess file is appropriately configured however, it's just down to you.
The configuration of the .htaccess file can be a major headache, especially if you approach it with the attitude, ".htaccess files are voodoo. They are controlled by magic. You must be called Merlin and have sleeves like the genitals of an overworked aging harlot in order to understand the mysterious workings of the Rewrite Rule."
But this needn't be the case. Anyone with a working knowledge of PHP, JavaScript or another scripting language has all the skills necessary to construct a .htaccess file to cover all eventualities.
Eventualities - it is these you need to understand. I believe the real secret to being good at anything in life is simply understandfing the desired outcome - how do you want it to turn out? Learning how to make something behave the way you want is about asking the right questions, and that's probably how you found this article.
We'll begin by returning to one of my original questions.
Web servers are a funny bunch.
Everything concerning the URLs of your website's pages should be addressed in the .htaccess file, using the dark art of URL Rewriting, which is made possible by mod_rewrite - the Apache web server extension module that is already installed on most well-configured Apache web servers.
In the Apache.org URL Rewriting Guide, Ralf S. Engelschall states "mod_rewrite major drawback is that it is not easy to understand and use for the beginner."
At least they are not in denial over at Apache HQ.
He goes on to call URL rewriting "black magic" - and he's supposed to be the expert!
Returning to our tortured soul sitting in the corner of the room, what do the all-seeing search engines have to say on the matter?
Funnily enough, they don't seem to agree. Even more funnilyer* enough, that annoying know-it-all Google is the only one with a solution based on reality. Perhaps all of the confusion about the trailing slash stems from Yahoo! and Microsoft's refusal to index the trailing slash on any URL. Google, however, is the only one of the three that simply gives you the URL As. It. Is.
Contrary to what our bewildered writer from FiftyFourEleven.com would have you believe, Google is not on any side of this debate. To Slash Or Not To Slash? Google cares not.
What this topic does highlight however, is that Yahoo! and MSN do not display the true URL!
Try looking for the Financial Times Technology section with a search for 'ft technology':
http://www.google.co.uk/search?q=ft+technology
http://search.yahoo.com/search?p=ft+technology
http://search.live.com/results.aspx?q=ft+technology
Microsoft and Yahoo! return www.ft.com/technology
Google returns www.ft.com/technology
The Actual URL is http://www.ft.com/technology
All agree. Great stuff.
Try a search for BBC Science on all three search engines
http://www.google.co.uk/search?q=bbc+science
http://search.yahoo.com/search?p=bbc+science
http://search.live.com/results.aspx?q=bbc+science
Microsoft and Yahoo! return www.bbc.co.uk/sn
Google returns www.bbc.co.uk/sn/
The Actual URL is http://www.bbc.co.uk/sn/
You can see for yourself that Microsoft and Yahoo! actively remove any trailing slashes, therefore 'standardising' the display URLs, whilst Google simply gives you the actual URL.
Does it matter? I think it does. Thinking about how web servers react to the trailing slash, it's quite a big deal - for millions of websites, the URL displayed in Microsoft and Yahoo! search results could actually lead to a 404 error!
Spending some time getting your .htaccess file correct is crucial. It's the first line of defence between your website, and the unceasing stream of incoming traffic. You never know, they may have seen your web address displayed within the Yahoo! search results, wrote it down, and are now typing it into their address bar...are you ready?
* For those OCD sufferers that have been emailing me, yes, I know that's not a word.
Comments
JamesSC (31-08-2008)
Great article, although I'm stuck with using a Microsoft web server running IIS, so I cannot use .htaccess files. I've looked at ISAPI rewrite, but it's not free - do you know of any alternatives?
Group Mind (31-08-2008)
The ISAPI rewrite tool available from Helicon has a 'lite' version that's free. For most tasks (including those listed above) this is more than capable and most rewrite rules can be copied straight from the Apache mod_rewrite version into ISAPI rewrite.