# Enabling HTTPS for your Pi-hole Web Interface

**URL:** <https://discourse.pi-hole.net/t/enabling-https-for-your-pi-hole-web-interface/5771>\
**Category:** Community How-to's\
**Tags:** wiki\
**Created:** [December 7, 2017, 4:11am UTC](https://discourse.pi-hole.net/t/enabling-https-for-your-pi-hole-web-interface/5771 "2017-12-07T04:11:42Z")\
**Posts on this page:** 1\
**Showing post:** 31

<div class="post-metadata">

**Author:** ![elie195](https://discourse-cdn.pi-hole.net/letter_avatar_proxy/v4/letter/e/c57346/32.png) [@elie195](https://discourse.pi-hole.net/u/elie195)\
**Post date:** [August 27, 2018, 1:28am UTC](https://discourse.pi-hole.net/t/enabling-https-for-your-pi-hole-web-interface/5771/31 "2018-08-27T01:28:46Z")

</div>

Thanks for the guide. I wanted my pihole admin interface to be reachable from both `pihole.domain.local` **_and_** `pihole`. The setting `$HTTP["host"] == "pihole.domain.local"` doesn't allow multiple hostnames though.

My solution (after a bit of googling) was to replace that line with:

`$HTTP["host"] =~ "pihole($|\.domain\.local)" {`

This will use regex instead of an absolute setting (the regex just accepts `pihole` OR `pihole.domain.local`).

**Note** : this might be obvious, but make sure your cert has a SAN (Subject Alternate Name) containing the shortname _as well as_ the FQDN. Otherwise the cert won't be trusted/valid for the shortname.

Hope this helps anyone else looking to access their admin UI via the shortname or the FQDN.

---

_[View the full topic](https://discourse.pi-hole.net/t/enabling-https-for-your-pi-hole-web-interface/5771)._
