# Linking to a page on same website

**URL:** <https://forum.getkirby.com/t/linking-to-a-page-on-same-website/31108>\
**Category:** Questions\
**Tags:** v4\
**Created:** [March 15, 2024, 2:43pm UTC](https://forum.getkirby.com/t/linking-to-a-page-on-same-website/31108 "2024-03-15T14:43:58Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mark\_E](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/mark_e/32/10834_2.png) [@Mark\_E](https://forum.getkirby.com/u/Mark_E)\
**Post date:** [March 15, 2024, 2:43pm UTC](https://forum.getkirby.com/t/linking-to-a-page-on-same-website/31108/1 "2024-03-15T14:43:58Z")

</div>

In the Panel in a Writer field I’ve highlighted some text and linked to another page on the same website.

 ![Screenshot 2024-03-15 at 2.37.40 pm](https://europe1.discourse-cdn.com/flex017/uploads/getkirby/original/2X/1/1c1634ee219b6e3d2e36af0f72c10df8d98a79e9.png)

I’ve then gone to the page and clicked the link, but get the following error message:

 ![Screenshot 2024-03-15 at 2.37.16 pm](https://europe1.discourse-cdn.com/flex017/uploads/getkirby/original/2X/6/6d3136c6ff38dde37abd76cfd912897f9eedb613.png)

The URL should be [http://localhost:8888/PI-site-v12/workshops/guitar-making](http://localhost:8888/PI-site-v12/workshops/guitar-making) (I’ve check and the page is there)

Why is the link not working?

---

<div class="post-metadata">

**Author:** ![Mark\_E](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/mark_e/32/10834_2.png) [@Mark\_E](https://forum.getkirby.com/u/Mark_E)\
**Post date:** [March 15, 2024, 3:02pm UTC](https://forum.getkirby.com/t/linking-to-a-page-on-same-website/31108/2 "2024-03-15T15:02:09Z")

</div>

From some more digging around…

It seems that Kirby generates a “permalink” to pages (on the same website), so that if the page is moved, the link will still work.

Unfortunately, this means the link is to a meaningless row of numbers and doesn’t link to the actual page.

The work around is –

In template files we have to add `->permalinksToUrls()`

For example

\<?= $page-\>content()-\>kirbytext()-\>permalinksToUrls() ?\>

Perhaps this is just me, but this seems a right pain. I’m going to have to go through all my templates adding this. Am I missing something – why doesn’t this work be default? Why would we want links that don’t work?

---

<div class="post-metadata">

**Author:** ![texnixe](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/texnixe/32/5754_2.png) [@texnixe](https://forum.getkirby.com/u/texnixe)\
**Post date:** [March 15, 2024, 3:20pm UTC](https://forum.getkirby.com/t/linking-to-a-page-on-same-website/31108/3 "2024-03-15T15:20:23Z")

</div>

1. These permalink links usually work, tmight have to do with your setup, maybe because of the ports, not sure, I always use host names
2. If you don’t want to use the method everywhere, you can solve this with a route that replaces all permalinks, I think there is even a plugin somewhere.

---

<div class="post-metadata">

**Author:** ![Mark\_E](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/mark_e/32/10834_2.png) [@Mark\_E](https://forum.getkirby.com/u/Mark_E)\
**Post date:** [March 15, 2024, 3:32pm UTC](https://forum.getkirby.com/t/linking-to-a-page-on-same-website/31108/4 "2024-03-15T15:32:34Z")

</div>

> 1. These permalink links usually work, tmight have to do with your setup, maybe because of the ports, not sure, I always use host names

Okay, I’ll not use the `->permalinksToUrls()` and see if it works when I make the site live.

If they still don’t work I might need some help. I’m trying to avoid plugins as it looks way too difficult to instal for my liking.

Thanks

---

<div class="post-metadata">

**Author:** ![texnixe](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/texnixe/32/5754_2.png) [@texnixe](https://forum.getkirby.com/u/texnixe)\
**Post date:** [March 15, 2024, 3:40pm UTC](https://forum.getkirby.com/t/linking-to-a-page-on-same-website/31108/5 "2024-03-15T15:40:44Z")

</div>

> [@Mark\_E](#):
>
> [http://localhost:8888/PI-site-v12/](http://localhost:8888/PI-site-v12/workshops/guitar-making)

Looks like you are using a subfolder setup, so PI-site-v12 is your project folder, that’s why it doesn’t work: [UUID permalinks cause infinite redirects in subfolder setups · Issue #6003 · getkirby/kirby · GitHub](https://github.com/getkirby/kirby/issues/6003)

> [@Mark\_E](#):
>
> I’m trying to avoid plugins as it looks way too difficult to instal for my liking.

Why? Or in what way?

---

<div class="post-metadata">

**Author:** ![Mark\_E](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/mark_e/32/10834_2.png) [@Mark\_E](https://forum.getkirby.com/u/Mark_E)\
**Post date:** [March 15, 2024, 4:13pm UTC](https://forum.getkirby.com/t/linking-to-a-page-on-same-website/31108/6 "2024-03-15T16:13:31Z")

</div>

> Looks like you are using a subfolder setup, so PI-site-v12 is your project folder, that’s why it doesn’t work: [UUID permalinks cause infinite redirects in subfolder setups · Issue #6003 · getkirby/kirby · GitHub](https://github.com/getkirby/kirby/issues/6003)

In that case I think when I move the site to the server and it becomes live the permalinks should work.

As for not wanting to use plugins:  
• Kirby does everything I want without having to use a plugin so far.  
• I’m nervous about installing them. The installation process seems to use words that I don’t know what they mean, like Composer and Git.  
• The few plugins I’ve looked at don’t seem to have any instructions, or if they do they are on something called GitHub. It’s not something I’m familiar with or comfortable with.

---

<div class="post-metadata">

**Author:** ![Mark\_E](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/mark_e/32/10834_2.png) [@Mark\_E](https://forum.getkirby.com/u/Mark_E)\
**Post date:** [March 18, 2024, 11:13am UTC](https://forum.getkirby.com/t/linking-to-a-page-on-same-website/31108/7 "2024-03-18T11:13:17Z")

</div>

> [@texnixe](#):
>
> Looks like you are using a subfolder setup, so PI-site-v12 is your project folder, that’s why it doesn’t work: [UUID permalinks cause infinite redirects in subfolder setups · Issue #6003 · getkirby/kirby · GitHub](https://github.com/getkirby/kirby/issues/6003)

That’s worked. The site is no longer in a subfolder and the permalinks work. Thanks
