More in this section

Forums / Developing with Sitefinity / Exclude meta description from crawler requests

Exclude meta description from crawler requests

5 posts, 0 answered
  1. Mike
    Mike avatar
    208 posts
    Registered:
    10 Dec 2007
    30 Oct 2008
    Link to this post
    I'm looking for a way to exclude the description meta tag from SF crawler requests.  There are some common terms in there that cause essentially every page in the site to show up in the search results. 

    Granted, the description meta tag should show what's on the page, but on my client's home page, the description tag is much more general.  I don't want to exclude the entire home page from the index, though that may be what I have to do.

    I'm thinking there is some way like:

    protected override void OnPreInit(EventArgs e)
    {
        base.OnPreInit(e);
        if (!Telerik.CmsContext.IsCrawlerRequest)
        {
            // some code here that suppresses the meta tag content?
        }
    }

    But maybe there's a better one.  Suggestions?

    Thanks in advance!
    Mike
  2. John
    John avatar
    32 posts
    Registered:
    08 Oct 2008
    30 Oct 2008
    Link to this post
    Hey Mike,

    You know Sitefinity has a fieldsinfo.xml file in the App_Data folder that controls which fields are searchable. You could remove the meta tag that way by setting the weight to -1. Take a look at this forum post about it:

    http://www.sitefinity.com/support/forums/support-forum-thread/b1043S-baeddg.aspx
  3. Mike
    Mike avatar
    208 posts
    Registered:
    10 Dec 2007
    30 Oct 2008
    Link to this post
    Right on! I knew there had to be a nice easy way to do it.  Declarative solutions are much better than coded ones.

    Thanks for the heads-up!  Now I just have to figure out how to leverage that file.  It looks pretty powerful.

    Mike
  4. Mike
    Mike avatar
    208 posts
    Registered:
    10 Dec 2007
    30 Oct 2008
    Link to this post
    I was wondering if anyone had a better explanation of how filterAttributes works in fieldsInfo.xml.  I can't find much at all on it, except the API page and the post that John pointed out to me. 

    Thanks again,
    Mike
  5. Georgi
    Georgi avatar
    3583 posts
    Registered:
    28 Oct 2016
    06 Nov 2008
    Link to this post
    Hi Mike,

    Unfortunately we do not a have a better documentation on this file for the time being. Could you please follow up if you managed to solve your problem? If there is still an issue, you can paste your description tag that you want to exclude from indexing, provide some details what exactly needs to be excluded, and will modify the fieldsInfoProvider.xml file with appropriate settings.

    Greetings,
    Georgi
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Register for webinar
5 posts, 0 answered