SEO fields for news and blog items
I was really surprised that news and blog items don't have meta description and keyword fields.
Even worse is that SF uses the URL to populate the title tag for these items. Search engines aren’t going to include a URL as a page title on their results page, and I don’t think they can manufacture page titles as they do descriptions if meta description not populated.
We need a meta keyword, meta description, and especially a title field for news and blog items ASAP. I'm probably going to lose most or all of the SEO benefit of the many news and blog items that I'm migrating from my current site to SF.
Not happy.
Hello Eric,
Thank you for contacting Telerik support.
We have logged your request. I hope that we will be able to do it soon.
Kind regards,
Antoaneta
the Telerik team
Antoaneta, thanks for your reply.
Will this be included in the April release or any previous service packs? This really needs to be addressed as quickly as possible. It would really be frustrating to lose search engine traffic for something as basic as this.
Hi Eric,
This feature is planned for Q2, which means that it will be available not earlier than August 2011.
Best wishes,
Antoaneta
the Telerik team
Antoaneta, thanks for the further info, but I'm a little confused about the timeline. Why wouldn't a Q2 feature come out April-June?
Hello Eric,
Thank you for noticing that, actually Q2 will be in the end of July 2011, not in August.
Regards,
Antoaneta
the Telerik team
Antoaneta, thanks. I look forward to seeing this in the Q2 release. Again, this really need to be fixed as soon as possible.
Didn't see this listed specifically in Q2 roadmap. Is this fix still slated for Q2?
Hello Eric,
Your request has two parts:
1) The title of the dynamic news page doesn't have a SEO friendly title meta tag.
We are showing there the page name, while in fact we should show the title of the news item .
This fix is planned for SP2 due towards the end of June.
2) There are no options to specify title, description and other meta information per news item.
This request is logged for Q2. However, it is with lower priority as of now and its implementation is not 100% sure. This is why we didn't commit it publicly.
Most of our customers are relying on the title and content of the news to boost SEO. Meta description is rarely used. To test this assumption I am logging this request to our PITs system on this link 5842. Based on the popularity among the community we may raise the priority of this task.
I hope that answered your question,
All the best,
Kalina
the Telerik team
Kalina, thanks for update. Yes, meta description would be good to have but not critical; title is critical. I'll look out for the changes in SP2 and Q2 release.
Hello,
Just wondering if this is available? I have tried to figure out the solution in Sitefinity 4.3 but am not seeing it. I really need the description meta tags so I can populate the "Share This" social sharing buttons when sharing news items.
Thanks,
Chris
Hi,
We have SF 5.1 and we still do not have the description meta tag for our News and Blog pages.
With a category widget and a news widget on a page, we have duplicate meta description on all news item
Do you have a workaround for that ?
Thanks
Eric
Hi Eric,
Thank you for using our services.
The feature is currently in the process of implementation and should be available for our upcoming Sitefinity 5.4 release.
In the meantime you can easily create a workaround by inheriting from the desired content type's DetailsView, and set the desired meta tags using the values populated in a custom field, for example:
using
System;
using
System.Linq;
using
System.Web.UI.HtmlControls;
using
SitefinityWebApp.CustomPipePackage.Custom.PublishingSystem.AggregatedBlogsSeoPipe;
using
Telerik.OpenAccess;
using
Telerik.Sitefinity.Blogs.Model;
using
Telerik.Sitefinity.Model;
using
Telerik.Sitefinity.Modules.Blogs.Web.UI;
using
Telerik.Sitefinity.Modules.Blogs.Web.UI.Public;
namespace
SitefinityWebApp.CustomWidgets.BlogPosts
public
class
MasterPostViewSeoCanonical : DetailPostView
private
void
AddMetaKeywordsMarkup(BlogPost item)
try
if
(!
string
.IsNullOrEmpty(item.GetValue<String>(
"MetaDescription"
)))
HtmlMeta metaDescr =
new
HtmlMeta();
metaDescr.Name =
"Keywords"
;
metaDescr.Content = item.GetValue<String>(
"MetaDescription"
);
this
.Page.Header.Controls.Add(metaDescr);
catch
(Exception )
protected
override
void
InitializeControls(Telerik.Sitefinity.Web.UI.GenericContainer container, Telerik.Sitefinity.Web.UI.ContentUI.Contracts.IContentViewDefinition definition)
base
.InitializeControls(container, definition);
var viewCtrl = (BlogPostView)
this
.Host;
var item = viewCtrl.DetailItem
as
BlogPost;
AddMetaKeywordsMarkup(item);
MetaDescription
is the name of a custom field we've added to blog posts. You can use the custom view by going to Administration->Settings->Advanced -> Blogs-> Controls->BlogsPostsFrontend->Views->DetailBlogPostsFrontend and change the ViewType to the type of your custom view.
Kind regards,It doesn't seem to have made its way into 5.4 - will it be in 6.0?
Hello Simon,
Thank you for using our services.
Here is the documentation link about setting Meta descriptions:
http://www.sitefinity.com/documentation/documentationarticles/automatic-generation-of-meta-keywords-and-meta-description-tags
Kind regards,
toteva
the Telerik team
I have yet to see this added into the 6.1 version of Sitefinity. Are you still working on giving us the ability to set the meta title and meta data manually for each dynamically generated page?
This would be a really nice feature to have and would help with SEO.
Hello Eric,
The functionality you are talking about is indeed included in 6.1 . Users have the option of adding Meta description, keywords and title to news and blogs. It is located on the widgets' designer -> Advanced. Please refer to the attached image.
Regards,
Ivan D. Dimitrov
Telerik
Ivan, thanks for your response, but it is not helpful to have this option within the news widget. I NEED A DIFFERENT META DESCRIPTION FOR EACH NEWS PAGE, NOT FOR THE PAGE THAT THE NEWS WIDGET IS EMBEDDED ON. I am working with Patrick Dunn on a workaround, but I'm really puzzled as to why this was implemented this way.
If I'm missing something, I apologize, and please advise.
I agree with Eric!
I am in need of the ability to set the meta data for each individual blog post. Besides, having the same meta description for all of the blog post will provide html errors in Google Webmaster Tools and in most SEO reporting software.
I know Sitefinity sees these content items as dynamic pages built off of one main page, but search engines and users see them as individual pages. As a result all dynamic pages, (news, events, blog post, lists) need their own meta data.
As Eric said, if we are missing something, please advise.
Hello all,
The feature you are requesting is already available. As I mentioned before it is in the documentation. Pay specific attention to the first NOTE. If you want to register custom meta fields for each item in your news/blogs you need to add a custom field to the module from News/Blogs--> Custom fields for news/blogs. Add a field and then populate it for every item with different text that will serve as your meta tags. In the widget designer add the name of your custom field to the MetaKeyWordsField. This way every item's unique tags will be included in the page's meta tags automatically. You can view the whole process here.
Regards,
Ivan D. Dimitrov
Telerik
Thank You Ivan for clearing up the confusion. I will be trying this solution out on our current project!
Thanks for the demo, Ivan. That worked.
I have been able to get the MetaData and the MetaKeywords to work, but I cannot get the TitleTag to work. You can see my example here.
Any advice on what I am doing wrong
Jeremy, the individual title of the blog post appears in the title tag for me by default, without any custom fields or configuration.
Hi Jeremy,
The only thing I did not see you do in the video is go to details view on your module. The MetaTitleField is activated once you click on the details you initialize the content's custom MetaTitleField.
Otherwise the meta title of the page is taken as a runtime value.
Tired of this half bakes CMS. Stock standard stuff like this being missing is simply amazing!
It looks like the MetaDecriptionField is NOT available in the Advanced designer of the feather MVC Blog Posts widget. Is there any support for adding meta description for dynamic blog posts in feather or no?
Hi Erik,
You can take a look on that KB article:
http://www.sitefinity.com/developer-network/knowledge-base/details/mvc-modify-page-title-and-meta-data
I hope this helps.
Regards,
Svetoslav Manchev
Telerik
Thanks Svet!
For those interested, here's my version of the solution using an MVC ActionFilter
```
public class MetaDataAttribute : ActionFilterAttribute
private string metaDescription;
public override void OnActionExecuting(ActionExecutingContext filterContext)
var actionParameters = filterContext.ActionParameters;
if (actionParameters.ContainsKey("item"))
var item = actionParameters["item"] as Content;
if (item != null)
this.metaDescription = item.GetValue<string>("MetaDescription");
public override void OnActionExecuted(ActionExecutedContext filterContext)
filterContext.Controller.ViewBag.Description = this.metaDescription;
```
Hello Erik,
Thank you for the shared solution with the community.
It is highly appreciated.
Regards,
Svetoslav Manchev
Telerik
Svetoslav,
I arrived here through another support ticket asking about adding OpenGraph meta tags, and this solution is useless for that scenario.
I need a way to add custom meta tags (e.g. <meta property="og:title" content="The Rock" />), not just the title, keywords and description.
So far it seems like the short answer is I can't do that, can you provide me with any insight into an approach that I'm missing?
Hi,
You can use the ASP.NET API to modify the Page head element like so:
protected
void
Page_Load(
object
sender, EventArgs e)
HtmlMeta tag =
new
HtmlMeta();
tag.Attributes.Add(
"property"
,
"og:title"
);
tag.Content = Page.Title;
Page.Header.Controls.Add(tag);
Velizar,
We're using pure mvc Feather, this won't work.
Hello John,
You can check the below article for more information how to achieve your requirements in MVC:
http://www.sitefinity.com/developer-network/knowledge-base/details/mvc-modify-page-title-and-meta-data
I hope this helps.
Regards,
Svetoslav Manchev
Telerik
John, this is the right answer. See my solution -- MetaDescription is a custom field we created off of the BlogPost Content Model.
public class MetaDataAttribute : ActionFilterAttribute
private string metaDescription;
public override void OnActionExecuting(ActionExecutingContext filterContext)
var actionParameters = filterContext.ActionParameters;
if (actionParameters.ContainsKey("item"))
var item = actionParameters["item"] as Content;
if (item != null)
this.metaDescription = item.GetValue<string>("MetaDescription");
public override void OnActionExecuted(ActionExecutedContext filterContext)
filterContext.Controller.ViewBag.Description = this.metaDescription;
Erik,
Thank you for taking the time to reply, but I'm not sure if I'm not explaining something properly or if I'm missing something.
Setting filterContext.Controller.ViewBag.Description = "whatever", adds the following meta tag to the head:
<meta name="description" content="whatever" />
I'm not trying to add a description meta tag, I'm trying to do add a custom (opengraph) meta tag, this:
<meta property="og:title" content="The Rock" />
Setting the Title, Keywords, and Description on the ViewBag does not help me at all...
Can you think of any way to add the custom meta tag?
John, you should be able to access any ViewBag parameters from your MVC _Layout -- e.g.
filterContext.Controller.ViewBag.ogTitle= "The Rock"
<meta property="og:title" content="@ViewBag.ogTitle" />
Erik,
I have tried that, but the ViewBag.ogTitle is empty when the layout is rendered. What am I missing?
Hmmm, good question. . . must be a Sitefinityism -- I've had some success submitting issues to the feather developers on github:
Is adding a custom meta tag still not possible in feather?
It's hard to believe every sitefinity feather website is missing this functionality..
Hi,
You can achieve the desired behavior using an ActionFilter similar to the below one:
using
System.Collections.Generic;
using
System.Web;
using
System.Web.Mvc;
using
System.Web.UI;
using
System.Web.UI.HtmlControls;
using
Telerik.Sitefinity.Frontend.News.Mvc.Controllers;
using
Telerik.Sitefinity.News.Model;
using
Telerik.Sitefinity.Services;
using
Telerik.Sitefinity.Web.Events;
namespace
SitefinityWebApp
public
class
FacebookMetaAttribute : ActionFilterAttribute
public
string
OgTitle
get
;
set
;
public
override
void
OnActionExecuting(ActionExecutingContext filterContext)
base
.OnActionExecuting(filterContext);
if
(filterContext.Controller.GetType() ==
typeof
(NewsController) && filterContext.ActionDescriptor.ActionName ==
"Details"
)
var actionParameters = filterContext.ActionParameters
as
IDictionary<
string
,
object
>;
var newsItem = actionParameters[
"newsItem"
]
as
NewsItem;
if
(newsItem !=
null
)
this
.OgTitle = newsItem.Title;
this
.Register();
private
void
Register()
EventHub.Unsubscribe<IPagePreRenderCompleteEvent>(OnPagePreRenderCompleteEventHandler);
EventHub.Subscribe<IPagePreRenderCompleteEvent>(OnPagePreRenderCompleteEventHandler);
private
void
OnPagePreRenderCompleteEventHandler(IPagePreRenderCompleteEvent @
event
)
if
(!
string
.IsNullOrEmpty(
this
.OgTitle))
HtmlMeta tag =
new
HtmlMeta();
tag.Attributes.Add(
"property"
,
"og:title"
);
tag.Content =
this
.OgTitle;
@
event
.Page.Header.Controls.Add(tag);
protected
void
Application_Start(
object
sender, EventArgs e)
Bootstrapper.Initialized +=
this
.Bootstrapper_Initialized;
private
void
Bootstrapper_Initialized(
object
sender, Telerik.Sitefinity.Data.ExecutedEventArgs e)
if
(e.CommandName ==
"Bootstrapped"
)
GlobalFilters.Filters.Add(
new
FacebookMetaAttribute());
Thank you Velizar!
This works like a charm!
I already have natural meta data fields in my Custom Modules. I don't want to create a TitleTag, such that a user has to enter the same text as they have entered into another field say Title? And yes the module is running and already has data in it, so I couldn't change the field names I understand if I wanted to - which I don't. Why doesn't the Widget simply accept ANY field from a custom module, so I can set MetaTitleField to "Title" for instance and MetaDescriptionField to "Quote", etc.
Update: doh it does didn't set PageTitleMode to Replace
Can someone suggest how I might be able to employ these solutions for the MVC widgets that are automatically generated when a dynamic content type is created within a custom module.
How can I change the meta title and meta description when I am using one of these widgets?
Any help would be appreciated!
Thanks
Hello,
All you need to do is change the if clause in the Action Filter below and check whether the type is "DynamicContentController".
Regards,
Velizar Bishurov
Telerik
I'm using the action filter solution in Velizar Bishurov's post but with blog posts instead of news and it is rendering the opengraph tags. However, whenever I visit a non blog post page it is adding the meta tags for the blog post I had previously visited. It seems like the action filter is being reused across requests and causing the problem. Setting OgTitle to null in OnActionExecuting before the if statement seems to fix the issue but it seems like there might be a race condition that could cause the wrong title to be loaded if a second request is made to a different page before the OnPagePreRenderCompleteEventHandler is called. Would this be the case and if so is there a solution for race condition?