1

so a website has the homepage URL with a trailing slash and without, both indexed by Google. e.g. domain.com and domain.com/

  1. The site owner runs into the duplicate content issue.
  2. It is easier for competitors to spam one of the URLs without getting noticed/hack.

I am sure about the first statement, does anyone have any thoughts regarding the second statement? Also I've heard that both of these URLs get indexed by Google, but has anyone actually seen it?

MrWhite
  • 42,784
  • 4
  • 49
  • 90
Trini
  • 11
  • 1
  • Many web servers add the trailing slash automatically. Apache, for example, should by default but not installs have this enabled although most do. You can test this yourself. It is something you do want to enable. As for hackers, not sure where you are getting this information, but it sounds like bad information to me. With or without the slash, makes no difference to a hacker or the ability to get into a system or the ability to be detected. – closetnoc Oct 07 '15 at 23:04
  • 2
    It sounds like you are stating (as a fact) that domain.com and domain.com/ are both indexed? Yet you are asking whether this is true in your last sentence? The fact is that domain.com and domain.com/ are identical and could not possibly result in duplicate content. See: http://webmasters.stackexchange.com/a/35646/1243 – MrWhite Oct 08 '15 at 00:05
  • 2
    @closetnoc It's the browser that appends the trailing slash to the domain part of the URL, not the server - which is required in order to make a valid request (even if it's not explicitly shown in the address bar). (This is different to when a trailing slash is appended to an existing directory in the URL-path - yes, that is added by the server - mod_dir on Apache.) – MrWhite Oct 08 '15 at 00:17
  • Not sure what you mean by #2? But given that these URLs are in fact the same, the short answer would appear to be "no". – MrWhite Oct 08 '15 at 00:21
  • @w3d Otay. (remember that?? I do anyway.) I thought that the mod_dir also did this to make a root directory request. Thanks!! – closetnoc Oct 08 '15 at 00:22
  • 1
    @w3d BTW- I do appreciate your input on these things. I have been sorta out of this field for a long time except for wee bit I do these days. It is good to get fresh eyes on what I am putting out. I really do appreciate it. Honest!! – closetnoc Oct 08 '15 at 00:24
  • @w3d thank you for your input. From further investigation it was clear that the web server was adding the slash automatically. About the indexing part, that's the thing we didn't see them both indexed. However the website's developer was going crazy over this question. We saw other posts where people were stating that their pages were both indexed, but we have never seen this ourselves. Same with hacking, I don't see how this could make it easier for the site to be hacked. The only possibilty is that one of these links will get spammy backlinks and this will go unnoticed. Highly unlikely. – Trini Oct 09 '15 at 11:09
  • "it was clear that the web server was adding the slash" - to be clear, it is the browser that adds the slash in this instance, not the server (as I mentioned in my comment above). Note that this is the slash on the end of the domain (the start of the URL-path). Not the slash on the end of the URL-path eg. domain.com/file/ - this is very different - as Stephen mentions in his answer. – MrWhite Oct 09 '15 at 11:26
  • @w3d seriously thanks) I think I've got the hang of it. Yes, that was the thing that I've finally understood regarding domain.com/ and domain.com/file/ being different things. – Trini Oct 14 '15 at 10:42

1 Answers1

2

For the home page of a domain name, it is not possible to cause duplicate content due to the presence or absence of a trailing slash. That is because the trailing slash is implicitly added by any browser or crawler when a request for the home page is made. It is not possible to make a request for the domain home page without a trailing slash. See: Is trailing slash automagically added on click of home page URL in browser?

Search engines (including Google) know that the domain home page slash is required and would never index the two versions separately.

For folders, it is a different story. /folder and /folder/ can be two different URLs with different content. Serving the same content at both URLs can result in duplicate content. Similarly, the home page URL can have problems when serving the same content as / and /index.html.

That being said, Google is much better about handling those common server configuration duplicate content cases than it used to be. Google almost never indexes two URLs with the same content. It picks one and indexes just one. It appears that Google may even combine link juice from external links, so there is no link juice is lost.

In any case, duplicating content on a handful of URLs within your own site is never going to cause penalties. At the worst, Google will pick a URL to put in the results that is not the one that you prefer.

I don't know of any way that spammers can take advantage of duplicate content on similar URLs within your own site.

For more information see: What is duplicate content and how can I avoid being penalized for it on my site?

Stephen Ostermiller
  • 98,758
  • 18
  • 137
  • 361
  • @Stephen-Osermiller thanks a million for your reply! The part about the homepage we saw in Google's article, but still weren't 100% sure as the website's developer was going nuts. However, we did thorough checking and found out that it was a false alert about indexing, well at least in this case. The only thing we got wrong in the end was the part about link juice, but hoping that Google does combine it. I've understood from reading Google's guidelines that there might be rare cases when a webiste might get thrown down from the positions its holding. But that's about it. – Trini Oct 09 '15 at 11:16