# Cant get to elastic when localhost replaced with server name

**URL:** https://discuss.elastic.co/t/cant-get-to-elastic-when-localhost-replaced-with-server-name/100054
**Category:** Elasticsearch
**Created:** [September 11, 2017, 12:56pm UTC](https://discuss.elastic.co/t/cant-get-to-elastic-when-localhost-replaced-with-server-name/100054 "2017-09-11T12:56:13Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![bilpor](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/bilpor/32/24043_2.png) [@bilpor](https://discuss.elastic.co/u/bilpor)
#### Post date: [September 11, 2017, 12:56pm UTC](https://discuss.elastic.co/t/cant-get-to-elastic-when-localhost-replaced-with-server-name/100054/1 "2017-09-11T12:56:13Z")

</div>

HI All,

I have elastic search 5.5.1 installed with xpack. I've created an index and used fscrawler to populate it. Via Postman, I perform a GET on a url in the form `localhost:9200/myindex/_search?q="William"` and it all works fine. If I change localhost to the ip 127.0.0.1 it still works. If I change it to the servername then postman comes back with could not get any response. All of this from the same server that everything has been installed on.

I need to get it to work using the server name since I obviously want to make the call from other machines. What do I need to do to make it recognize the server name?

---

<div class="post-metadata">

### Author: ![colings86](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/colings86/32/44960_2.png) [@colings86](https://discuss.elastic.co/u/colings86)
#### Post date: [September 11, 2017, 1:12pm UTC](https://discuss.elastic.co/t/cant-get-to-elastic-when-localhost-replaced-with-server-name/100054/2 "2017-09-11T13:12:18Z")

</div>

By default the server will only bind to localhost addresses. If you want to bind to an external interface you will need to set either `http.host` or `http.bind_host` to your external interfaces IP address. See the following for more information on these settings: [https://www.elastic.co/guide/en/elasticsearch/reference/5.5/modules-http.html#\_settings\_2](https://www.elastic.co/guide/en/elasticsearch/reference/5.5/modules-http.html#_settings_2)

---

<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: [October 9, 2017, 1:12pm UTC](https://discuss.elastic.co/t/cant-get-to-elastic-when-localhost-replaced-with-server-name/100054/3 "2017-10-09T13:12:26Z")

</div>

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