: Trailing slash dups My short research on trailing slashes duplicate On page issues, covers only the dir & dir/ cases. But what about the /file.html & /file.html/. Are they acceptable both
My short research on trailing slashes duplicate On page issues, covers only the dir & dir/ cases.
But what about the /file.html & /file.html/.
Are they acceptable both or one of them should be redirected?
More posts by @Merenda212
2 Comments
Sorted by latest first Latest Oldest Best
Regardless of what you are linking to (physical directory, file or something entirely virtual), the URL with and without a trailing slash are two different URLs, so ideally they should be canonicalised.
These are two different URLs and could potentially return different content:
example.com/<whatever>
example.com/<whatever>/
As GrapeSoda suggests, whether you use trailing slashes or not on your URLs is largely down to personal preference. However (on Apache) when referencing a physical directory then a trailing slash is required in order to correctly serve the directory index.
You should always have 1 version of the page to prevent duplicate content being flagged.
People structure their URL's differently, some people never have trailing slashes, some always have trailing slashes and some only have trailing slashes on directories and non on files. I believe the last option is to do with a slight improvement to server speed (will need to look this up further)
Make sure you always use a canonical or a 301 redirect and be consistent.
Terms of Use Create Support ticket Your support tickets Stock Market News! © vmapp.org2025 All Rights reserved.