To Slash or Not to Slash. That’s A Server Header Question
By Richard V. Burckhardt
|
Uh, not that kind of slashing!
Let’s say you are setting up your keyword rich links to point to a subdirectory. Should the link point to:
http://www.somedomain.com/subdirectory or to http://www.somedomain.com/subdirectory/ with a “/” at the end?
Most new SEOs won’t know the difference, thinking that if it gets the visitor there, it works, right?
There is a problem with this thinking. Let me introduce you to checking server headers. To do this, I’ll use my favorite server header tool over at http://www.seoconsultants.com/tools/headers.asp . You just pop a URL in the field and you’ll get a page back telling you how it did. Here are some of the possible results:
200 OK - This means everything’s cool.
301 Moved Permanently – The URL you typed in is properly being redirected to a new location.
302 Found – This means your URL has temporarily been moved and found at the new location.
There are several other status indicators, but for the purpose of this article, we’ll concentrate on these three. Actually, your server header status can come back as a combination of these. For instance, if you have a good 301 redirect in place, you’ll first see a 301 Moved Permanently message and then a 200 OK message below it.

With a non-redirected page, you just want to see a 200 OK message when you enter any URL. As an example, if you do a server header check for http://www.weboptimist.com or http://www.weboptimist.com/ you’ll get a 200 OK for either.
But, that’s not always the case. Sometimes, particularly on Microsoft IIS web servers, what you will get back will be totally different when you check server headers with the “/” or without it. On such servers, what you can get is a 302 Object Moved message and then the 200 OK message when you check for the subdirectory URL without the “/” included. This means that the web server automatically 302 redirects the non-slashed URL to the slashed version.
This is not good and not particularly SEO friendly. Although there are good reasons to use a 302 redirect at times, it is meant to be used as a temporary redirect, not permanent. Web sites have been known to get into trouble with the search gods for using 302 redirects instead of the 301 permanent redirect and most link juice is said to be passed with a 301 redirect. Such is not the case with a 302 redirect, where no link juice is passed. Again, it is supposed to be temporary.
What can you do? First, check your URLs to see if you have this issue. If not, don’t sweat it, though I recommend that you stick with a standard way of writing your URLs -preferably with the “/” at the end – http://www.somedomain.com/subdirectory/. Pointing to exactly the same URL every time is always a good thing in SEO, not unlike the canonical issue with using www or not in a URL. It’s best to choose one and always use it. Don’t mix and match.
If you do find that your non-slashed subdirectory URLs are being 302 redirected, make a point of always, always, always, using the slash at the end. Do a link audit on your site and check for this type of link and change them so that they include the ending slash.
In the long run, you and your site’s SEO will be better off. Your links will be better focused without unwanted (and unexpected) 302 redirects in the way.
For a Spanish translation, see Cortar o no Cortar, esa es la Cuestión…del encabezado en el servidor.
Other Cool Stuff Online:
The Web Optimist LinkedIn | The Web Optimist Facebook | PCs | Computer Glasses

Link to this page




The only way to know if you have a problem is to check the server headers for your links. If they show a 200 OK, then you are good to go as long as you are consistent. If they show a 302 redirect, you’ll need to do some work as a 302 redirect passes no link juice.
Great advice . . . I’ve often wondered about whether it’s better to use trailing slashes in linkbuilding, but I have never seen anyone address it. I build all of my links without a trailing slash . . . I should be okay as long as I’m consistent, right?
Killer Campaigning´s last blog ..PayPal Political Campaign Donations: Online Fundraising & Contributions