Try our conversational search powered by Generative AI!

Does Find respect "noindex"?


I've created a test page which contains the tag . However, this page still shows up in Find's search results. Thus, is the default behavior for Find not to respect the "noindex" tag?

Nov 03, 2015 17:54

Are you using the crawler, i.e. an index with 'Connections', and crawling the website? If not, Find won't know about your meta tags since it's just indexing your content types by listening to when content items are updated.

Nov 03, 2015 22:06

No, I'm not using the crawler.

Is there any best practice way to set a flag for not indexing a certain object? (I can find "Ignoring properties" in the documentation, but nothing about whole objects.)

Nov 04, 2015 9:49

You can control this by conventions, please see

Given I have a property called ExcludePageFromSearch in my base class for all page types, I usually create an extension method that checks if the editor wants to exclude that page:

public static FilterBuilder<T> ExcludeEditorChosenPages<T>(this FilterBuilder<T> filterBuilder)
    where T : IContent
    return filterBuilder
        .And<T, SitePageDataBase>(x => x.ExcludeFromSearch.Match(false));

Then I call this method from an initializable module:

    .PublicSearchFilter(client => client.BuildFilter<PageData>()
Nov 04, 2015 10:05

Oh, and the reason I'm using a filter and not excluding the pages from the index completely, is because they should still be searchable in edit mode.

Nov 04, 2015 10:07

You might be looking for:

//using EPiServer.Find.Cms.Conventions;
  .ShouldIndex(x => false);
Nov 04, 2015 10:09

In addition to Johans great suggestions I have made a post on how to filter this on indexing, read more here:

Nov 04, 2015 14:23
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.