Blogengine updated to use post and page titles different from Url to make it SEO friendly

Last week I added a new page to my blog site. The article was very popular and lot of people bookmarked it as well. After 3 days I realized that there is typo in the title that I need to fix. So I made the change. After few minutes of making the change I started getting flood of emails about broken link from the people who bookmarked that article. Then I realized that BlogEngine.net generated URLs for posts and pages based on Title field. So if you change the title of the item, your URL changes as well. Well there are following problems I see with this approach.

  • Biggest problem is that URL changes if title changes. That would mean that you will have keep track of where you have used this URL internally and externally and update them.
  • If i specify a very long title for my post or page, I will have a gigantic URL. This is not something that is recommended in best practices of URL creation.
  • Now to keep the URL to manageable length, I will have to come up with short titles that explain what the page or post is all about. Well, in some cases you want to have a title that is little bit more descriptive for SEO purposes

After thinking through this, I decided to make change in BlogEngine.net to include a new field named MetaTitle for pages and posts.

This new field allows you to enter a title that is different from what is used to create URL of that post or page. And when you want to update title of the item, you just need to update MetaTitle and never have to worry about URL change because you changed title. You can still change Title field, but it will result in a new URL for your page or post.

You can download the updated code from BlogEngine.Net Update 1.5.3. This update requires change in SQL Server tables. The updated script has been appended at the bottom of the page. I will post that update here as well. This update requires addition of new field MetaTitle in be_Pages and be_Posts tables.


/* Script for MetaTitle features */
ALTER TABLE [dbo].[be_Pages]
 ADD
 [MetaTitle] [nvarchar](255) NOT NULL DEFAULT (N'')
GO
 UPDATE [be_Pages]	SET [MetaTitle] = [Title]
GO
ALTER TABLE [dbo].[be_Posts]
 ADD
 [MetaTitle] [nvarchar](255) NOT NULL DEFAULT (N'')
GO
 UPDATE [be_Posts]	SET [MetaTitle] = [Title]
GO

Admin pages Add_Entry and Pages have also been updated to include new text box for MetaTitle field. And all the core code has been updated to account for new database field as well. If you have any feature that you would like implemented or modified, please feel free to contact me. I will be glad to work with you on the changes.


BlogEngine.Net Custom Updates

Search

Social

Weather

3.4 °C / 38.0 °F

weather conditions Clouds

Monthly Posts

Blog Tags