Mobile app version of vmapp.org
Login or Join
Merenda212

: 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

@Merenda212

Posted in: #DuplicateContent #TrailingSlash

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?

10.02% popularity Vote Up Vote Down


Login to follow query

More posts by @Merenda212

2 Comments

Sorted by latest first Latest Oldest Best

 

@Ann8826881

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.

10% popularity Vote Up Vote Down


 

@Barnes591

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.

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme