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.
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
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:
Enter the destination address and set the state on “Permanent (301)”.
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
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?