# Convert relative URL to absolute

**URL:** <https://discourse.nodered.org/t/convert-relative-url-to-absolute/25783>\
**Category:** General\
**Created:** [30 April 2020 01:08 UTC](https://discourse.nodered.org/t/convert-relative-url-to-absolute/25783 "2020-04-30T01:08:47Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![evitiello](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/evitiello/32/20933_2.png) [@evitiello](https://discourse.nodered.org/u/evitiello)\
**Post date:** [30 April 2020 01:08 UTC](https://discourse.nodered.org/t/convert-relative-url-to-absolute/25783/1 "2020-04-30T01:08:47Z")

</div>

Hi - I'm looking for the cleanest way to convert a relative URL to an absolute URL in a node (I have the relative URL and the base URL) It looks like I can't include node modules (such as url). What's the best way to do this?

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [29 June 2020 01:14 UTC](https://discourse.nodered.org/t/convert-relative-url-to-absolute/25783/2 "2020-06-29T01:14:00Z")

</div>

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.
