# Internal links in a post pointing incorrectly

**URL:** <https://discourse.gohugo.io/t/internal-links-in-a-post-pointing-incorrectly/43803>\
**Category:** support\
**Created:** [April 8, 2023, 1:22pm UTC](https://discourse.gohugo.io/t/internal-links-in-a-post-pointing-incorrectly/43803 "2023-04-08T13:22:05Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![mahadevan](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/mahadevan/32/19173_2.png) [@mahadevan](https://discourse.gohugo.io/u/mahadevan)\
**Post date:** [April 8, 2023, 1:22pm UTC](https://discourse.gohugo.io/t/internal-links-in-a-post-pointing-incorrectly/43803/1 "2023-04-08T13:22:06Z")

</div>

I use normal MDLink in my post. I have converted it from wikilinks as wikilinks don’t work in Hugo.

Problem is that when I put normal MDlink. It point to incorrect file leading to 404 error.

Example

I want to place a link to simplenote ( in a file called humblenote.md )

I write

`[simplenote](simplenote)`

When I navigate to website. humble note opens fine. But when I click the simplenote link.

I get a link that points to

`/humblelink/simplenote.md`

which gives 404 error.

whereas what I need is

`/simplenote/`

Please Help 🙏

---

<div class="post-metadata">

**Author:** ![Arif](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/arif/32/20931_2.png) [@Arif](https://discourse.gohugo.io/u/Arif)\
**Post date:** [April 8, 2023, 2:36pm UTC](https://discourse.gohugo.io/t/internal-links-in-a-post-pointing-incorrectly/43803/2 "2023-04-08T14:36:40Z")

</div>

Do `[simplenote][/simplenote/]` instead of `[simplenote](simplenote)`.

---

<div class="post-metadata">

**Author:** ![mahadevan](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/mahadevan/32/19173_2.png) [@mahadevan](https://discourse.gohugo.io/u/mahadevan)\
**Post date:** [April 8, 2023, 5:13pm UTC](https://discourse.gohugo.io/t/internal-links-in-a-post-pointing-incorrectly/43803/3 "2023-04-08T17:13:04Z")

</div>

This solved the problem.

> [@Relative Markdown Links - Markdown Render Hooks](https://discourse.gohugo.io/t/relative-markdown-links-markdown-render-hooks/22674):
>
> The minimal example for relative markdown links: [My Article](../my-article/index.md) Template: /layouts/\_default/\_markup/render-link.html \<a href="{{ (.Page.GetPage .Destination).RelPermalink | safeURL }}"\>{{ .Text | safeHTML }}\</a\> For more complex example in the test project, follow: [https://github.com/bep/portable-hugo-links](https://github.com/bep/portable-hugo-links)

---

<div class="post-metadata">

**Author:** ![Arif](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/arif/32/20931_2.png) [@Arif](https://discourse.gohugo.io/u/Arif)\
**Post date:** [April 8, 2023, 5:36pm UTC](https://discourse.gohugo.io/t/internal-links-in-a-post-pointing-incorrectly/43803/4 "2023-04-08T17:36:27Z")

</div>

Alright. The last time I tried that code, it turned all my internal links into one link which was the same as the post link. So, examine carefully that every internal link works as expected.

---

<div class="post-metadata">

**Author:** ![system](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/system/32/1_2.png) [@system](https://discourse.gohugo.io/u/system)\
**Post date:** [April 10, 2023, 5:36pm UTC](https://discourse.gohugo.io/t/internal-links-in-a-post-pointing-incorrectly/43803/5 "2023-04-10T17:36:45Z")

</div>

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