How to eliminate duplicate homepage content in DotNetNuke
I've been giving a little SEO love to dignuke.com lately, trying to make DotNetNuke friendly to search engines other than the usual page title, keywords and description which are all editable in the DotNetNuke page options.
I knew that through the eyes of the search engines I had duplicate content. Most notibly the Privacy Notice and TOS pages that appear as new pages for each DNN tab.
Step 1: Implement Human Friendly URL
In the web.config find the entry ..., and add humanFrield="Yes". This will eliminate the duplicate Privacy Notice and TOS pages by making them like to www.site.com/pricacy.aspx, and www.site.com/tos.aspx.
Step 2: I have 3 home pages
You and most users will access your site as www.site.com. DotNetNuke throws in 2 more urls to show your home page content. The DNN Logo Skin Object links to the home page as www.site.com/default.aspx. And your Home menu item (whether it's called Home, or something else ) will referency your home page as www.site.com/Home.aspx.
That's 3 urls to reach your home page, so how do we make them consistent. I decided on the defacto url for dignuke.com is www.dignuke.com. So, any time I like to my homepage, I want to use that url.
Fixing the Logo Skin Object: The easiest way to do this is to simply hardcode your logo into your skin pages. Open your skin html or ascx file and look for the following:
remove the include, and remove the control. Now replace it with your own html, you will want to put something like this:
<a href="http://www.dignuke.com" alt="dignuke.com"><img src="/portals/0/logo.gif" /></a>
Fixing the Home Menu page: If you use a url rewriter, it will take care of this for you, but for a quick and clean way without url rewriting, here is a little trick.
1) Rename your old home page to 'Home2'
2) Create a new page called 'Home', and make it an outside url link to 'http://www.site.com'
3) Make Home2 a sub page of Home.
So now we have a Home link that points to 'www.site.com', not 'www.site.com/home.aspx', and DotNetNuke knows the home page is Home2, and whenever someone visits the site url, it will server the homepage of Home2.