# Redirect don't work when you visit your site for the first time

**URL:** <https://answers.netlify.com/t/redirect-dont-work-when-you-visit-your-site-for-the-first-time/32597>\
**Category:** Support\
**Tags:** redirects\
**Created:** [February 16, 2021, 4:35pm UTC](https://answers.netlify.com/t/redirect-dont-work-when-you-visit-your-site-for-the-first-time/32597 "2021-02-16T16:35:26Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![Scott](https://sea1.discourse-cdn.com/netlify/user_avatar/answers.netlify.com/scott/32/26136_2.png) [@Scott](https://answers.netlify.com/u/Scott)\
**Post date:** [February 17, 2021, 1:05pm UTC](https://answers.netlify.com/t/redirect-dont-work-when-you-visit-your-site-for-the-first-time/32597/4 "2021-02-17T13:05:53Z")

</div>

You’ll want to make sure that the rule you have specified in your first post is at the top of your redirects file. Then, below it, I believe you’ll want a SPA redirect:

> [@\[Support Guide\] Direct links to my single page app (SPA) don't work](https://answers.netlify.com/t/support-guide-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).

---

_[View the full topic](https://answers.netlify.com/t/redirect-dont-work-when-you-visit-your-site-for-the-first-time/32597)._
