<p>You could build it up using a couple of the request variables:</p>

<pre><code>{{ craft.request.serverName ~'/'~ craft.request.getSegments | join('/') }}
</code></pre>

CC BY-SA 3.0
2016-03-22T16:08:14.943Z
Dang, you beat me to answering my own question :D
Steven Grant
CC BY-SA 3.0
2016-03-22T16:10:07.930Z
Haha, sorry. I'm not normally quick enough to get a right answer in :)
Steve Holland
CC BY-SA 3.0
2016-03-22T16:10:51.913Z
That'll teach me to post and then start speaking to a colleague ;)
Steven Grant
CC BY-SA 3.0
2016-03-22T16:07:01.273Z
2016-03-22T16:07:01.273Z
Steve Holland
<p>Bear with me.</p>

<p>Shortly changing a site to run over https vs http - the issue is though that we need to maintain the Facebook open graph share data.</p>

<p>Facebook makes distinction between https and http. The way to maintain this is just to add <code>&lt;meta property="og:url" content="//www.myurl.com/segment/segment" /&gt;</code> </p>

<p>Is there a variable I can access that would output the current URL without the protocol?</p>

<variable><request>
Spitting out the URL of the entry
# Spitting out the URL of the entry

(Asked by: username_0 on 2016-03-22)

Bear with me.

Shortly changing a site to run over https vs http - the issue is though that we need to maintain the Facebook open graph share data.

Facebook makes distinction between https and http. The way to maintain this is just to add

Is there a variable I can access that would output the current URL without the protocol?

**Tags:** variable, request

---

## 1 answers

### Answer by username_1 on 2016-03-22. Score: 2 | Accepted answer

You could build it up using a couple of the request variables:
{{ craft.request.serverName ~'/'~ craft.request.getSegments | join('/') }}

> **Comments:**
> **username_0**: Dang, you beat me to answering my own question :D  
> **username_1**: Haha, sorry. I'm not normally quick enough to get a right answer in :)  
> **username_0**: That'll teach me to post and then start speaking to a colleague ;)  

---

