# Custom naming the new indices from a Rollover

**URL:** <https://discuss.elastic.co/t/custom-naming-the-new-indices-from-a-rollover/262492>\
**Category:** Elasticsearch\
**Tags:** ilm-index-lifecycle-management\
**Created:** [January 28, 2021, 11:43am UTC](https://discuss.elastic.co/t/custom-naming-the-new-indices-from-a-rollover/262492 "2021-01-28T11:43:26Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Eilon\_Reif](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/eilon_reif/32/83050_2.png) [@Eilon\_Reif](https://discuss.elastic.co/u/Eilon_Reif)\
**Post date:** [January 28, 2021, 11:43am UTC](https://discuss.elastic.co/t/custom-naming-the-new-indices-from-a-rollover/262492/1 "2021-01-28T11:43:26Z")

</div>

Hi,  
Is there a way to name the new indices by date? something like:  
my-index-(now/d), instead of just an increasing number.

(I'm indexing data by using the API directly, with out any ingestion server)

Thanks

**SOLVED**  
can be done by creating the first index with the following command:  
`PUT /%3Cmy-index-%7Bnow%2Fd%7D-000001%3E`  
after that, any other index that is created automatically will get the same template (with an increasing number).  
taken from these docs: [https://www.elastic.co/guide/en/elasticsearch/reference/current/date-math-index-names.html](https://www.elastic.co/guide/en/elasticsearch/reference/current/date-math-index-names.html)

---

<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 25, 2021, 11:43am UTC](https://discuss.elastic.co/t/custom-naming-the-new-indices-from-a-rollover/262492/2 "2021-02-25T11:43:54Z")

</div>

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