Note that there are some explanatory texts on larger screens.

plurals
  1. POHow can I avoid duplicate content in ASP.NET MVC due to case-insensitive URLs and defaults?
    text
    copied!<blockquote> <p><strong>Edit</strong>: Now I need to solve this problem for real, I did a little more investigation and came up with a number of things to reduce duplicate content. I posted detailed code samples on my blog: <a href="http://blog.dantup.me.uk/2009/04/reducing-duplicate-content-with-aspnet.html" rel="noreferrer">Reducing Duplicate Content with ASP.NET MVC</a></p> </blockquote> <p>First post - go easy if I've marked this up wrong or tagged it badly :P</p> <p>In Microsoft's new ASP.NET MVC framework it seems there are two things that could cause your content to be served up at multiple URLs (something which Google penalize for and will cause your PageRank to be split across them):</p> <ul> <li>Case-insensitive URLs</li> <li>Default URL</li> </ul> <p>You can set the default controller/action to serve up for requests to the root of your domain. Let's say we choose HomeController/Index. We end up with the following URLs serving up the same content:</p> <ul> <li>mydomain.com/</li> <li>mydomain.com/Home/Index</li> </ul> <p>Now if people start linking to both of these then PageRank would be split. Google would also consider it duplicate content and penalize one of them to avoid duplicates in their results.</p> <p>On top of this, the URLs are not case sensitive, so we actually get the same content for these URLs too:</p> <ul> <li>mydomain.com/Home/Index</li> <li>mydomain.com/home/index</li> <li>mydomain.com/Home/index</li> <li>mydomain.com/home/Index</li> <li>(the list goes on)</li> </ul> <p>So, the question... How do I avoid these penalties? I would like:</p> <ul> <li>All requests for the default action to be redirected (301 status) to the same url</li> <li>All URLs to be case sensitive</li> </ul> <p>Possible?</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload