# 404 when querying for alias soon after creation

**URL:** https://discuss.elastic.co/t/404-when-querying-for-alias-soon-after-creation/97800
**Category:** Elasticsearch
**Created:** [August 21, 2017, 4:39pm UTC](https://discuss.elastic.co/t/404-when-querying-for-alias-soon-after-creation/97800 "2017-08-21T16:39:42Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![baller](https://avatars.discourse-cdn.com/v4/letter/b/f05b48/32.png) [@baller](https://discuss.elastic.co/u/baller)
#### Post date: [August 21, 2017, 4:39pm UTC](https://discuss.elastic.co/t/404-when-querying-for-alias-soon-after-creation/97800/1 "2017-08-21T16:39:42Z")

</div>

When create an alias and then query for existence of that alias using GET `/*/_alias/<alias_name>` I'm sometimes getting 404s even though the alias definitely exists. Then what ends up happening is my app mistakenly recreates the alias, which now points to two indexes, and then I can't index new documents.

1. Is it expected that `/*/_alias/<alias_name>` can sometimes return a 404 even though the alias exists? e.g., with freshly created aliases?
2. If that's the case, how can I wait until the alias is fully ready before proceeding?

Thanks!

---

<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: [September 18, 2017, 4:40pm UTC](https://discuss.elastic.co/t/404-when-querying-for-alias-soon-after-creation/97800/2 "2017-09-18T16:40:18Z")

</div>

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