CodeClerks

When using HTML, should i omit the final slash in a URL?



Write the reason you're deleting this FAQ

When using HTML, should i omit the final slash in a URL?

When a URL is added to HTML element, should I include or omit the / element at the end of a url. Such as when linking to internal pages, etc.

For instance: http://mysite.com/thispage.html/ versus http://mysite.com/thispage.html

Which one is correct?

Comments

Please login or sign up to leave a comment

Join
Unboxed
When a URL is added to HTML element, should I include or omit the / element at the end of a url. Such as when linking to internal pages, etc.

For instance: http://mysite.com/thispage.html/ versus http://mysite.com/thispage.html

Which one is correct?


Historically, it’s common for URLs with a trailing slash to indicate a directory, and those without a trailing slash to denote a file:
http://example.com/foo/ (with trailing slash, conventionally a directory) http://example.com/foo (without trailing slash, conventionally a file)



Are you sure you want to delete this post?

jakemadness
If the website address has a file extension like .php, .htm, .html, .xml etc then I wouldn't use a trailing slash, but however I always use a trailing slash and www. on domains like www.seoclerks.com/ rather than seoclerks.com.
~Jake



Are you sure you want to delete this post?