# virtual server http redirect to https

**URL:** <https://community.f5.com/t/virtual-server-http-redirect-to-https/34674>\
**Category:** Technical Forums\
**Tags:** big-ip, ltm, application-delivery\
**Created:** [November 19, 2017, 7:38pm UTC](https://community.f5.com/t/virtual-server-http-redirect-to-https/34674 "2017-11-19T19:38:28Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Shamsul\_Alam\_34](https://avatars.discourse-cdn.com/v4/letter/s/a587f6/32.png) [@Shamsul\_Alam\_34](https://community.f5.com/u/Shamsul_Alam_34)\
**Post date:** [November 19, 2017, 7:38pm UTC](https://community.f5.com/t/virtual-server-http-redirect-to-https/34674/1 "2017-11-19T19:38:28Z")

</div>

Hi expert

I’m running F5 LTM version 12.1.2. I would like to enable http to https redirect for my virtual server. I have two node configured with https. Currently im able to access my portal via https but getting site unreachable when try to access using http. Can any one show me how to enable http to https on LTM version 12?

 ![image_165138.png](https://d20hrnpixdzcsd.cloudfront.net/original/3X/c/7/c75937068afd5b7b07d56f4ece4ced13aa484c8d.png)

---

<div class="post-metadata">

**Author:** ![Krishna\_251070](https://avatars.discourse-cdn.com/v4/letter/k/b5e925/32.png) [@Krishna\_251070](https://community.f5.com/u/Krishna_251070)\
**Post date:** [November 19, 2017, 8:02pm UTC](https://community.f5.com/t/virtual-server-http-redirect-to-https/34674/2 "2017-11-19T20:02:55Z")

</div>

Hello,

You need to create a Virutal Server that listens for http request and then re-direct to https.

You can do the http to https redirection using either an iRule or a policy.

You can either write your own custome iRule or you can use the deafult F5 provided iRule.

Else you can write a custom policy that also do the job.

Then add the iRule/Policy in the http Virtual Server under the ‘Resource’ tab.

---

<div class="post-metadata">

**Author:** ![WithF5](https://avatars.discourse-cdn.com/v4/letter/w/d9b06d/32.png) [@WithF5](https://community.f5.com/u/WithF5)\
**Post date:** [November 20, 2017, 1:01am UTC](https://community.f5.com/t/virtual-server-http-redirect-to-https/34674/3 "2017-11-20T01:01:37Z")

</div>

It is possible use iRules for that, but I suggest you use Policy instead. Have a look in this post and try to do it. [https://devcentral.f5.com/s/feed/0D51T00006i7WvASAU](https://devcentral.f5.com/s/feed/0D51T00006i7WvASAU)

¬†
