find a location for property in a new city

Wednesday 23 February 2011

SEO Redirecting URLs to lowercase excluding static files

As you may know Google treats different cased URLs as different URL entirely. If they find both cases they will judge this as duplicate content so it is a good idea to redirect requests for a URL containing uppercase to lowercase.

This is made easy with the URL Rewriting Module 2.0. You can use the "Enforce lowercase URLs" template to do most of the work for you.

This will create a pattern match of [A-Z] (as in if there is even one capital in the URL) it will 301 redirect to {ToLower:{URL}} which is fairly obvious what it does.

What about static resources files?

You don't really want these redirects to happen since you don't really want search engines to index them so it takes up needless resource. Also, for my particular set up it fails to send them (some sort of weird, secure + load balanced + redirecting issue).

  1. Open the Conditions section of your lowercase redirect rule and click Add...
  2. Set Condition input to {URL} (which doesn't look at any querystrings).
  3. Set Check if input string to Does Not Match the Pattern
  4. Change the Pattern field to one that suits you. I have used ^.+\.(axd|gif|jpg|jpeg|png|css|js|svc|ashx)$ since I do not what files with these extension redirected. You may have more. Or less
  5. Ignore case should be checked
  6. Click OK and Apply your new rule

Your site should now send www.mysite.com/Home/Index to www.mysite.com/home/index with a permanent 301 redirect and leave www.mysite.com/WebResource.axd alone.

Follow britishdev on Twitter

11 comments:

  1. nice post for SEO problems. Awesome work you have done here, I am very happy to read this nice post. You are a great writer and give us much information.
    Dissertation Writing Service

    ReplyDelete
  2. Not long ago i stumbled on your site and possess already been reading together. We considered I would abandon my personal initial comment. When i don’t determine what to mention with the exception of i have got relished reading through. Good web site, I'll keep visiting this website frequently All In One Seo Backlinks To Rank You In 5$

    ReplyDelete
  3. Nice Blog.Thank you for Sharing. We are leading erp software software solution providers in chennai. For more details call +91 9677025199. erp software in chennai | erp providers in chennai | online events registration

    ReplyDelete
  4. Thank you a bunch for sharing this with all of us you actually realize what you are talking about! Bookmarked. Please also seek advice from my site =). We could have a hyperlink change contract between us! Affordable seo

    ReplyDelete
  5. I should refer to a debt of gratitude is in order for sharing such indispensable data. Website design enhancement have constantly assumed an extraordinary job in computerized advertising, this point has truly affected me for improving. SEO Agency Singapore, SEO for Dentist

    ReplyDelete
  6. Very interesting blog. Alot of blogs I see these days don't really provide anything that I'm interested in, but I'm most definately interested in this one. Just thought that I would post and let you know. Power Full Seo

    ReplyDelete
  7. New web site is looking good. Thanks for the great effort. Blog Comment

    ReplyDelete
  8. Thank you for sharing these insights. An effective SEO strategy can do wonders from staying ahead of competitors to driving traffic. As a fellow SEO Agency in Hartlepool, UK, I am glad to come across this. Keep sharing your valuable knowledge and experience. Great blog.

    ReplyDelete