# How to disable auto index creation in Elasticsearch?

**URL:** <https://discuss.elastic.co/t/how-to-disable-auto-index-creation-in-elasticsearch/92>\
**Category:** Elasticsearch\
**Created:** [May 1, 2015, 10:16am UTC](https://discuss.elastic.co/t/how-to-disable-auto-index-creation-in-elasticsearch/92 "2015-05-01T10:16:59Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![shaunak](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/shaunak/32/6643_2.png) [@shaunak](https://discuss.elastic.co/u/shaunak)\
**Post date:** [May 1, 2015, 10:16am UTC](https://discuss.elastic.co/t/how-to-disable-auto-index-creation-in-elasticsearch/92/1 "2015-05-01T10:16:59Z")

</div>

Set this in your `elasticsearch.yml` configs for the cluster:

```auto
action.auto_create_index: false 

```

That will prevent indices from being automatically created.

---

<div class="post-metadata">

**Author:** ![Anubha\_Agrawal](https://avatars.discourse-cdn.com/v4/letter/a/f04885/32.png) [@Anubha\_Agrawal](https://discuss.elastic.co/u/Anubha_Agrawal)\
**Post date:** [March 6, 2017, 8:32am UTC](https://discuss.elastic.co/t/how-to-disable-auto-index-creation-in-elasticsearch/92/2 "2017-03-06T08:32:41Z")

</div>

Getting an error on restarting elasticsearch.  
In elasticsearch.yml file I added line-

action.auto\_create\_index: +name\*, -\*

After this I tried to restart elasticsearch and I got the following error-

## [2017-03-06T13:57:22,573][WARN][o.e.b.ElasticsearchUncaughtExceptionHandler] [node-1] uncaught exception in thread [main] org.elasticsearch.bootstrap.StartupException: ElasticsearchException[Failed to load plugin class [org.elasticsearch.xpack.XPackPlugin]]; nested: InvocationTargetException; nested: IllegalArgumentException[the [action.auto\_create\_index] setting value [+name\*, -_] is too restrictive. disable [action.auto\_create\_index] or set it to [.watches, .triggered\_watches, .watcher-history-_]];

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [July 5, 2017, 10:02pm UTC](https://discuss.elastic.co/t/how-to-disable-auto-index-creation-in-elasticsearch/92/3 "2017-07-05T22:02:34Z")

</div>


