# Detect HTTPS traffic

**URL:** https://community.a10networks.com/t/detect-https-traffic/432
**Category:** aFleX
**Tags:** aflex, http
**Created:** [March 7, 2017, 4:07pm UTC](https://community.a10networks.com/t/detect-https-traffic/432 "2017-03-07T16:07:04Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![willoutte](https://avatars.discourse-cdn.com/v4/letter/w/34f0e0/32.png) [@willoutte](https://community.a10networks.com/u/willoutte)
#### Post date: [March 7, 2017, 4:07pm UTC](https://community.a10networks.com/t/detect-https-traffic/432/1 "2017-03-07T16:07:04Z")

</div>

Hi,

I’m after a variable that can differentiate httpS traffic from http traffic.  
Is this possible with http::host or http::uri?

Thanks,

William

---

<div class="post-metadata">

### Author: ![diederik](https://avatars.discourse-cdn.com/v4/letter/d/a587f6/32.png) [@diederik](https://community.a10networks.com/u/diederik)
#### Post date: [March 9, 2017, 11:56am UTC](https://community.a10networks.com/t/detect-https-traffic/432/2 "2017-03-09T11:56:02Z")

</div>

http::host or http::uri only work on cleartext (HTTP) so for them to work on HTTPS traffic, you already have the SSL:: commands you can work with.

Try:

```auto
\# as can be found in the 4.1.1-P1 documentation
when HTTP\_REQUEST \{
   log "The SSL mode is [SSL::mode]."
\}

\# SSL:mode returns 1 when SSL is used, 2 when there's no SSL used.

```
