Forum Moderators: open

Message Too Old, No Replies

Upper and lower case used in urls - what to do?

Google has indexed some pages twice

         

FranticFish

11:45 am on Nov 18, 2010 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Hi all, I'm used to PHP/Linux and I'm just looking at the optimisation of a site built with an ASP.net CMS. The system allows upper case to be used in urls and as a result lower and upper case have both been used to name folders and files; the result is that Google has managed to index Folder/some-pages as well as folder/some-pages and so there is duplication.

I'd like to clear this up, but have no idea what to recommend the developers do or a direction to point them in to find a solution.

One possible idea was to get only one version of each url to be 'valid' and the others return a 404, then use WMT to remove the 404s (that is of course if Google will recognise the difference between upper and lower case) and wait for Google to reindex.

Because IIS (at least in this case) allows you to type /a-FolDer/A-PaGe.aspx for example not sure how to go about this.

Or perhaps there an IIS module that deals with this? Something that knows the correct lower case url and forces a 301 to it from any urls with upper case in them?

Anyone come across this before?

Ocean10000

3:09 pm on Nov 18, 2010 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



I have done similar. In my module that handles rewriting urls. I have it do two lookups one case insensitive, and one that is case sensitive. If the case sensitive failes it does the perm redirect to the proper case one.

FranticFish

4:59 pm on Nov 18, 2010 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Thanks for your reply. To be clear, does that mean then once the module is installed we can

(a) change urls to lower case and check that all links within site are lower case, then
(b) configure the module in IIS to force a 301 to these new urls, whatever combination of upper and lower case is requested?

Finally what version of IIS are you using and is this a built in module or a third party solution?

dstiles

8:52 pm on Nov 18, 2010 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Do that AND use the canonical meta tag to force (preferably) lower case on all URLs. Lots of info elsewhere (eg google forums) on WebmasterWorld on this tag.

Ocean10000

9:53 pm on Nov 18, 2010 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



The System I referenced is a custom rewrite module used as part of a content management system (CMS). In the website I was describing, there are no file system folders other then the root for the website. So all requests passed to the rewrite module.

URL Rewrite module for IIS7 I believe once setup can remap the urls as needed and do what you want, provided you setup the rules to make it happen.

URL Rewrite module - Documentation [learn.iis.net]

FranticFish

10:16 am on Nov 19, 2010 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



@dstiles - I didn't realise you could use the canonical tag for this, great idea, thanks.

@Ocean10000 - thanks for both your replies, I'll check out the documentation.

I'll definitely get both solutions implemented if I can - belt and braces!

phranque

9:55 am on Nov 28, 2010 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



a solution using ISAPI_Rewrite ...

IIS flaw allows others to create dup content:
http://www.webmasterworld.com/microsoft_asp_net/3415232.htm#msg3415933 [webmasterworld.com]