So today I'll explain how I solved some annoying little problems with BlogEngine.net.
Analyzing my Blog with SEO Site Tools, an extension of Chrome very useful for detecting all those anomalies that your site could have with the Search Engines in the field Meta Tag, Link quality, Meta Description, Keywords tags and more, I had to intervene directly on the code to solve two problems suggested by the indicated tool.
1) The first problem concerned the Title del Blog:
As you well know, for those who use Blogengine.net, in the Basic Setting it is possible to enter the blog name and description.
But what happens when you enter this data?
The title of your blog will feature not only the blog name but also the Description that you have entered. This way you will have a Title Tag too long and badly seen by Search Engines which instead prefer short titles (just take a look at the aggregators).
So I went to the file Default.aspx.cs exactly in function Page_Load and I made the following change:
if (!BlogSettings.Instance.UseBlogNameInPageTitles) Page.Title = BlogSettings.Instance.Name; /* + " | "; if (!string.IsNullOrEmpty(BlogSettings.Instance.Description)) Page.Title += Server.HtmlEncode(BlogSettings.Instance.Description);*/
And that is, I assigned to the Page.Title just the blog name with BlogSettings.Instance.Name remmando everything else with the commands / * * /.
2) The second problem instead concerned the Keywords Tags:
As Blogengine creates its Keywords by pointing directly to Categories set in your blog, you may have problems with Google or other Search Engines in case these are over 10 Keywords. Since my blog far exceeds the number of categories suggested and since I prefer to customize and choose the desired keywords, I proceeded to make a small change
Always in the file Default.aspx.cs exactly in function AddMetaKeywords I did like this:
// string metakeywords = Server.HtmlEncode (string.Join (",", categories)); string metakeywords = "SoulTricks, News, Sports, Movies, Gossip, Marriage, Music, Recipes, Fantasy Football, Technology";
I replaced Server.HtmlEncode (string.Join (“,”, categories)); with the Keywords of my interest, in this way, regardless of the Categories, I was able to customize and improve my Keywords.
Happy Blogengine.