Dynamicweb module that prevents dublicate content

Introduction to the problem

The main problem in Dynamicweb that this module deal correctly with is when you have a multiple websites in your solution but only one domain name.

In Dynamicweb you have a few settings that should be inplace to minimize dublicate content these settings are explained here http://nicolaipedersen.com/blog/2011/11/dynamicweb-and-duplicate-content.aspx in more detail but your control panel should look like this

Note 1)

When having a multiple websites you can this setting make som nice sub-folder structure when name you websites “da”, “en”, “de”, “se”, “no” etc.

Your websites will be separated with /da, /en, /de, /se, /no but we face another problem with URL guessing and bookmarking. You can just access the website with www.example.com/da/ but the module takes care of that :)

Note 2)

Especially remember to replace / (slash) with dash. If you have a page named “Goodies / Downloads” your indexing of your website goes in an inifite loop because the relative URL generating goes deeper and deeper.

Note 3)

If you don’t have e-commerce on your site you can avoid Canonical link in meta together with this module.

Main problem

The problem today is that a website can have multiple domains associated with it example.com, www.example.com, eksempel.dk, www.eksempel.dk etc. Dynamicweb deals with this to a certain point, because you can set a primary domain for a given website, to follow that convention, you need a dedicated unique domain for each website you have in your solution!


International website Primary domain: www.example.com
Danish website primary domain: www.eksempel.dk

This module comes into play when you don’t have or want a specific dedicated domain name for each website in your solution, so how does the module deal with this, lets dive into it.

The module explained

1’st we hook into the process of handling request to Dynamicweb with the Notification Subscriber “Dynamicweb.Notifications.Standard.Application.BeginRequest”.
The module test various stuff to determine if modul should even handle the request at all, like if the request goes to /admin  etc.

2’nd it test to see if the request is on a different domain than the one that is set as THE domain for the whole solution, if the request is on a domain different we step into analyzing the request.

3’rd it goes into test configuration setting to determine how the redirect URL should look like which depends on your settings inside the Customized URL Control Panel (see above).

4’th is does the proper redirect to the requested page BUT on THE domain you have set in the module as the SINGLE primary domain for the solution.


You have two websites in your solution:

Website 1: English version named “en”
Website 2: Danish version named “da”
You only have one domain name: www.example.com to run both websites so you set www.example.com domain on the English website so that the user startpage is the first page on the English version and you add it as the primary domian.

Now everything is great for the English version no pages in that website can be access by any other domain except for the primary domain. But the pages on the danish version can!!!

Now you tell this module to enable its “SingleDomainHandling” on www.example.com and now you get 301 redirects on any page request in the solution on a domain that is different from www.example.com.

The module has also support for redirecting to the proper page based on the requested domain name if that domain name is associated with the website.


You have three websites and only two domains but you want everything to be browser on your single primary domain www.example.com:

Website 1: English version named “en”
Website 2: Danish version named “da”
Website 3: German version named “de”

Website 1 is associated with www.example.com and example.com
Website 2 is associated with www.eksempel.dk and eksempel.dk
Website 3 is associated with www.beispiel.de and beispiel.de

Your goal is to have this URL structure:

www.example.com/ (English website)
www.example.com/da/<pagename>.aspx (Danish website)
www. example.com/de/<pagename>.aspx (German website)

If you make a request to www.beispiel.de/de/<pagename>.aspx you a 301 redirected to the found page but on your single primary domain to www.example.com/de/<pagename>.aspx. However if you just type www.beispiel.de then the module finds the website in your solution and redirects to the websites firstpage which could be www.example.com/de/Home.aspx

That’s it – a great solid and fast module for preventing dublicate content on Dynamicweb solutions with multiple website but fewer domain names.

I don’t have a download for you because I think it should be part of the Dynamicweb core, but I have not taken the dialog with Dynamicweb yet – I know they are busy finishing up Dynamicweb 8 :)

But if you are in the situation where you could benefit from having this module – let me know.

What do you think about it?

, ,

Skriv et svar

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>