# Elasticsearch and Kibana Url says "your connection to this site is not secure "

**URL:** <https://discuss.elastic.co/t/elasticsearch-and-kibana-url-says-your-connection-to-this-site-is-not-secure/317562>\
**Category:** Elasticsearch\
**Tags:** elastic-stack-security\
**Created:** [October 26, 2022, 10:13pm UTC](https://discuss.elastic.co/t/elasticsearch-and-kibana-url-says-your-connection-to-this-site-is-not-secure/317562 "2022-10-26T22:13:53Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Chma](https://avatars.discourse-cdn.com/v4/letter/c/ce73a5/32.png) [@Chma](https://discuss.elastic.co/u/Chma)\
**Post date:** [October 26, 2022, 10:13pm UTC](https://discuss.elastic.co/t/elasticsearch-and-kibana-url-says-your-connection-to-this-site-is-not-secure/317562/1 "2022-10-26T22:13:53Z")

</div>

I am running elastic 8.4. From the documentation, it says that the security is automatically enabled and configured. But when I get my elasticsearch running and visit `https:localhost:9200` I get the message:

`Your connection to this site is not secure`

This is what my elastic.yml file looks like. Is there something else required from the user to configure security?

```auto
# Enable security features
path.data: /var/lib/elasticsearch
path.logs: /var/log/elasticsearch
node.data : true
network.host : 0.0.0.0
discovery.seed_hosts : []
discovery.type: single-node
xpack.security.enabled: true
xpack.security.enrollment.enabled: true
# Enable encryption for HTTP API client connections, such as Kibana, Logstash, and Agents
xpack.security.http.ssl:
  enabled: true
  keystore.path: certs/http.p12
# Enable encryption and mutual authentication between cluster nodes
xpack.security.transport.ssl:
  enabled: true
  verification_mode: certificate
  keystore.path: certs/transport.p12
  truststore.path: certs/transport.p12
# Create a new cluster with the current node only
# Additional nodes can still join the cluster later
cluster.initial_master_nodes: ["${ELK_SERVER_IP}"]
# Allow HTTP API connections from anywhere
# Connections are encrypted and require user authentication
http.host: 0.0.0.0

```

---

<div class="post-metadata">

**Author:** ![Justin\_Cranford](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/justin_cranford/32/85302_2.png) [@Justin\_Cranford](https://discuss.elastic.co/u/Justin_Cranford)\
**Post date:** [October 26, 2022, 11:40pm UTC](https://discuss.elastic.co/t/elasticsearch-and-kibana-url-says-your-connection-to-this-site-is-not-secure/317562/2 "2022-10-26T23:40:19Z")

</div>

> [@Chma](#):
>
> This is what my elastic.yml file looks like.

Can you try renaming it to elasticsearch.yml?

---

<div class="post-metadata">

**Author:** ![Justin\_Cranford](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/justin_cranford/32/85302_2.png) [@Justin\_Cranford](https://discuss.elastic.co/u/Justin_Cranford)\
**Post date:** [October 26, 2022, 11:46pm UTC](https://discuss.elastic.co/t/elasticsearch-and-kibana-url-says-your-connection-to-this-site-is-not-secure/317562/3 "2022-10-26T23:46:21Z")

</div>

Auto-configuration only runs the first time elasticsearch is started, and only if no manual configuration was detected.

If you have your original logs, check if there are any messages from auto-configuration. If it runs, you will see things mentioned in [Start the Elastic Stack with security enabled automatically | Elasticsearch Guide [8.4] | Elastic](https://www.elastic.co/guide/en/elasticsearch/reference/current/configuring-stack-security.html). If it detects that any manual configuration was done, it will not run, to avoid overwriting any manual changes.

---

<div class="post-metadata">

**Author:** ![Chma](https://avatars.discourse-cdn.com/v4/letter/c/ce73a5/32.png) [@Chma](https://discuss.elastic.co/u/Chma)\
**Post date:** [October 26, 2022, 11:50pm UTC](https://discuss.elastic.co/t/elasticsearch-and-kibana-url-says-your-connection-to-this-site-is-not-secure/317562/5 "2022-10-26T23:50:59Z")

</div>

there's no manual configuration. The only manual change was resetting the password. Could that be a reason? I also copied` http_ca.crt` from` etc/elasticsearch/certs/http_ca.crt` to ` /etc/logstash/certs`

---

<div class="post-metadata">

**Author:** ![Yang\_Wang](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/yang_wang/32/48857_2.png) [@Yang\_Wang](https://discuss.elastic.co/u/Yang_Wang)\
**Post date:** [October 26, 2022, 11:54pm UTC](https://discuss.elastic.co/t/elasticsearch-and-kibana-url-says-your-connection-to-this-site-is-not-secure/317562/6 "2022-10-26T23:54:27Z")

</div>

I guess you were connecting `https://localhost:9200` using a browser.

The message `Your connection to this site is not secure` means the Browser does not trust the server (Elasticsearch)'s TLS certificate (i.e. `certs/http.12`). It is expected because the certificate is generated locally and not anchored to any publicly trusted CA.

Bottom line is: Security is enabled and TLS is in action. Otherwise you'll get a completely different error message like " This site can’t provide a secure connection".

---

<div class="post-metadata">

**Author:** ![Justin\_Cranford](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/justin_cranford/32/85302_2.png) [@Justin\_Cranford](https://discuss.elastic.co/u/Justin_Cranford)\
**Post date:** [October 27, 2022, 12:28am UTC](https://discuss.elastic.co/t/elasticsearch-and-kibana-url-says-your-connection-to-this-site-is-not-secure/317562/7 "2022-10-27T00:28:28Z")

</div>

> [@Chma](#):
>
> The only manual change was resetting the password.

Yes. Auto-configuration will reset the `elastic` user password the first time you start up a fresh install. If you manually reset the password, that can be a reason why auto-configuration was skipped.

Try a fresh install in a temporary folder, and run bin/elasticsearch. View the log and see if auto-configuration runs.

---

<div class="post-metadata">

**Author:** ![Chma](https://avatars.discourse-cdn.com/v4/letter/c/ce73a5/32.png) [@Chma](https://discuss.elastic.co/u/Chma)\
**Post date:** [October 27, 2022, 1:14am UTC](https://discuss.elastic.co/t/elasticsearch-and-kibana-url-says-your-connection-to-this-site-is-not-secure/317562/8 "2022-10-27T01:14:24Z")

</div>

@Justin_Cranford I can see this in my logs:

```auto
Auto-configuration will not generate a password for the elastic built-in superuser, as we cannot determine if there is a terminal attached to the elasticsearch process. You can use the `bin/elasticsearch-reset-password` tool to set the password for the elastic user.

```

---

<div class="post-metadata">

**Author:** ![Justin\_Cranford](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/justin_cranford/32/85302_2.png) [@Justin\_Cranford](https://discuss.elastic.co/u/Justin_Cranford)\
**Post date:** [October 27, 2022, 4:28am UTC](https://discuss.elastic.co/t/elasticsearch-and-kibana-url-says-your-connection-to-this-site-is-not-secure/317562/9 "2022-10-27T04:28:35Z")

</div>

Redirect STDOUT can cause that auto-configuration skip message. Did you redirect STDOUT to a file, or pipe to another process?
