Trailing Slash Added to Directories Print

  • 0

All our shared web hosting servers automatically add a trailing slash to all requests to directories or directory-like requests. For example: will redirect to


The same logic applies to applications such as WordPress. For example: would redirect to


All our web hosting servers function as "DirectorySlash On," and you cannot modify their behavior. If you require a change in functionality, you would need one of our cloud computes to alter the behavior.


There are security and usability reasons for why this functions as it does on Litespeed/Apache:


  • The user is finally requesting that the canonical URL of the resource
  • mod_autoindex work correctly. Since it doesn't emit the path in the link, it would point to the wrong path.
  • DirectoryIndex will be evaluated only for directories requested with trailing slash.
  • Relative URL references inside html pages will work correctly.





Was this answer helpful?

« Back

Ready to get started? Build your site from