Mobile app version of vmapp.org
Login or Join

Login to follow query

More posts by @Sarah324

4 Comments

Sorted by latest first Latest Oldest Best

 

@Heady270

There is one case in which a trailing slash will help with search engine optimization (SEO). That is the case that your document has what appears to be a file extension that is not .html. This becomes an issue with sites that are rating websites. They might choose between these two urls:

mysite.example.com/rated.example.com http://mysite.example.com/rated.example.com/


In such a case, I would choose the one with the trailing slash. That is because the .com extension is an extension for Windows executable command files. Search engines and virus checkers often dislike URLs that appear that they may contain malware distributed through such mechanisms. The trailing slash seems to mitigate any concerns, allowing the page to rank in search engines and get by virus checkers.

If your URLs have no . in the file portion, then I would recommend omitting the trailing slash for simplicity.

(This is the same answer I posted on StackOverflow)

10% popularity Vote Up Vote Down


 

@Gonzalez347

URL's with and without slashes are treated as two different URL's. Its absolutely essential that you fix this to avoid duplicate content problems. Generally, this affects the whole site, as every page has a duplicate.


Standardize site wide URL's
Use 301 redirects or canonicalization to fix URL's
Do an internal link audit to make sure there are no unnecessary redirects and all internal links point to standardized URL's.
You may also check external links. Ideally they too should point to standardized URL's.


See rankings improve.

10% popularity Vote Up Vote Down


 

@Deb1703797

In addition to RandomBen's point about search engines treating URLs with a trailing slash versus without as two different URLs, I'd like to add this. I generally use the trailing slash to indicate a category, while I don't use a trailing slash for pages that are at the end or bottom of a hierarchy. Slash your categories, don't slash anything else. If you're rewriting URLs, this most closely matches the natural file structure. However, you should make sure that each category in your path exists, or you could end up with some confused and frustrated users. In your example URL, "some" and "slug" should both be accessible pages.

10% popularity Vote Up Vote Down


 

@Welton855

Read the full blog post by Google here, googlewebmastercentral.blogspot.com/2010/04/to-slash-or-not-to-slash.html, it covers this exact topic.

Long story short Google does not care if you have a trailing slash. However, it will treat the below 2 paths as separate pages.
www.example.com/some/slug/paths/ http://www.example.com/some/slug/paths


If you need to have both of the above and they are the same content your best option is to do a 301 Redirect to one of them from the other.

If that isn't an option you will want to add a <link rel="canonical" href="your link"/> to both pages which will define which one is the master or parent. Matt Cutts has a great article here, www.mattcutts.com/blog/canonical-link-tag/, that covers the topic in its entirety.

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme