# Preserve links when publishing html from org-mode?

**URL:** <https://forum.systemcrafters.net/t/preserve-links-when-publishing-html-from-org-mode/1561>\
**Category:** General\
**Created:** [April 20, 2025, 6:01pm UTC](https://forum.systemcrafters.net/t/preserve-links-when-publishing-html-from-org-mode/1561 "2025-04-20T18:01:37Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![kflak](https://avatars.discourse-cdn.com/v4/letter/k/f08c70/32.png) [@kflak](https://forum.systemcrafters.net/u/kflak)\
**Post date:** [April 20, 2025, 6:01pm UTC](https://forum.systemcrafters.net/t/preserve-links-when-publishing-html-from-org-mode/1561/1 "2025-04-20T18:01:37Z")

</div>

Hi,

I made a new website with org-mode, following the video tutorial, and publishing it on codeberg. It works very well!

My only problem right now is that when I link from `content/foo.org` to `content/bar.org` this becomes a link to `content/bar.html` in the `public/foo.html` file, instead of remapping the link to `public/bar.html`. Is there any way to do this? The only way I can do this now is by linking directly to the html file, not the org file, which is a bit tedious…

---

<div class="post-metadata">

**Author:** ![tusharhero](https://avatars.discourse-cdn.com/v4/letter/t/e99b99/32.png) [@tusharhero](https://forum.systemcrafters.net/u/tusharhero)\
**Post date:** [April 21, 2025, 9:27am UTC](https://forum.systemcrafters.net/t/preserve-links-when-publishing-html-from-org-mode/1561/2 "2025-04-21T09:27:03Z")

</div>

Link to `bar.org` from `foo.org` instead.

---

<div class="post-metadata">

**Author:** ![kflak](https://avatars.discourse-cdn.com/v4/letter/k/f08c70/32.png) [@kflak](https://forum.systemcrafters.net/u/kflak)\
**Post date:** [April 21, 2025, 10:07am UTC](https://forum.systemcrafters.net/t/preserve-links-when-publishing-html-from-org-mode/1561/3 "2025-04-21T10:07:16Z")

</div>

For some reason I am getting an `Unable to resolve link` error if I do that… Will dig a bit more.

---

<div class="post-metadata">

**Author:** ![kflak](https://avatars.discourse-cdn.com/v4/letter/k/f08c70/32.png) [@kflak](https://forum.systemcrafters.net/u/kflak)\
**Post date:** [April 21, 2025, 10:16am UTC](https://forum.systemcrafters.net/t/preserve-links-when-publishing-html-from-org-mode/1561/4 "2025-04-21T10:16:07Z")

</div>

OK, figured it out. I need to link it as `./bar.org` instead of simply `bar.org` in order for the structure to be preserved.
