# Please use HTTPS protocol Error

**URL:** <https://discuss.konghq.com/t/please-use-https-protocol-error/13071>\
**Category:** Questions\
**Tags:** kong-gateway\
**Created:** [October 4, 2024, 6:38am UTC](https://discuss.konghq.com/t/please-use-https-protocol-error/13071 "2024-10-04T06:38:54Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Dilshan\_Jayasooriya](https://yyz2.discourse-cdn.com/flex036/user_avatar/discuss.konghq.com/dilshan_jayasooriya/32/4681_2.png) [@Dilshan\_Jayasooriya](https://discuss.konghq.com/u/Dilshan_Jayasooriya)\
**Post date:** [October 4, 2024, 6:38am UTC](https://discuss.konghq.com/t/please-use-https-protocol-error/13071/1 "2024-10-04T06:38:54Z")

</div>

`FROM kong:latest

ENV KONG\_DATABASE=postgres  
ENV KONG\_PG\_HOST=[autorack.proxy.rlwy.net](http://autorack.proxy.rlwy.net)  
ENV KONG\_PG\_PORT=59190  
ENV KONG\_PG\_USER=user  
ENV KONG\_PG\_PASSWORD=pssword  
ENV KONG\_PG\_DATABASE=railway  
ENV KONG\_PROXY\_ACCESS\_LOG=/dev/stdout  
ENV KONG\_ADMIN\_ACCESS\_LOG=/dev/stdout  
ENV KONG\_PROXY\_ERROR\_LOG=/dev/stderr  
ENV KONG\_ADMIN\_ERROR\_LOG=/dev/stder

ENTRYPOINT [“/bin/sh”, “-c”, “set -e; kong migrations bootstrap; kong start && tail -f /dev/null”]

EXPOSE 8000 8443 8001 8444 8002 8445 8003 8004`

using this docker file i have deployed Kong API Gateway on railway.app. And also i have deployed a test backend project. Then i have created Service and Route on Kong as below configurations.

service json  
` { "tags": null, "ca_certificates": null, "name": "yo_direct_service", "connect_timeout": 60000, "read_timeout": 60000, "host": "kong-bc-one.sample.app", "protocol": "https", "write_timeout": 60000, "enabled": true, "retries": 5, "tls_verify": null, "tls_verify_depth": null, "client_certificate": { "id": "3f7b5ea8-b84f-4bfb-9ed8-10651019b164" }, "id": "9c2a9507-83fa-487a-9559-4eb23b58dfc9", "port": 443, "path": "/yo" }`

route json  
` { "tags": [], "methods": null, "name": "yo_direct_route", "request_buffering": true, "response_buffering": true, "strip_path": true, "protocols": ["http", "https"], "path_handling": "v0", "regex_priority": 0, "headers": null, "hosts": null, "paths": ["/yo"], "service": { "id": "9c2a9507-83fa-487a-9559-4eb23b58dfc9" }, "id": "c4281174-c1a5-4420-993e-3c695f85a3f2", "preserve_host": false, "sources": null, "https_redirect_status_code": 426, "destinations": null, "snis": null }`

Then i have try [https://kong-dev.sample.app/yo](https://kong-dev.sample.app/yo) api and got correct response. Then i have change the route configuration to  
` { "tags": [], "methods": null, "name": "yo_direct_route", "request_buffering": true, "response_buffering": true, "strip_path": true, "protocols": ["https"], "path_handling": "v0", "regex_priority": 0, "headers": null, "hosts": null, "paths": ["/yo"], "service": { "id": "9c2a9507-83fa-487a-9559-4eb23b58dfc9" }, "id": "c4281174-c1a5-4420-993e-3c695f85a3f2", "preserve_host": false, "sources": null, "https_redirect_status_code": 426, "destinations": null, "snis": null }`

Then i have try [https://kong-dev.sample.app/yo](https://kong-dev.sample.app/yo) API and got below error.

{ “message”: “Please use HTTPS protocol”, “request\_id”: “f5a1af432973d870f3a5436c040ce52d” }

First i have tried with changing the docker file and nothing worked. And then i have created certificates using

`sudo certbot certonly --manual --preferred-challenges=dns -d domain`

and uploaded them into certificates on Kong Gateway and add to service. But still error not fixed.
