When deploying the React SPA to Netlify, users were getting the error:
"Looks like you've followed a broken link or entered a URL that doesn't exist on this site."
React is a Single Page Application (SPA) that handles routing client-side. When you refresh a page or access a non-root URL directly, Netlify's server tries to find that file and returns a 404 error because it doesn't exist on the server.
/* /index.html 200
This tells Netlify to redirect all routes to index.html with a 200 status code, allowing React Router to handle the routing client-side.
Added comprehensive Netlify configuration including:
- Build settings (base directory, build command, publish directory)
- Redirect rules
- Security headers
- Cache control headers
- Push your code to GitHub
- Go to Netlify
- Click "Add new site" → "Import an existing project"
- Select your GitHub repository
- Configure settings:
- Base directory:
frontend - Build command:
npm run build - Publish directory:
frontend/build
- Base directory:
- Click "Deploy site"
# Install Netlify CLI
npm install -g netlify-cli
# Navigate to frontend
cd frontend
# Build
npm run build
# Deploy
netlify deploy --prodAfter deployment:
- Visit your Netlify URL
- Try refreshing the page - should work without errors
- Try accessing the site with different URL paths - all should work
- ✅
frontend/public/_redirects- SPA redirect configuration - ✅
netlify.toml- Netlify build and deploy configuration - ✅
INSTALLATION.md- Comprehensive installation guide - ✅
README.md- Updated with quick deployment instructions
The application can work without a backend for basic hashtag generation. The backend is only needed for:
- Trending analytics
- Persistent storage
For frontend-only deployment on Netlify, no backend setup is required.
- INSTALLATION.md - Detailed installation instructions
- DEPLOYMENT.md - Full deployment guide
- Netlify SPA Docs