
<h1 align="center">Trailing Slashes</h1>
<ul>
  <li><a href="#whatis">What is a Trailing Slash?</a></li>
  <li><a href="#whateffect">What Effect Does Adding Them Have?</a> </li>
  <li><a href="#goback">So, Should I Go Back and Add Them to All the Sites in 
    My Category?</a></li>
  <li><a href="#exceptions">I Know of a URL That Behaves Differently to those 
    Examples; Doesn't That Prove You Wrong?</a></li>
  <li><a href="#seealso">See Also: </a></li>
</ul>
<p>A common source of confusion for newer editors is the humble trailing slash. 
  This short article attempts to address some misconceptions about it. </p>
<h2><a name="whatis"></a>What is a Trailing Slash?</h2>
<p> Put simply, it is a forward slash at the end of a URL. For example, the trailing 
  slashes in the following URLs are highlighted: </p>
<ul>
  <li><code>http://inelegant.org<b><font color="#FF0000">/</font></b> </code></li>
  <li><code>http://inelegant.org/ddp<b><font color="#FF0000">/</font></b> </code></li>
</ul>
<h2><a name="whateffect"></a>What Effect Does Adding Them Have? </h2>
<p>Depending on the context, they can either cause a URL to break, cause a URL 
  to work, or have no noticeable effect. Consider some typical examples: </p>
<ol>
  <li> URL: <a href="http://dmoz.org">http://dmoz.org</a> - adding the trailing 
    slash has no real effect, since all modern browsers will assume you want <a href="http://dmoz.org/">http://dmoz.org/ 
    </a>-- though this is not <i>technically</i> correct, it works. Adding it 
    doesn't hurt, and doesn't help. </li>
  <li>URL: <a href="http://dmoz.org/Computers">http://dmoz.org/Computers</a> - 
    adding the trailing slash ( <a href="http://dmoz.org/Computers/">http://dmoz.org/Computers/</a> 
    ) saves one connection over the net. Your browser connects to <code>dmoz.org</code> 
    and requests <code>/Computers</code>, the server replies that as the file 
    <code>Computers</code> doesn't exist, you want <code>/Computers/</code>, and 
    your browser requests <code>/Computers/</code>, and you get the page. This 
    is when it should be added. </li>
  <li> URL: <a href="http://dmoz.org/add.html">http://dmoz.org/add.html</a> - 
    adding the trailing slash ( <a href="http://dmoz.org/add.html/">http://dmoz.org/add.html/</a> 
    ) breaks the URL, since <code>/add.html</code> is a HTML file and the directory <code>/add.html/</code> does not exist. This should never be added. 
  </li>
  <li>URL: <a href="http://dmoz.org/cgi-bin/forgot.cgi?user=testing123">http://dmoz.org/cgi-bin/forgot.cgi?user=testing123</a> 
    - some CGI scripts will still function if you add a slash, even though they 
    don't need one. Adding it is pointless. </li>
</ol>
<h2><a name="goback"></a>So, Should I Go Back and Add Them to All the Sites in 
  My Category?</h2>
<p> <b>No</b>. Please do not do this. The main reason is that this task pales 
  in comparison with almost all others -- adding new sites, correcting defective 
  taxonomy, defining category's scope, etc. If you are editing a URL for some 
  other reason then by all means add a trailing slash (if applicable), but otherwise 
  this practice is discouraged. Seriously. </p>
<hr>
<b><img src="/ddp/i/161.gif" width="26" height="25">Warning: </b>Please, <b>always</b> 
ensure that URLs work after correcting them. Don't simply try to 'read' the URL; 
although common server configurations can lead to the appearances of 'standards', 
there will always be non-standard configurations in existence, as well. So, <i>please</i>, 
remember to double-check. 
<hr>
<h2><a name="exceptions"></a>I Know of a URL That Behaves Differently to those 
  Examples; Doesn't That Prove You Wrong?</h2>
<p> No. It proves the opposite, in fact; as I stated previously, "there will always 
  be non-standard configurations in existence". I am perfectly aware that there 
  are sites where: URLs of the form <code>http://example.com/foo</code> points 
  to a totally different resource than <code>http://example.com/foo/</code> does; 
  URLs such as <code>http://example.com/index.html/</code> refer to actual directories; 
  and URLs like <code>http://example.com/</code> reference different pages to 
  <code>http://example.com/index.html</code> . </p>
<p>This merely underlines the importance of <b>ensuring URLs work as expected 
  before adding them</b>. </p>
<h2><a name="seealso"></a>See Also: </h2>
<ul>
  <li><a href="/ddp/07005/">Redirecting URLs</a> - Explains what they are, why DMOZ 
    doesn't list them, and how to identify them.</li>
</ul>
