Published page throwing 404 error

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 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!

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

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:

:one: 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.

:two: 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.

:three: 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.

:four: 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.

:five: 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!

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

1 Like