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

  • 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 […]

  • Windows Azure Active Directory – CRUD for users and groups

      Windows Azure Active Directory? If you are not informed about the subject I recommend you to have a look on this Azure Info site. Which resources are there? The Azure AD contains the following entities: - Users - Groups - Contacts - Roles Access to the directory or on the “directory graph” Although the […]

  • Introduction into SignalR 2.0 & Azure Website Websockets

      SignalR is an Open Source Framework for Real Time WebApps. The main problem with Real-Time in the web is the canal between Browser and Server. If you never had to deal with SignalR and this problem before here is a brief introduction:   The problem Traditionally the browser initiates the request to the server […]

Support us