Ad

Does The Fact That Every Page Is Reachable Through Www.example.com And Www.example.com/index Have Any SEO Impact?

- 1 answer

Our website is written in .NET MVC, where every page is reachable through the URLs www.example.com/whatever, as well as www.example.com/whatever/index (since the default action for every controller is called index). Does this have any SEO impact?

Is it possible to disable URLs with explicitly typed /index (and return a 404 for those)? Is this safe?

Should there be a redirect from www.example.com/whatever/index to www.example.com/whatever?

Ad

Answer

Yes this will have an impact on SEO. Search engines like Google do not like to see duplicated content.

I will state this it is unlikely that the /index will ever be found if you do not link to it anywhere. E.G. if you always use the www.example.com/whatever version then the www.example.com/whatever/index will not be discovered.

Yes you can disable the /index page and it is perfectly safe to do so. As long as you don't need to provide an id parameter on your routes.

As you suggest you could do a redirect from the /index to / is one solution. To do this I would probably use something like URL Rewrite in IIS. The rule would look something like this:

<rule name="RemoveTrailingSlashRule1" stopProcessing="true">
  <match url="(.*)/index$" />
  <conditions>
    <add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
    <add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
  </conditions>
  <action type="Redirect" url="{R:1}" />
</rule>

Myself, I would probably just use a canonical url and be done with it:

<html>
  <head>
    <link rel="canonical" target="_blank" rel="nofollow noreferrer" href="http://example.com/whatever" />
  </head>
<body>
Ad
source: stackoverflow.com
Ad