Sitefinity injects HTML into head

334 Views Asked by At

Sitefinity is injecting the robots meta tag into my page. In the razor template there is no allocation in the area for any content variable. The html is simply added before the closing head tag:

<meta name="robots" content="noindex" /> <title>
Test page title
</title><meta name="robots" content="noindex" /><meta name="Generator" content="Sitefinity 10.0.6415.0 OME" />

How do I stop this?

2

There are 2 best solutions below

0
Veselin Vasilev On

You can use a similar approach as in this blog post:

https://sitefinitydevelopment.com/blog/how-to-remove-sf_apppath-javascript-variable-from-a-sitefinity-mvc-page.html

Basically, you need to subscribe to IPagePreRenderCompleteEvent and remove the meta tag from the header controls.

0
Jon R. On

If the 'no-follow' is injected into the page then the property Allow external search engines to index this page and include in Sitemap Priority in Sitemap in the Title & Properties.

enter image description here