Every Blogengine.NET user must know and even when you are not using Blogengine.NET the following explain is intresting and usefull. Did you read some of the comments on my website...?

On my BlogEngine.NET website here the added comments are NOT moderated and everyone is free to add comments... When we take a look at this comments and you will follow the link to the commenter we arrive mostly on a store website...! Strange.. I asked myself are these comments real because the added comments are most times described with "like your blog" or "will come back soon" or "very informative"
On the Codeplex Blogengine.NET website I found one article about the "strange comments" and that I was not the only one receiving this strange comments... What is going on... Is there a way to stop this comments and moreover WHY they added this comments... After a small investigation I found that SEORebel (nickname) where the cause of this strange comments... and he is a smart guy....
How we could stop this 'automatic' added comments first..
It is simple to stop this comments by disable the comments, or moderated the comments...but that's not what I wanted. Just at that moment BlogEngine.NET developers comes up with a small patch to stop this strange comments... With four line of code the 'automatic' added comments are stopped...but not comments who added by people hands...for GPR
These days I see more and more comments added on my website who are added by hand, talks about the article, but the link from the commenter is still going to a store website... like a example see this article with comments...
Why they take the time to add comments by hand ! The answer is here Google PageRank

First of all what I have to say to the GRP commenters... Google PageRank doesn't work anymore on THIS BlogEngine.NET website for comments !!!!
To the users from Blogengine.NET I want to say... There is a solution and I will share that solution here
Google Page Rank is the heart from Google and for users from Google it's all about money...
Do you sell products then its a huge challenge to be the first in the Google Search Engine. Google Page Ranks is used by Google Searchengine. How higher the reach and rank in Google, how more hits, how more selling products...! P1, P2, P3 P4, or P8, your page on your website has a Google Page Rank..
Why the combination BlogEngine.NET and Google Page Rank is intresting for commenters to add their link ? When Google is indexing (crawling) your BlogEngine.NET website by default all documents will be indexed, simple their is no robots.txt Users from BlogEngine.NET could add a robots.txt in the root and add some rules to follow or not to follow....it could solve the problem but its very intensive to maintenance
The question (and solution) is more HOW did Google visit your webpage to crawl and index your website and pages... yes... the GoogleBot... and if I could tell you the name from Google Search Indexing Bot you could easily redirect the search engine (without robots.txt) !!!! Do you see already the solution for Blogengine.NET yet ? We have to redirect Google's search engine to a new page, which on the fly created...! without comments... its so easy... I am for sure the GPR commenters will no longer add comments...!!
try something like this...
[code:c#]
if (Request.UserAgent.ToString().IndexOf("Googlebot") > -1)
{
// We have a GoogleBot web crawler.
}
else
{
// We do not have a GoogleBot web crawler.
}
// or try this code in a some deeper way...
System.Web.HttpBrowserCapabilities clientBrowserCaps = Request.Browser;
if (((System.Web.Configuration.HttpCapabilitiesBase)clientBrowserCaps).Crawler)
{
Response.Write ( "Browser is a search engine. I am creating a page without comments");
}
else
{
Response.Write ("Browser is not a search engine. Viewing this page with comments ");
}
// In the example above you have also to read my other article about detecting webcrawlers
//Here is another approach..based on the User Agent
if (Request.ServerVariables["HTTP_USER_AGENT"].Contains("Googlebot"))
{
//log Google bot visit
}
else if (Request.ServerVariables["HTTP_USER_AGENT"].Contains("msnbot"))
{
//log MSN bot visit
}
else if (Request.ServerVariables["HTTP_USER_AGENT"].Contains("Yahoo"))
{
//log yahoo bot visit
}
else
{
//similarly you can check for other search engines
}
I believe the developers from BlogEngine.NET will take this advice in the next release as default.
Other Web Links
See example webpage with this comments linked to a webstore...
More about detecting Google Bot within the C# .NET Framework on this website
If you want to know more about Google Page Rank then read this great article about
Open Source BlogEngine.NET information is here
Share or Bookmark this post…