# Setting values for the robots meta tag

**URL:** <https://forum.litium.com/t/setting-values-for-the-robots-meta-tag/233>\
**Category:** Questions\
**Tags:** cms\
**Created:** [September 7, 2018, 6:27am UTC](https://forum.litium.com/t/setting-values-for-the-robots-meta-tag/233 "2018-09-07T06:27:38Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![MagnusK](https://avatars.discourse-cdn.com/v4/letter/m/f9ae1b/32.png) [@MagnusK](https://forum.litium.com/u/MagnusK)\
**Post date:** [September 7, 2018, 6:27am UTC](https://forum.litium.com/t/setting-values-for-the-robots-meta-tag/233/1 "2018-09-07T06:27:38Z")

</div>

Hi all,

Just adding a summary first and a question below.

The robots meta tag is generated from Litium and the default seems to generate a tag like this:

> \< meta name=“robots” content=“index,follow” / \>

If other values are needed (e.g. stopping crawlers from indexing/following pages that are used for email signup confirmations etc) then a SQL script is needed as these values can’t be set from the page type definition. (According to support ticket ZAP-189-43978 answered by Patric Forsgard)

The SQL script should modify the SearchEngineIndex and SearchEngineFollow fields in both dbo.CMS\_Page and dbo.CMS\_WorkingCopy tables for the pages that is related to the affected page types.

**Question:**  
When adding more pages of the affected types, what is the best approach to setting the correct values for these fields? A Litium task running regularly that resets correct values for all pages related to these page types?

Litium version: 6.x

Regards  
Magnus

---

<div class="post-metadata">

**Author:** ![marten](https://yyz2.discourse-cdn.com/flex030/user_avatar/forum.litium.com/marten/32/11_2.png) [@marten](https://forum.litium.com/u/marten)\
**Post date:** [September 7, 2018, 6:52am UTC](https://forum.litium.com/t/setting-values-for-the-robots-meta-tag/233/2 "2018-09-07T06:52:00Z")

</div>

Not sure I understand the question here but the rendering of the robots tag is avaliable to edit in accelerators `Head.cshtml`-file, can you not just modify that so that it always renders specific pagetypes the way you like?

---

<div class="post-metadata">

**Author:** ![MagnusK](https://avatars.discourse-cdn.com/v4/letter/m/f9ae1b/32.png) [@MagnusK](https://forum.litium.com/u/MagnusK)\
**Post date:** [September 7, 2018, 6:55am UTC](https://forum.litium.com/t/setting-values-for-the-robots-meta-tag/233/3 "2018-09-07T06:55:07Z")

</div>

Sounds like an alternative approach, but that will bypass the existing function of the db fields?

---

<div class="post-metadata">

**Author:** ![marten](https://yyz2.discourse-cdn.com/flex030/user_avatar/forum.litium.com/marten/32/11_2.png) [@marten](https://forum.litium.com/u/marten)\
**Post date:** [September 7, 2018, 6:59am UTC](https://forum.litium.com/t/setting-values-for-the-robots-meta-tag/233/4 "2018-09-07T06:59:44Z")

</div>

Yes, but updating the values with a scheduled job might be more confusing since that would change the values that the users have set on the page.

---

<div class="post-metadata">

**Author:** ![MagnusK](https://avatars.discourse-cdn.com/v4/letter/m/f9ae1b/32.png) [@MagnusK](https://forum.litium.com/u/MagnusK)\
**Post date:** [September 7, 2018, 7:26am UTC](https://forum.litium.com/t/setting-values-for-the-robots-meta-tag/233/5 "2018-09-07T07:26:48Z")

</div>

Totally overriding this function in cshtml for some page types seems almost as confusing, IMHO.

I corrected my first post, as users can see and change these settings in Backoffice for page instances. (But not for the page type)

---

<div class="post-metadata">

**Author:** ![marten](https://yyz2.discourse-cdn.com/flex030/user_avatar/forum.litium.com/marten/32/11_2.png) [@marten](https://forum.litium.com/u/marten)\
**Post date:** [September 7, 2018, 7:43am UTC](https://forum.litium.com/t/setting-values-for-the-robots-meta-tag/233/6 "2018-09-07T07:43:50Z")

</div>

If you want to set it on the page you could listen to the page published event to modify the value, you could also add a new field that overrides the standard robot values and [give that field a default value](https://forum.litium.com/t/can-i-add-a-default-value-for-a-field-on-a-page-type/115/2).

The new fields description should clearly state that it overrides any other robots value if it has a value is specified.
