# Published page throwing 404 error

**URL:** <https://community.prismic.io/t/published-page-throwing-404-error/18439>\
**Category:** Developing with Prismic\
**Created:** [February 19, 2025, 9:05am UTC](https://community.prismic.io/t/published-page-throwing-404-error/18439 "2025-02-19T09:05:13Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![richa1](https://avatars.discourse-cdn.com/v4/letter/r/9e8a1a/32.png) [@richa1](https://community.prismic.io/u/richa1)\
**Post date:** [February 19, 2025, 9:05am UTC](https://community.prismic.io/t/published-page-throwing-404-error/18439/1 "2025-02-19T09:05:14Z")

</div>

Hi team,

The issue is that this page [Create Your Company's Own Swag Store with On Demand Features | Swag Shop & Platform with Logo Branded Merchandise | SwagMagic](https://www.swagmagic.com/create-your-store) is throwing 404 error and after refreshing the page multiple times, it works fine. The page is published one.

Please help us in resolving the issue.

Repository name - SnackMagic.

Thank you!

---

<div class="post-metadata">

**Author:** ![richa1](https://avatars.discourse-cdn.com/v4/letter/r/9e8a1a/32.png) [@richa1](https://community.prismic.io/u/richa1)\
**Post date:** [February 20, 2025, 10:41am UTC](https://community.prismic.io/t/published-page-throwing-404-error/18439/2 "2025-02-20T10:41:01Z")

</div>

Hi team, anything for me on this? Would really appreciate your help.

---

<div class="post-metadata">

**Author:** ![Ezekiel](https://avatars.discourse-cdn.com/v4/letter/e/848f3c/32.png) [@Ezekiel](https://community.prismic.io/u/Ezekiel)\
**Post date:** [February 20, 2025, 10:48am UTC](https://community.prismic.io/t/published-page-throwing-404-error/18439/3 "2025-02-20T10:48:35Z")

</div>

Hi @richa1,

I can confirm it's happening to me as well when I try it out, so it's likely an issue on the server-side. Here's a couple of things to look at:

#### 1️⃣ **CDN or Cache Issue**

- If a CDN (Cloudflare, AWS CloudFront, Fastly, etc.) is caching an outdated response, users may see a **404 until the cache updates**.
- **Fix:** Try purging the cache from your CDN or disable caching temporarily for this page.

#### 2️⃣ **Load Balancer Serving Different Versions**

- If you have multiple backend servers, one may **not have the latest deployment**.
- **Fix:**
  - Check if all servers have the latest version (`curl -I https://www.swagmagic.com/create-your-store` multiple times).
  - Restart the affected server instances.

#### 3️⃣ **Server-Side Routing Issue**

- If using **Next.js, React Router, or Express** , a missing route configuration could be causing **some requests to fail**.
- **Fix:**
  - **For Next.js:** Check `next.config.js` for proper `rewrites` and `fallback: true` in `getStaticPaths()`.
  - **For Express or Node.js:** Ensure `server.js` correctly handles all routes.

#### 4️⃣ **Deployment or Propagation Delay**

- If the latest version **wasn’t fully propagated** to all instances, some users might hit a 404.
- **Fix:**
  - Restart your deployment.
  - Check the deployment logs for errors.

#### 5️⃣ **Nginx / Apache Misconfiguration**

- If you're using **Nginx or Apache** , there might be a rule causing intermittent 404s.
- **Fix:**
  - Check Nginx `/etc/nginx/sites-available/default` or Apache `.htaccess` settings.
  - Make sure the `/create-your-store` path is properly routed.

Let me know if any of that helps, or what you've tried if it doesn't and we can look into it further. Any more details on your setup is also useful!

---

<div class="post-metadata">

**Author:** ![richa1](https://avatars.discourse-cdn.com/v4/letter/r/9e8a1a/32.png) [@richa1](https://community.prismic.io/u/richa1)\
**Post date:** [February 21, 2025, 11:41am UTC](https://community.prismic.io/t/published-page-throwing-404-error/18439/4 "2025-02-21T11:41:07Z")

</div>

Okay, thank you for suggesting the above solutions. We will try these and get back to you
