Introduction
Content Management Systems like DotNetNuke have a reputation for being difficult to optimize for search engine keywords and phrases. This article will show that with a little thought, it is possible to implement Search Engine Optimization on DotNetNuke websites. There are three things that are often quoted as being difficult to achieve in a Content Management System:
- Generating search engine friendly urls
- Applying the correct html tags to content, and
- Creating internal links to the same website
Using the code
Some CSS will be used in this article to demonstrate how to use Search Engine Optimization and still retain your website's existing look and feel. This CSS can be inserted into your skin's CSS file, which is usually found in /Portals/_default/YourSkinName/skin.css
Generating search engine friendly urls
A search engine optimized url should contain the most important keyword of the page in the url. For example a page about "red widgets" needs to have a url that contains the term red widgets, eg:
/red-widgets.aspx This usually is the first point that is used in arguments about how search engine friendly a Content Management System really is. DotNetNuke is no exception to this rule, and by default the urls generated will look like this:
www.mywebsite.com/Default.aspx?tabid=137
This is not a search engine friendly url, or even a user friendly url. DotNetNuke does have a friendly urls feature, so let us turn it on and see what happens:
www.mywebsite.com/tabid/137/Default.aspx
This is still not a search engine friendly url. So we will need to look further ahead. The DotNetNuke framework itself does not provide a built-in method for generating the urls we need, so we need to take a look at third party modules. The module we will look at is Inventua.com's
HrefExchanger. With this module we can add a setting to our
web.config that specifies how to rewrite urls in a search engine friendly format.
<hrefExchanger extension=".aspx" w3c-output="transitional"
check-language= "false" replace-spaces-with="-" />
The key setting here is to use replace-spaces-with="-". A search engine friendly url needs a spacer between words, so that the search engine can tell where one word starts and another ends. A search engine cannot identify redwidgets.aspx as two words, but it can identify red-widgets as two words. This is a very important distinction! So, by using the hrefexchanger
module we can generate the url:www.mywebsite.com/red-widgets.aspx
We have proved our first point - that search engine friendly urls are possible in DotNetNuke. This url is also very user friendly.
Applying the correct html tags to content
The next argument used against Content Management Systems is that it is difficult to apply the correct html tags. What are the correct html tags? They are H1, H2 and H3. These are the tags that tell the search engine what is really important on your page - without them the search engine may think that there is nothing important on your page! Why is it so difficult to apply them? Usually it is just a matter of style, H1 is large text that does not fit the look and feel of your skin. The size of H1 text often stops DotNetNuke websites from using it on their pages, instead many prefer to use the CSS style "Head". There is however an easy solution that allows you to use H1 and gain the search optimization benefits, and also to have a text style that fits with the rest of your page. First locate your
skin.css file, which will probably be in the directory
/Portals/_default/YourSkinName. In
skin.css, copy the .Head style and then create a new h1 css class. Paste the
.Head
class details into the h1 details so that your css will now look like:
.Head { font-family: Tahoma, Arial, Helvetica;
font-size: 18px; font-weight: normal; color: #333333; }
h1 { font-family: Tahoma, Arial, Helvetica;
font-size: 18px; font-weight: normal; color: #333333; }
Now we can use a h1 tag on our page. Just choose the page's main module and edit it's title to add the h1 tag in front of and after the title. Choose only one module per page to have the h1 tag. You can optionally add the h2 tag to the titles of other modules - if they are relevant to your keywords. Add h3 tags to subheaders inside your content, again, only if they are relevant to your keywords. Problem solved, and point two proved - we can use the correct html tags that are required by search engines: H1, H2 and H3
Creating internal links to the same website.
If we link internally to our own pages, and especially if we link internally to the middle of a page using a url with a #anchor, the search engine will view our page as being more relevant. The link to: www.mywebsite.com/red-widgets.aspx#red-widgets
will definitely be relevant when doing a search for "red widgets". The problem is that many Content Management Systems including DotNetNuke do not have easy tools for creating named anchors. However DotNetNuke's text editor does have a html view, and by switching to this when editing content we can easily add named anchors to our content.
<a name="red-widgets">Red Widgets</a>
Once this named anchor has been created, we can now link to it from another page, and our relevancy for the search term "red widgets" is improved. Point three is also proved - we can create internal links to our own pages using named anchors.
Conclusion
We have seen that although there are arguments against using a Content Management System like DotNetNuke for websites that need to rank highly in search engines, these arguments can be disproved. The technical search engine optimization techniques demonstrated in this article are just a small part of Search Engine Optimization, but we have shown that you can get underway with minimal coding or difficulty.
Points of Interest
This article submission came about after writing a short blog post which I wanted to expand upon and fully explain the ideas and techniques behind. The original blog post "DotNetNuke Search Engine Optimization" can be seen at my website www.bestwebsites.co.nz
History
- 26-March-07: The next article in the series, "DotNetNuke Search Engine Optimization pt2" was published.
- 31-March-07: "DotNetNuke Newsletter Vol. III, Number 3" mentions this article.