# Root-relative links are broken in browser preview (404 - Not found)

**URL:** <https://forum.pinegrow.com/t/root-relative-links-are-broken-in-browser-preview-404-not-found/3241>\
**Category:** General\
**Created:** [August 13, 2019, 6:32am UTC](https://forum.pinegrow.com/t/root-relative-links-are-broken-in-browser-preview-404-not-found/3241 "2019-08-13T06:32:10Z")\
**Posts on this page:** 16\
**Page:** 1

<div class="post-metadata">

**Author:** ![Kal](https://avatars.discourse-cdn.com/v4/letter/k/9de053/32.png) [@Kal](https://forum.pinegrow.com/u/Kal)\
**Post date:** [August 13, 2019, 6:32am UTC](https://forum.pinegrow.com/t/root-relative-links-are-broken-in-browser-preview-404-not-found/3241/1 "2019-08-13T06:32:10Z")

</div>

I just downloaded Pinegrow 5.7, and today opened a project. When I click the ‘Preview page in browser’ button, everything looks fine, but if I click on an internal (root-relative) link, I get the following error:

> **404 - Not found - File /hyperlinker/download/ can not be read by Pinegrow: Error: ENOENT: no such file or directory, open ‘/hyperlinker/download/’**

The problem appears to be that the server is using the root directory of my Mac’s drive as the site root. i.e. in the address bar, the first URL looks something like this:

[http://127.0.0.1:40000/file:///Users/kal/Documents/etc/etc/hyperlinker/index.html](http://127.0.0.1:40000/file:///Users/kal/Documents/etc/etc/hyperlinker/index.html)

I’m guessing it should look like this:

[http://127.0.0.1:40000/hyperlinker/index.html](http://127.0.0.1:40000/hyperlinker/index.html)

The project structure looks correct in Pinegrow’s Project panel, with the correct folder as the site root.

I don’t remember seeing this issue before. Am I doing something wrong, or is this a bug?

---

<div class="post-metadata">

**Author:** ![Kal](https://avatars.discourse-cdn.com/v4/letter/k/9de053/32.png) [@Kal](https://forum.pinegrow.com/u/Kal)\
**Post date:** [August 16, 2019, 1:34am UTC](https://forum.pinegrow.com/t/root-relative-links-are-broken-in-browser-preview-404-not-found/3241/2 "2019-08-16T01:34:02Z")

</div>

Anyone?

I tried opening the project in an older version of Pinegrow, but it did the same thing. Am I just imagining that root-relative links used to work??

---

<div class="post-metadata">

**Author:** ![schpengle](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.pinegrow.com/schpengle/32/238_2.png) [@schpengle](https://forum.pinegrow.com/u/schpengle)\
**Post date:** [August 16, 2019, 9:31pm UTC](https://forum.pinegrow.com/t/root-relative-links-are-broken-in-browser-preview-404-not-found/3241/3 "2019-08-16T21:31:53Z")

</div>

Hi, anything similar to this?

> [@Pinegrow version 5.7 breaks all links on pages that uses a master](https://forum.pinegrow.com/t/pinegrow-version-5-7-breaks-all-links-on-pages-that-uses-a-master/3247):
>
> Hello, I’m aware that the something changed in the master pages’ url mapping in version 5.7. Sadly, the new version breaks all the links that were perfectly mapped so far, when ‘Update the whole project’ is run. The bug consistently appears in all my Pinegrow projects, that – by the way – has a conventional/nothing special folder structure. Has anyone else experienced this? The issue apply to both \<img\> and \<link\> tags. So far I’ve used only relative urls on the master pages, which were perfec…

---

<div class="post-metadata">

**Author:** ![Kal](https://avatars.discourse-cdn.com/v4/letter/k/9de053/32.png) [@Kal](https://forum.pinegrow.com/u/Kal)\
**Post date:** [August 16, 2019, 10:04pm UTC](https://forum.pinegrow.com/t/root-relative-links-are-broken-in-browser-preview-404-not-found/3241/4 "2019-08-16T22:04:52Z")

</div>

Thanks, but no, different issue. I’m not using master pages, and the links are only broken when previewing in the browser. When published to the server, they are fine. In other words, the links are as they should be. It’s really the _web preview_ feature that is ‘broken’.

---

<div class="post-metadata">

**Author:** ![schpengle](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.pinegrow.com/schpengle/32/238_2.png) [@schpengle](https://forum.pinegrow.com/u/schpengle)\
**Post date:** [August 16, 2019, 10:08pm UTC](https://forum.pinegrow.com/t/root-relative-links-are-broken-in-browser-preview-404-not-found/3241/5 "2019-08-16T22:08:12Z")

</div>

Ah ok , I thought it may be related as I noticed both topics appeared around the same time.  
OH well, I am sure they will get to the bottom of this.  
Well done on noticing it and bringing attention to it.  
I will keep an eye out for it.

---

<div class="post-metadata">

**Author:** ![Kal](https://avatars.discourse-cdn.com/v4/letter/k/9de053/32.png) [@Kal](https://forum.pinegrow.com/u/Kal)\
**Post date:** [August 16, 2019, 10:18pm UTC](https://forum.pinegrow.com/t/root-relative-links-are-broken-in-browser-preview-404-not-found/3241/6 "2019-08-16T22:18:02Z")

</div>

Thanks @schpengle. I emailed the development team a few days ago, but haven’t heard back as yet. I’ll update this thread if/when I find out more.

---

<div class="post-metadata">

**Author:** ![Kal](https://avatars.discourse-cdn.com/v4/letter/k/9de053/32.png) [@Kal](https://forum.pinegrow.com/u/Kal)\
**Post date:** [November 1, 2019, 5:58am UTC](https://forum.pinegrow.com/t/root-relative-links-are-broken-in-browser-preview-404-not-found/3241/7 "2019-11-01T05:58:34Z")

</div>

I never did hear back from Pinegrow support, and this problem still affects me in version 5.8. Can anyone shed more light on this? Does anyone else have this problem?

---

<div class="post-metadata">

**Author:** ![Emmanuel](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.pinegrow.com/emmanuel/32/6294_2.png) [@Emmanuel](https://forum.pinegrow.com/u/Emmanuel)\
**Post date:** [December 11, 2019, 9:53am UTC](https://forum.pinegrow.com/t/root-relative-links-are-broken-in-browser-preview-404-not-found/3241/8 "2019-12-11T09:53:11Z")

</div>

I’m a bit late on this one but I can confirm that we have not received / I don’t find any message from you on this particular topic. (I see 2 other discussions with you in our system, but nothing related to the present report).

So, can you please try again and contact us at [support@pinegrow.com](mailto:support@pinegrow.com) + send us your project folder so we can analyze the situation? Thanks.

---

<div class="post-metadata">

**Author:** ![Kal](https://avatars.discourse-cdn.com/v4/letter/k/9de053/32.png) [@Kal](https://forum.pinegrow.com/u/Kal)\
**Post date:** [December 11, 2019, 10:19am UTC](https://forum.pinegrow.com/t/root-relative-links-are-broken-in-browser-preview-404-not-found/3241/9 "2019-12-11T10:19:32Z")

</div>

Hi Emmanue and thanks for the reply. Better late than never! The email was sent to [support@pinegrow.com](mailto:support@pinegrow.com) on 14 August 2019. I shall resend it now.

---

<div class="post-metadata">

**Author:** ![Carbolemons](https://avatars.discourse-cdn.com/v4/letter/c/e68b1a/32.png) [@Carbolemons](https://forum.pinegrow.com/u/Carbolemons)\
**Post date:** [May 7, 2020, 3:17am UTC](https://forum.pinegrow.com/t/root-relative-links-are-broken-in-browser-preview-404-not-found/3241/10 "2020-05-07T03:17:52Z")

</div>

heya! This seems to be the only post I can find related to this bug, but I have a solution for you! or, well for all of us here  
if you have Python installed, “SimpleHTTPServer” does the trick  
open a terminal, or command prompt in the “document root” or “webroot” or whichever you would like to call it, where the root of the website should be, and then just run  
“python -m SimpleHTTPServer 40000”  
the browser preview should properly fetch “[http://127.0.0.1:40000/hyperlinker/index.html](http://127.0.0.1:40000/hyperlinker/index.html)” because 127.0.0.1:40000 has an http server running with document root pointed to the base of the project!  
edit:  
I have to add, the built in “preview page” wont flow properly, because it’ll open on a new port, and not 40000, but at least you can preview with root relative links to not view the busted preview, I do hope pinegrow team fixes this simple bug, but until then, my workaround works! Pinegrow is _way_ too good to drop over this 🙂

---

<div class="post-metadata">

**Author:** ![Kal](https://avatars.discourse-cdn.com/v4/letter/k/9de053/32.png) [@Kal](https://forum.pinegrow.com/u/Kal)\
**Post date:** [May 7, 2020, 4:53am UTC](https://forum.pinegrow.com/t/root-relative-links-are-broken-in-browser-preview-404-not-found/3241/11 "2020-05-07T04:53:27Z")

</div>

Thanks @Carbolemons! Not sure how much I’m going to be using Pinegrow on future projects, but I’ll surely give your workaround a go if I do. It’s at least good to know that the bug affects others, and that it’s not something unique to my system. (BTW, I never did hear back from support on this issue after resending the email.)

---

<div class="post-metadata">

**Author:** ![Emmanuel](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.pinegrow.com/emmanuel/32/6294_2.png) [@Emmanuel](https://forum.pinegrow.com/u/Emmanuel)\
**Post date:** [May 7, 2020, 7:53am UTC](https://forum.pinegrow.com/t/root-relative-links-are-broken-in-browser-preview-404-not-found/3241/12 "2020-05-07T07:53:19Z")

</div>

@Kal

I’m really sorry for this situation but I just double checked the support inbox again and we never got your message about this particular topic, so the lack of answer which I deeply regret. (I suspect an overzealous spam filter somewhere between you and us).

In the mean time (since 5.7) some changes were done on this feature, did you try again?

---

<div class="post-metadata">

**Author:** ![Kal](https://avatars.discourse-cdn.com/v4/letter/k/9de053/32.png) [@Kal](https://forum.pinegrow.com/u/Kal)\
**Post date:** [May 8, 2020, 12:04am UTC](https://forum.pinegrow.com/t/root-relative-links-are-broken-in-browser-preview-404-not-found/3241/13 "2020-05-08T00:04:59Z")

</div>

@Emmanuel

I got up to version 5.91 before my upgrade license ran out. But the problem is exactly the same as I first described. The browser preview still uses the root directory of my Mac’s drive as the site root, which is what causes the problem.

I’ll leave the discussion there, as I’m not pursuing a fix for this anymore. If this behaviour isn’t something you’re able to reproduce, perhaps you could invite Carbolemons to help you with troubleshooting?

---

<div class="post-metadata">

**Author:** ![AllMediaLab](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.pinegrow.com/allmedialab/32/2079_2.png) [@AllMediaLab](https://forum.pinegrow.com/u/AllMediaLab)\
**Post date:** [May 13, 2020, 9:59am UTC](https://forum.pinegrow.com/t/root-relative-links-are-broken-in-browser-preview-404-not-found/3241/14 "2020-05-13T09:59:56Z")

</div>

Same problem here! Have a multi language website with one index page in the root and the other pages in folders for each language. Sass is also broken and Bootstrap is not found of course.

---

<div class="post-metadata">

**Author:** ![RobM](https://avatars.discourse-cdn.com/v4/letter/r/278dde/32.png) [@RobM](https://forum.pinegrow.com/u/RobM)\
**Post date:** [May 13, 2020, 12:03pm UTC](https://forum.pinegrow.com/t/root-relative-links-are-broken-in-browser-preview-404-not-found/3241/15 "2020-05-13T12:03:39Z")

</div>

How do either of you have your projects set-up? I have the following set-up:

 ![image](https://canada1.discourse-cdn.com/flex036/uploads/pinegrow/original/2X/2/27a5bc8efc8ae30bd073b2e70a89cbc0b2fa8f77.png)  
Top level is plain HTML.  
sub-page folder contains an html page named “dashboard.html” in Bootstrap 4.  
other-sub is contained within “sub-page” and contains an html page named “portfolio.html” in Foundation.

From the main page I can have a button that will take me to “dashboard.html” with a relative path

 ![image](https://canada1.discourse-cdn.com/flex036/uploads/pinegrow/original/2X/f/fd67fd3eb1c19a94878b338a5284378bd1b6223a.png)  
 ![image](https://canada1.discourse-cdn.com/flex036/uploads/pinegrow/original/2X/e/e6322247adfdeb8cfb9c80143905d812dcd0358f.png)  
Or to “portfolio.html”  
 ![image](https://canada1.discourse-cdn.com/flex036/uploads/pinegrow/original/2X/b/b7bed2b0d02bc7535061ab12814243af05db2677.png)  
 ![image](https://canada1.discourse-cdn.com/flex036/uploads/pinegrow/original/2X/6/6d2e98d4f01a2cbe73426659d39cab2de770403b.png)  
Both work just fine in the preview.

@AllMediaLab - do you mean that the sub-pages can’t find the root level assets, or…?

Trying to recreate the bug, but I need more info I guess.  
Bob

---

<div class="post-metadata">

**Author:** ![AllMediaLab](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.pinegrow.com/allmedialab/32/2079_2.png) [@AllMediaLab](https://forum.pinegrow.com/u/AllMediaLab)\
**Post date:** [May 13, 2020, 2:04pm UTC](https://forum.pinegrow.com/t/root-relative-links-are-broken-in-browser-preview-404-not-found/3241/16 "2020-05-13T14:04:44Z")

</div>

Solved it by reloading the page. Clicked from a page in the root to a page in a folder and somehow the links were not recognized. Now they do!
