SEO - Fixing DotNetNuke Terms of Use and Privacy Statement links to remove duplicate content Being concerned with Search Engine Optimization (a.k.a. SEO), I have been meaning to do this for a while now, but it always seems to fall to lower priority on my list, mostly because I don't believe duplicate content is a major concern in SEO. I know this topic has been covered before, but I think I have a little different approach, and one that will give you some ways to do real SEO with your page names and content. I have discussed using the SiteUrls.config for cleaning up the portal alias query string in another post, but this one will take it even further to show you how to really get a handle on one of the problems of having "one size fits all" Friendly Url Rewriter rules. Even if you are not concerned with Terms and Privacy links this tutorial can help you customize any Url on your site to be exactly what you want. Are there really duplicate pages?
OK, first we will focus on the terms of use and privacy links since most everyone has these two links on their DotNetNuke portals, and there are some clear advantages to getting these links changed. Lets start by proving the problem is real. 
Anytime you see "omitted results" in a search results on Google it means you have been "tagged" as having what looks like duplicate content. Is that a bad thing? Probably not for most people. Unless you are intentionally duplicating content to do "Blackhat" type SEO then you should see no negative results. But hey, why not take the opportunity and remove the worry, while at the same time maybe even adding to your SEO arsenal? You can get those results for your own site by running a query on Google that looks like the following link: http://www.google.com/search?q=allinurl:+ctl+privacy+site:www.dotnetnuke.com&hl=en&lr=&as_qdr=all&filter=0 Correcting the problem As mentioned earlier there's more than one way to correct this problem, but I chose this way because it is a technique that I believe is easy and flexible. As a brief overview, what we are going to do is: - Create new pages in DotNetNuke and add a text/html module to display the information.
- Make the new pages accessible with friendlier Urls.
- Correct the output of our pages so that we do not expose multiple links to the same content. (optional, but avoids duplicate content)
#1. ADD NEW PAGE: The reason we want to create a new page is because it gives us the ability to modify the content and set the page skin just like other content on our site. Let's be honest, who has even changed the content that is automatically generated for the Terms of Use and Privacy Statements? By creating new pages and putting a normal html module on it you can easily change the content. Yes I know this removes the the ability to customize it by language, but that is probably not a problem in 90% of sites. 
Add a new page and give it a descriptive name with a good Title and Keywords. TIP: While you are here, you could do some creative SEO with this new page. You'll also want to make it visible to all users and you probably do not want it to show in the regular navigation so uncheck "Display in Menu". Now you can click on the terms of use or privacy statement link you currently have and copy the text from that page, then paste it into a text/html module on this new page. TIP: While you are here, you could do some creative SEO with this new module content. Now make a note of the TabId so that it can be used in the second step. 
#2. UPDATE SiteUrls.Config: This is so that the Page can be accessed without needing the TabId and the ctl=Privacy or ctl=Terms. TIP: This method can be used to create really friendly Urls to any page that you want to be indexed better or to just make the Urls look better in print marketing, etc. 
The Rewriter Rule above looks for an incoming Url that has our Friendly Page Name and then rewrites it internally in DNN so that the correct page is displayed.
Note: If you have a DNN install with multiple portals then you will need unique names for your Terms Of Use and Privacy Statement pages that match the tabid to the correct page for the portal. #3. CORRECT THE OUTPUT URLS: OK, now we have content, and a way to address the content in a friendly way so that it shows up, so now we just need to make sure that we do not output the duplicate urls causing spiders to index the same page using a different url. One way to do this would be to go in and remove the [TERMS] and [PRIVACY] Skin Tokens, then replace them with hard links to our nice new page names. That is a tedious process though, so what we really need is a way to capture the Urls before they go out to the browser and replace (rewrite) them to our new friendly page names. This is where the Free PageBlaster can really help you out. It has a global output replacement filter to handle just these types of tasks. After installing PageBlaster you can update the Snapsis.PageBlaster.config file to include replacement rules for the output of your pages. 
The Replacement Rules above will capture the links that are output by the [TERMS] and [PRIVACY] skin tokens and replace them with the friendly names. That's it! I'll be happy to answer any questions or listen to feedback in replies to this post. |