# Gridsome: Router is working only when I refresh the page #weird

**URL:** <https://answers.netlify.com/t/gridsome-router-is-working-only-when-i-refresh-the-page-weird/8899>\
**Category:** Support\
**Tags:** redirects, vuejs, netlify-newbie\
**Created:** [February 13, 2020, 10:39am UTC](https://answers.netlify.com/t/gridsome-router-is-working-only-when-i-refresh-the-page-weird/8899 "2020-02-13T10:39:40Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![VivianSolide](https://sea1.discourse-cdn.com/netlify/user_avatar/answers.netlify.com/viviansolide/32/6723_2.png) [@VivianSolide](https://answers.netlify.com/u/VivianSolide)\
**Post date:** [February 13, 2020, 10:39am UTC](https://answers.netlify.com/t/gridsome-router-is-working-only-when-i-refresh-the-page-weird/8899/1 "2020-02-13T10:39:40Z")

</div>

Hi folks,

I’m getting a very strange issue.  
This is the [website](https://friendly-swanson-e5ce80.netlify.com/) I’m working on.

My router works only when I refresh the page :

1. Go to [https://friendly-swanson-e5ce80.netlify.com/](https://friendly-swanson-e5ce80.netlify.com/)
2. Ctrl + R 😮
3. Click on the button “Contactez-nous !”

But if you don’t refresh the page the button isn’t working.

Is anyone has an idea?  
Thanks for helpiing!

---

<div class="post-metadata">

**Author:** ![perry](https://sea1.discourse-cdn.com/netlify/user_avatar/answers.netlify.com/perry/32/16_2.png) [@perry](https://answers.netlify.com/u/perry)\
**Post date:** [February 14, 2020, 1:20am UTC](https://answers.netlify.com/t/gridsome-router-is-working-only-when-i-refresh-the-page-weird/8899/2 "2020-02-14T01:20:01Z")

</div>

hi there, welcome.

is this relevant at all?

> [@\[Support Guide\] Direct links to my single page app (SPA) don't work](https://answers.netlify.com/t/common-issue-direct-links-to-my-single-page-app-spa-dont-work/126):
>
> Last reviewed by Netlify Support - August, 2023 If you’re building a Single Page Application (SPA), or an app that manages its own routes (url paths), you’ll want to add a \_redirects file to your [publish directory](https://docs.netlify.com/configure-builds/overview/#definitions-1) with the following line to take advantage of browser history pushstate: /\* /index.html 200 You can read more information in our docs, which can be found [here](https://docs.netlify.com/routing/redirects/rewrites-proxies/#history-pushstate-and-single-page-apps).

---

<div class="post-metadata">

**Author:** ![VivianSolide](https://sea1.discourse-cdn.com/netlify/user_avatar/answers.netlify.com/viviansolide/32/6723_2.png) [@VivianSolide](https://answers.netlify.com/u/VivianSolide)\
**Post date:** [February 14, 2020, 8:35am UTC](https://answers.netlify.com/t/gridsome-router-is-working-only-when-i-refresh-the-page-weird/8899/3 "2020-02-14T08:35:20Z")

</div>

hi @perry  
thanks for the link, it works now!

for whom interested in Gridsome, I created a “static” directory inside src and add a file “\_redirects” with this line:  
`/* /index.html 200`
