# "Incorrect HTTP method for uri" when PUTting \_index\_template

**URL:** <https://discuss.elastic.co/t/incorrect-http-method-for-uri-when-putting-index-template/237299>\
**Category:** Elasticsearch\
**Created:** [June 16, 2020, 12:55pm UTC](https://discuss.elastic.co/t/incorrect-http-method-for-uri-when-putting-index-template/237299 "2020-06-16T12:55:54Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![Bernt\_Rostad](https://avatars.discourse-cdn.com/v4/letter/b/3ab097/32.png) [@Bernt\_Rostad](https://discuss.elastic.co/u/Bernt_Rostad)\
**Post date:** [June 16, 2020, 2:29pm UTC](https://discuss.elastic.co/t/incorrect-http-method-for-uri-when-putting-index-template/237299/2 "2020-06-16T14:29:13Z")

</div>

> [@mujina93](#):
>
> `_index_template`

There is no such end point. Just remove the "\_index" part and try again, e.g.

`PUT http://localhost:9200/_template/your_template_name`

You may also want to review that **index\_patterns** value, in my experience it's usually better to have a trailing wildcard matching the indices you want to create with that particular template rather than have a wildcard in the middle of the pattern. This is particularly important if you want to create some sort of template hierarchy in your cluster - perhaps a general template with common fields and then more specialized templates for special fields or shard settings.

You can apply several index templates in a hierarchical fashion when creating one index, you do so by defining the template **order** and a stricter **index\_patterns** for the higher orders. It's a bit like inheritance for index templates 🙂 For an example of this, see [Good practice for index templates in ES](https://discuss.elastic.co/t/good-practice-for-index-templates-in-es/180116/5).

Good luck!

---

_[View the full topic](https://discuss.elastic.co/t/incorrect-http-method-for-uri-when-putting-index-template/237299)._
