# Cross Context links

**URL:** <https://community.modx.com/t/cross-context-links/7153>\
**Category:** General\
**Tags:** context\
**Created:** [October 18, 2023, 9:47pm UTC](https://community.modx.com/t/cross-context-links/7153 "2023-10-18T21:47:37Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![halftrainedharry](https://community.modx.com/user_avatar/community.modx.com/halftrainedharry/32/1063_2.png) [@halftrainedharry](https://community.modx.com/u/halftrainedharry)\
**Post date:** [October 19, 2023, 7:05am UTC](https://community.modx.com/t/cross-context-links/7153/3 "2023-10-19T07:05:14Z")

</div>

You probably have to create a context setting `site_url` (and maybe `http_host` as well) in the “web” context.

I think otherwise, the value `$_SERVER['HTTP_HOST']` of the current request is used to create the URLs (which has the wrong value for links to the main context).

---

_[View the full topic](https://community.modx.com/t/cross-context-links/7153)._
