Avoid „Duplicate Content“ with IIS7 – Domain with or without www

If you are the owner of a domain like “foobar.de” you need to make a decision: with or without www?

With or without www?

It’s not so easy to find an answer to this question. I prefer the www option because it’s possible to set a C-Name for a “www” Subdomain. The C-Name is important if you want to run your own Web application on you own Domain on Windows Azure.

I found two more articles about this subject but they are a little bit older.

Important: you need to decide!

If the website is addressable with and without www then Google will evaluate the Content as “double” – the result will be negative for the search engine Google optimization.

What’s the easiest way to reach this wit IIS

image1394Our blog for example is meant to be addressable with the non-www option so I’ve created the “Code Inside” side. Code-inside.de is the only address the side will react on.

The other side www.code-inside.de will only react on the www-option.

 

 

 

Redirect in IIS

There is a very simple way to create a redirect in IIS:

image

Enter the destination address and set the state on “Permanent (301)”.

image

This way will work but maybe you will have many “Dummy” sides in IIS only for the Redirects. But at least it’s very easy and it works – for me Zwinkerndes Smiley

Other options: with web.config

Of course there are some other possibilities like for example there are some interesting ways in IIS with Rewrite Rules. To say the true: I didn’t work with this so far. Maybe someone knows the suitable Snippet for the transmission from www to non-www? Smiley mit geöffnetem Mund

If you enjoyed this post, please consider leaving a comment or subscribing to the RSS feed to have future articles delivered to your feed reader.

About the author

Written by

Learn more about our team.

2 Responses

  1. I use this in my web.config:

    Reply
  2. This is the appropriate blog for anyone who needs to search out out about this topic. You notice a lot its almost onerous to argue with you (not that I actually would want…HaHa). You undoubtedly put a brand new spin on a topic thats been written about for years. Nice stuff, simply great!

    Reply

Comment on this post

Recent Posts

  • image2021-570x194_thumb.png
    HowTo: Create RSS Feeds with ASP.NET MVC

    I’ve already written about how to consume RSS or Atom Feeds with the SyndicationFeed (in German, sry) but todays post is about how to create or publish an own feed. Beside the age of the feed standard and the much defamation from Facebook, Twitter and Google on RSS/Atom I consider this easy to consume API […]

  • image1997-311x194_thumb.png
    How to access an Azure Website with the local IIS Manager

    Since the end of February it is possible to access an Azure Website with the IIS Manager. Although the Azure Management site offers some information there are more details visible at the IIS Manager. For the connection you will need an IIS Manager and the IIS Manager for Remote Administration Extension. It’s also possible to […]

  • image1929-570x143_thumb.png
    Create and validate own Json-Web-Tokens (JWTs)

    If you are interested in web authentication you probably have heard about JSON Web tokens (JWT). What is a JWT? Maybe I’m not using the correct security termination but however: JWTs are used to exchange claims between two systems. For example: You want to log on to a service (like Facebook, Twitter, etc.) and want […]

  • Micro-Optimization: how to shrink or „embed“ pictures

      I’m currently working on the “CodeInside Dashboard” and since the page structure isn’t that difficult it should be possible to fulfill all of Google Pagespeed or Yahoos YSlow recommendations. One of the rules was to optimize the 4 PNGs that are embedded on the page.   Before – without optimization: Below you can see […]

  • image1979-570x194.png
    Move to Windows Azure – VMs, Word Press Migration, DNS changes

    Since mid January this blogs runs on a WordPress installation in an Azure VM. Because I always thought that the subject is quite complicated this blogpost offers a view behind the scenes. Why this move? So far this blog (both German and English Version) runs on a hoster somewhere in Germany. The main problem with this […]

Support us