# Disable automatic index creation in elasticsearch

**URL:** <https://discuss.elastic.co/t/disable-automatic-index-creation-in-elasticsearch/260276>\
**Category:** Elasticsearch\
**Created:** [January 6, 2021, 6:43am UTC](https://discuss.elastic.co/t/disable-automatic-index-creation-in-elasticsearch/260276 "2021-01-06T06:43:08Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![tahseen\_fatima](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/tahseen_fatima/32/67789_2.png) [@tahseen\_fatima](https://discuss.elastic.co/u/tahseen_fatima)\
**Post date:** [January 6, 2021, 6:43am UTC](https://discuss.elastic.co/t/disable-automatic-index-creation-in-elasticsearch/260276/1 "2021-01-06T06:43:09Z")

</div>

Hi,

I have a setup of ELK 7.10v .  
I want to know is there a way to configure elasticsearch not to automatically create indexes.

I tried adding this to my "elasticsearch.yml"

> action.auto\_create\_index: 0

also tried with false value.

> action.auto\_create\_index: false

After giving this parameters in elasticsearch.yml, the elasticsearch was not getting started.

Kindly help,  
Tahseen

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [January 6, 2021, 9:02pm UTC](https://discuss.elastic.co/t/disable-automatic-index-creation-in-elasticsearch/260276/2 "2021-01-06T21:02:51Z")

</div>

Per [Index API | Elasticsearch Guide [8.11] | Elastic](https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-index_.html);

> Automatic index creation is controlled by the `action.auto_create_index` setting. This setting defaults to `true` , which allows any index to be created automatically. You can modify this setting to explicitly allow or block automatic creation of indices that match specified patterns, or set it to `false` to disable automatic index creation entirely. Specify a comma-separated list of patterns you want to allow, or prefix each pattern with `+` or `-` to indicate whether it should be allowed or blocked. When a list is specified, the default behaviour is to disallow.

If you set that to `false` and saw errors, it'd be helpful if you posted your config and the log.

---

<div class="post-metadata">

**Author:** ![tahseen\_fatima](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/tahseen_fatima/32/67789_2.png) [@tahseen\_fatima](https://discuss.elastic.co/u/tahseen_fatima)\
**Post date:** [January 7, 2021, 4:42am UTC](https://discuss.elastic.co/t/disable-automatic-index-creation-in-elasticsearch/260276/3 "2021-01-07T04:42:09Z")

</div>

Hi @warkolm,

I was facing the error by adding this line _action.auto\_create\_index : false_ in my elasticsearch.yml.  
So I removed this line and tried with PUT condition

> PUT \_cluster/settings  
> {  
> "persistent": {  
> "action.auto\_create\_index": "false"  
> }  
> }

Then it worked for me.

Thank you,  
Tahseen

---

<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:** [February 4, 2021, 4:42am UTC](https://discuss.elastic.co/t/disable-automatic-index-creation-in-elasticsearch/260276/4 "2021-02-04T04:42:16Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
