Reputation: 1
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.
Upvotes: 0
Views: 151
Reputation: 61
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.
Upvotes: 0