# Remove port in URL?

**URL:** <https://community.grafana.com/t/remove-port-in-url/12225>\
**Category:** Grafana\
**Created:** [November 20, 2018, 7:08pm UTC](https://community.grafana.com/t/remove-port-in-url/12225 "2018-11-20T19:08:34Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![ertuu85](https://avatars.discourse-cdn.com/v4/letter/e/bb73d2/32.png) [@ertuu85](https://community.grafana.com/u/ertuu85)\
**Post date:** [November 20, 2018, 7:08pm UTC](https://community.grafana.com/t/remove-port-in-url/12225/1 "2018-11-20T19:08:34Z")

</div>

Is it possible to remove the port in the URL for grafana?

I configured our server to use a custom SSL cert and wanted the URL to display as [https://graphs.domain.com](https://graphs.domain.com) but I have to put in [https://graphs.domain.com:3000](https://graphs.domain.com:3000) (or whatever port)

My grafana.ini is below:

#################################### Server ####################################  
[server]

# Protocol (http or https)

protocol = https

# The ip address to bind to, empty will bind to all interfaces

http\_addr = 10.10.10.10

# The http port to use

;http\_port = 3000

# The public facing domain name used to access grafana from a browser

domain = [https://graphs.domain.com](https://graphs.domain.com)

# Redirect to correct domain if host header does not match domain

# Prevents DNS rebinding attacks

;enforce\_domain = false

# The full public facing url you use in browser, used for redirects and emails

# If you use reverse proxy and sub path specify full url (with sub path)

root\_url = [https://graphs.domain.com](https://graphs.domain.com)

# Log web requests

;router\_logging = false

# the path relative working path

;static\_root\_path = public

# enable gzip

;enable\_gzip = false

# https certs & key file

cert\_file = /etc/grafana/grafana.pem  
cert\_key = /etc/grafana/grafanakey.pem

I had the port specified to 443 but it would not restart the service, kept erroring out

EDIT: Sorry…this was my mistake…forgot about some firewall-cmd rules that were in place. All is good now

---

<div class="post-metadata">

**Author:** ![anon34853223](https://avatars.discourse-cdn.com/v4/letter/a/71c47a/32.png) [@anon34853223](https://community.grafana.com/u/anon34853223)\
**Post date:** [November 23, 2018, 2:48pm UTC](https://community.grafana.com/t/remove-port-in-url/12225/2 "2018-11-23T14:48:52Z")

</div>

Please use a reverse proxy like nginx, haproxy or apache, see [documentation](http://docs.grafana.org/installation/behind_proxy/#running-grafana-behind-a-reverse-proxy).

---

<div class="post-metadata">

**Author:** ![beuss](https://avatars.discourse-cdn.com/v4/letter/b/34f0e0/32.png) [@beuss](https://community.grafana.com/u/beuss)\
**Post date:** [January 11, 2019, 2:39pm UTC](https://community.grafana.com/t/remove-port-in-url/12225/3 "2019-01-11T14:39:47Z")

</div>

Hi,  
I have the same issue using a reverse proxy, domain is configured to [whatever.com](http://whatever.com) but grafana still appends the http\_port to URLs…  
Regards

---

<div class="post-metadata">

**Author:** ![anon34853223](https://avatars.discourse-cdn.com/v4/letter/a/71c47a/32.png) [@anon34853223](https://community.grafana.com/u/anon34853223)\
**Post date:** [January 14, 2019, 4:34pm UTC](https://community.grafana.com/t/remove-port-in-url/12225/4 "2019-01-14T16:34:43Z")

</div>

Please configure the `root_url` to your public facing url, i.e. `http://whatever.com`.

---

<div class="post-metadata">

**Author:** ![beuss](https://avatars.discourse-cdn.com/v4/letter/b/34f0e0/32.png) [@beuss](https://community.grafana.com/u/beuss)\
**Post date:** [January 17, 2019, 9:56am UTC](https://community.grafana.com/t/remove-port-in-url/12225/5 "2019-01-17T09:56:11Z")

</div>

Hi  
Thanks a lot, this seems to do it. However, maybe the doc could be slightly improved because root\_url definition is quite unclear.  
Regards

---

<div class="post-metadata">

**Author:** ![anon34853223](https://avatars.discourse-cdn.com/v4/letter/a/71c47a/32.png) [@anon34853223](https://community.grafana.com/u/anon34853223)\
**Post date:** [January 17, 2019, 10:11am UTC](https://community.grafana.com/t/remove-port-in-url/12225/6 "2019-01-17T10:11:03Z")

</div>

Feel free to open a PR with your suggested changes.

I find it quite clear, but I may be biased [http://docs.grafana.org/installation/configuration/#root-url](http://docs.grafana.org/installation/configuration/#root-url)
