# HTTPS refused to connect at a direct IP address

**URL:** https://meta.discourse.org/t/https-refused-to-connect-at-a-direct-ip-address/84017
**Category:** Self-hosting
**Created:** [March 28, 2018, 6:11am UTC](https://meta.discourse.org/t/https-refused-to-connect-at-a-direct-ip-address/84017 "2018-03-28T06:11:07Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![trangchongcheng](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/trangchongcheng/32/120005_2.png) [@trangchongcheng](https://meta.discourse.org/u/trangchongcheng)
#### Post date: [March 28, 2018, 6:11am UTC](https://meta.discourse.org/t/https-refused-to-connect-at-a-direct-ip-address/84017/1 "2018-03-28T06:11:07Z")

</div>

![40](https://global.discourse-cdn.com/meta/original/3X/6/a/6aea1c180bf4ad49f3960548d6ef35b8325c3d7e.png)

Today, i created 2 VPS on DigitalOcean.  
I using for install Discourse.  
But it only working with http  
When i setup https for Discourse then **refused to connect** error.  
I try on two VPS both are faulty.  
I had use the Discourse One-Click Application but only working http and error when setup https.

I have done this many times, it is ok on VPS at [Vultr.com](http://Vultr.com)  
But DigitalOcean is faulty.  
Cant you help me!

```
templates:
  - "templates/postgres.template.yml"
  - "templates/redis.template.yml"
  - "templates/web.template.yml"
  - "templates/web.ratelimited.template.yml"
## Uncomment these two lines if you wish to add Lets Encrypt (https)
  - "templates/web.ssl.template.yml"
  - "templates/web.letsencrypt.ssl.template.yml"

## which TCP/IP ports should this container expose?
## If you want Discourse to share a port with another webserver like Apache or nginx,
## see https://meta.discourse.org/t/17247 for details
expose:
  - "80:80" # http
  - "443:443" # https

```

---

<div class="post-metadata">

### Author: ![vinothkannans](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/vinothkannans/32/86465_2.png) [@vinothkannans](https://meta.discourse.org/u/vinothkannans)
#### Post date: [March 28, 2018, 6:27am UTC](https://meta.discourse.org/t/https-refused-to-connect-at-a-direct-ip-address/84017/2 "2018-03-28T06:27:36Z")

</div>

Letsencrypt SSL certificates can’t be delivered to an IP address. You must use a domain name. Also installing Discourse in an IP address is not recommended.

---

<div class="post-metadata">

### Author: ![trangchongcheng](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/trangchongcheng/32/120005_2.png) [@trangchongcheng](https://meta.discourse.org/u/trangchongcheng)
#### Post date: [March 28, 2018, 6:30am UTC](https://meta.discourse.org/t/https-refused-to-connect-at-a-direct-ip-address/84017/3 "2018-03-28T06:30:19Z")

</div>

> [@vinothkannans](#):
>
> SSL certificates can’t be delivered to an IP address. You must use a domain name. Also installing Discourse in an IP address is not recommended.

Oh my god! Thanks so much!  
i will use domain \<3

---

<div class="post-metadata">

### Author: ![jomaxro](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jomaxro/32/126216_2.png) [@jomaxro](https://meta.discourse.org/u/jomaxro)
#### Post date: [March 29, 2018, 10:00pm UTC](https://meta.discourse.org/t/https-refused-to-connect-at-a-direct-ip-address/84017/4 "2018-03-29T22:00:22Z")

</div>

This topic was automatically closed after 31 hours. New replies are no longer allowed.
