02 December 2011 Domain; IIS7 CI Team

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