Deployment Without SEO
If you don't require SEO functionality, you can deploy your eDemand web application on a standard shared hosting server using this simplified approach.
Building Your Application
After making all necessary changes to your web application:
- Open VS Code terminal by pressing
CTRL+Jin Windows/Linux orCMD+Jin macOS - Make sure
.envdoes not setNEXT_PUBLIC_SEO=true(unset, orfalse), then run the build:
npm run build
With SEO disabled, next.config.ts automatically sets output: "export", so this single command produces the static export.
Output Files
After the build process completes:
- Navigate to the
outfolder in your project directory - This folder contains all the files needed for deployment
- Important: Only upload files from the
outfolder to your server
Uploading to Your Server
You can use any FTP client (like FileZilla) or your hosting control panel to upload the files:
- Connect to your hosting server
- Navigate to the public directory (often named
public_html,www, orhtdocs) - Upload all files and folders from the
outdirectory - Maintain the same folder structure as in the
outdirectory
Adding the .htaccess File (Important for URL Rewriting)
You no longer need to write this file by hand — it's generated automatically.
npm run build runs generate:htaccess as part of its prebuild step (via scripts/generate-htaccess.mjs), which writes public/.htaccess for you based on your NEXT_PUBLIC_SEO setting. Since public/ is copied into out/ during export, the correct .htaccess is already included when you upload the out folder — no manual step needed.
See .htaccess Configuration for the exact rules it generates and how to customize them.
Configuring Your Domain
Once all files are uploaded:
- Point your domain to the directory containing the uploaded files
- If necessary, configure your DNS settings to point to your hosting server
- Wait for DNS propagation (can take up to 24-48 hours)
Testing Your Deployment
After deployment:
- Visit your website using your domain name
- Verify that all pages load correctly
- Test all functionality (search, user registration, login, etc.)
- Check that all assets (images, styles, scripts) are loading properly
Troubleshooting
If you encounter issues:
- Check your server error logs
- Verify that all files were uploaded correctly
- Ensure your hosting environment supports modern JavaScript applications
- Check if any server configuration is blocking your application (e.g.,
.htaccessrules)
Additional Resources
For more detailed information about Next.js deployment, refer to the official Next.js deployment documentation.