SEO with the Core DNN Blog
Nov
24
Written by:
11/24/2011 10:07 AM
SEO is a vital part of a successful site, especially if you offer a service or sell anything on your site. Sometimes the SEO abilities of the core blog are a little lacking. Here is one way to help control the permalink URL for blog items.
Some blog programs and even some DNN modules allow you to control the slug (the URL that contains the title of the blog post). Most of the times, however, that URL will not be search engine optimized.
You probably want to write your headlines and post titles with humans in mind. After all, you need to make them catchy and motivate the reader to check the rest of the content. The same is not true for URLs. While a clean URL structure that contains a description of the page might benefit even human users, usually they are more relevant to search engines.
The DNN core module does not include this feature so I made a little SQL stored procedure to allow for some changes to the blog module generated URL.
*For this to work you will need HOST access to the SQL module. Be very careful running this as without some experience this could cause damage to your site. As always I would advocate practicing on a demo or temporary site so you understand how to use it.
First the stored procedure:
- Login as a HOST account.
- Go to the host menu and find the SQL item.
- Run the following SQL to create the stored procedure in your database (be sure to run this as script).
CREATE PROCEDURE {databaseOwner}[{objectQualifier}Blog_Entries_ChangePermalink
-- Add the parameters for the stored procedure here
@BlogEntry int,
@NewPermalinkTerm nvarchar(max)
AS
BEGIN
-- SET NOCOUNT ON added to prevent extra result sets from
-- interfering with SELECT statements.
SET NOCOUNT ON;
-- Insert statements for procedure here
Update {objectQualifier}Blog_Entries
SET PermaLink = replace(permalink,right(permalink, charindex('/', reverse(permalink))-1), @NewPermalinkTerm +'.aspx')
WHERE EntryID = @BlogEntry
END
Now to change the permalink for a specific blog entry:
- Open the blog entry you want to change the permalink for.
- Note the ENTRYID in the URL usually this will be located right after the word EntryID. (i.e. http://domain.com/tabid/83/EntryID/59/title-of-blog-entry.aspx the EntryID is 59.)
- Login as a HOST account.
- Go to the host menu and find the SQL item.
- Run the following SQL statement.
Exec Blog_Entries_ChangePermalink entryid, 'whattochangethepermalinkto'
A few things about changing the permalink:
- The permalink should not have any spaces in it. Replace spaces with dashes(-) of underscores(_).
- The permalink should have no punctuation in it (, . ' " ; :). Replace punctuation with dashes(-) or underscores(_), its actually better to leave out punctuation.
- The permalink should not contain any special characters or slashes. Replace any of those with dashes(-) or underscores(_).
For most SEO you want to include relvant keywords about your article. Remeber the tile is for people and the link is for the search engines.
Copyright ©2011