# HTTP Referer

**URL:** <https://community.hubspot.com/t/http-referer/82257>\
**Category:** APIs & Integrations\
**Tags:** php\
**Created:** [May 30, 2023, 1:34pm UTC](https://community.hubspot.com/t/http-referer/82257 "2023-05-30T13:34:46Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![joaomag](https://avatars.discourse-cdn.com/v4/letter/j/bb73d2/32.png) [@joaomag](https://community.hubspot.com/u/joaomag)\
**Post date:** [May 30, 2023, 1:34pm UTC](https://community.hubspot.com/t/http-referer/82257/1 "2023-05-30T13:34:46Z")

</div>

Hi!

I would like to know how to send the http referrer from a hubspot landing page to an external website, in order to be available on the other PHP website on the

`$_SERVER['HTTP_REFERER']`

For context, we’re building a landing page that will direct users to an external website (inside our own codebase), but we need to ensure that users are actually coming from the hubspot landing page, so we were thinking of using the HTTP referrer but it shows up blank.

Thanks for any help.

---

<div class="post-metadata">

**Author:** ![Jaycee\_Lewis](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/jaycee_lewis/32/61352_2.png) [@Jaycee\_Lewis](https://community.hubspot.com/u/Jaycee_Lewis)\
**Post date:** [May 31, 2023, 6:10pm UTC](https://community.hubspot.com/t/http-referer/82257/2 "2023-05-31T18:10:12Z")

</div>

Hey, @joaomag 👋 Thanks for your question.

Using the `Referer` HTTP request header presents some challenges. Including:

- This header is dependent on the client’s web browser.
- Which can cause it not always be sent
- some browsers and browser extensions can block or modify this header for privacy reasons
- It’s not accessible over `HTTPS`

For additional context, have a look at this Stack Overflow thread — [How to use $\_SERVER[‘HTTP\_REFERER’] correctly in PHP?](https://stackoverflow.com/questions/36240145/how-to-use-serverhttp-referer-correctly-in-php/36240257#36240257)

Hey @stefen @skimura @Teun, do you have any feedback or suggestions for @joaomag?

Thank you! — Jaycee

---

<div class="post-metadata">

**Author:** ![Teun](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/teun/32/28739_2.png) [@Teun](https://community.hubspot.com/u/Teun)\
**Post date:** [June 1, 2023, 7:07am UTC](https://community.hubspot.com/t/http-referer/82257/3 "2023-06-01T07:07:39Z")

</div>

Hi @joaomag ,

What is the reason you need to ensure that a visitor came from the HS landing page?

If it is for something simple, like displaying content etc. I would personally go for something more simple like passing an URL parameter, similar to `utm_referrer`, so the links could look something like this;  
[https://mynothubspotwebsite.com/page?referrer=hubspot](https://mynothubspotwebsite.com/page?referrer=hubspot)
