# Request domain redirection

**URL:** <https://discuss.konghq.com/t/request-domain-redirection/4401>\
**Category:** Questions\
**Created:** [September 10, 2019, 10:23am UTC](https://discuss.konghq.com/t/request-domain-redirection/4401 "2019-09-10T10:23:11Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![hbagdi](https://yyz2.discourse-cdn.com/flex036/user_avatar/discuss.konghq.com/hbagdi/32/562_2.png) [@hbagdi](https://discuss.konghq.com/u/hbagdi)\
**Post date:** [September 11, 2019, 6:33am UTC](https://discuss.konghq.com/t/request-domain-redirection/4401/2 "2019-09-11T06:33:22Z")

</div>

Please have a look at the following post:

> [@Redirecting HTTP to HTTPS](https://discuss.konghq.com/t/redirecting-http-to-https/2637/5):
>
> You could apply the following plugin for SSL redirect: apiVersion: configuration.konghq.com/v1 kind: KongPlugin metadata: name: https-redirect plugin: pre-function config: functions: - | local forwarded\_host = ngx.var.http\_x\_forwarded\_host or ngx.var.host ngx.header["Location"] = "https://" .. forwarded\_host .. ngx.var.request\_uri return kong.response.exit(302) Please apply this plugin on an Ingress which accepts all paths and all hosts on the http protocol. If this solves …

You can simply change the `forwarded_host` part of the redirect URL being constructed.

---

_[View the full topic](https://discuss.konghq.com/t/request-domain-redirection/4401)._
