0

We are looking to add meta noindex,nofollow tags to certain pages on our Kentico MVC site. Documentation states that if you choose "Exclude from Search", Kentico will add these noindex,nofollow meta tags to the page but it does not on our website. If we fill out meta details for a page like title, keywords and description, those feed properly so we're not sure why the noindex,nofollow meta tag isn't injecting if we have "Exclude from Search" checked.

Perhaps a way of going about it via main _Layout.cshtml and seeing if a page's "Exclude from Search" is checked and then it would add the noindex,nofollow meta tags, but I'm not sure if this is possible and I feel like the default way would be cleaner.

We've tried checking that "Exclude from Search", re-running indexes, rebooting application. The native functionality of adding noindex,nofollow meta tag does not work on our K12 MVC site.

3
  • Could you please link that documentation which states that? This was in the past for portal engine. But in MVC development mode this setting means that given page is excluded from the local search indexes (without the need to add it as an excluded content in the index setup)
    – jurajo
    Commented Apr 11 at 6:27
  • Yea, seems to be the case that only portal engine might add that meta tag when you click "Exclude from Search". Do you know of any other method to accomplish this on the MVC side natively or without having to do a custom controller of sorts?
    – matt
    Commented Apr 11 at 15:22
  • I am afraid but this is now the job of the MVC app which is under your control - you need to create the code to fit your needs.
    – jurajo
    Commented Apr 15 at 5:52

1 Answer 1

0

In Portal Engine, these things were integrated within the standard master layout. In MVC, where you use your own master layout, you can add some of the "old" Portal Engine features by adding concerned Kentico methods and properties. But there will remain some things you will have to add by your own.

For Meta Robots, you could add a Base Page Page Type which contains these meta settings and inherit this Base Page in all of your Page Types that are pages (with URLs). Meta Robots settings are than set by editors in the Content tab of all pages.

Than in the master layout you could use a Viewmodel for this and add it manually in the way you need it to your layout.

Not the answer you're looking for? Browse other questions tagged or ask your own question.