# ๐ POZO - Complete Deployment Guide with Dynamic SEO
## โ ๏ธ IMPORTANT: Follow EXACTLY in this order. Don't skip any step!
---
## ๐ Prerequisites Check
Before starting, make sure you have:
- โ
Node.js installed (check: `node --version`)
- โ
npm installed (check: `npm --version`)
- โ
Access to your IIS server
- โ
iisnode installed on IIS server
- โ
URL Rewrite module installed on IIS server
---
## ๐จ PART 1: Build the Project Locally
### Step 1: Stop any running servers
```powershell
# Kill all node processes
Get-Process -Name node -ErrorAction SilentlyContinue | Stop-Process -Force
```
### Step 2: Clean previous build (Optional but recommended)
```powershell
# Remove old dist folder
Remove-Item -Path "dist" -Recurse -Force -ErrorAction SilentlyContinue
```
### Step 3: Install dependencies
```powershell
# Make sure all packages are installed
npm install
```
### Step 4: Build the project with SEO generation
```powershell
# This runs Vite build + React Snap + SEO generation
npm run convert-jsx-to-html
```
**Expected Output:**
- โ
Vite build completes
- โ
React Snap attempts to prerender (may show warnings - ignore them)
- โ
SEO files generated for all pages
- โ
`dist/` folder created with all files
- โ
`dist/server.js` created
- โ
`dist/server/seo-middleware.js` created
- โ
`dist/web.config` created
### Step 5: Verify build output
```powershell
# Check if critical files exist
Test-Path "dist/server.js"
Test-Path "dist/server/seo-middleware.js"
Test-Path "dist/web.config"
Test-Path "dist/home/pricing-pozoapp/index.html"
Test-Path "dist/home/blog/index.html"
```
**All should return:** `True`
---
## ๐งช PART 2: Test Locally (MANDATORY!)
### Step 6: Start local server
```powershell
# Navigate to dist folder and start server
cd dist
node server.js
```
**Expected Output:**
```
Server running on port 3000
Dynamic SEO enabled!
```
### Step 7: Test in browser
Open these URLs in your browser:
1. **Home:** http://localhost:3000/home/
2. **Pricing:** http://localhost:3000/home/pricing-pozoapp
3. **Blog:** http://localhost:3000/home/blog
4. **Contact:** http://localhost:3000/home/contact-us
5. **Sign In:** http://localhost:3000/home/signin
### Step 8: Verify SEO for each page
For EACH page above:
1. Open the URL in browser
2. Press `Ctrl + U` to view page source
3. Check `
` section contains:
- โ
`` tag with correct page title
- โ
`
```
**If different, replace with above content.**
### Step 18: Set proper permissions
**On server:**
1. Right-click on website folder โ Properties โ Security
2. Add `IIS_IUSRS` with Read & Execute permissions
3. Add `IUSR` with Read & Execute permissions
### Step 19: Configure Application Pool
1. Open IIS Manager
2. Go to Application Pools
3. Find your site's app pool
4. Right-click โ Advanced Settings
5. Set:
- `.NET CLR Version`: No Managed Code
- `Enable 32-Bit Applications`: False
- `Pipeline Mode`: Integrated
### Step 20: Restart Application Pool
1. In IIS Manager โ Application Pools
2. Right-click your app pool โ Stop
3. Wait 5 seconds
4. Right-click โ Start
### Step 21: Restart IIS (optional but recommended)
**On server:**
```powershell
iisreset
```
---
## โ
PART 6: Test Production Site
### Step 22: Test your live site
Open these URLs (replace `pozo.dev` with your domain):
1. **Home:** https://www.pozo.dev/home/
2. **Pricing:** https://www.pozo.dev/home/pricing-pozoapp
3. **Blog:** https://www.pozo.dev/home/blog
4. **Contact:** https://www.pozo.dev/home/contact-us
5. **Sign In:** https://www.pozo.dev/home/signin
### Step 23: Verify SEO on production
For EACH page:
1. Open URL
2. Press `Ctrl + U` (View Source)
3. Verify ALL SEO tags are present:
- โ
Title tag
- โ
Meta description
- โ
OG tags
- โ
Twitter tags
- โ
Canonical URL
### Step 24: Test with SEO tools
1. **Google Rich Results Test:**
- Go to: https://search.google.com/test/rich-results
- Enter your page URL
- Check for errors
2. **Meta Tags Preview:**
- Go to: https://metatags.io/
- Enter your page URL
- See how it looks on social media
3. **PageSpeed Insights:**
- Go to: https://pagespeed.web.dev/
- Enter your page URL
- Check performance and SEO score
---
## ๐ TROUBLESHOOTING
### Issue 1: Site shows blank page or 404
**Solution:**
```powershell
# On server, check iisnode logs
type C:\inetpub\wwwroot\pozo.dev\iisnode\*.log
```
Check for errors, usually:
- Missing `node_modules` โ Run `npm install`
- Wrong `web.config` โ Replace with correct version
### Issue 2: SEO tags not showing
**Solution:**
1. Clear browser cache (Ctrl + Shift + Delete)
2. Check if server is actually running Node.js:
```powershell
Get-Process -Name node
```
3. Check iisnode is processing requests:
- Check `iisnode\*.log` files for activity
### Issue 3: Assets (CSS/JS) not loading
**Solution:**
1. Check browser console (F12)
2. Verify paths in HTML match actual file locations
3. Check IIS MIME types for `.js`, `.css`, `.woff`, `.woff2`
### Issue 4: Server.js not running
**Solution:**
1. Check `web.config` has correct handler
2. Verify iisnode is installed
3. Check Node.js is installed on server: `node --version`
4. Restart App Pool
---
## ๐ QUICK REFERENCE COMMANDS
### Local Development:
```powershell
# Build project
npm run convert-jsx-to-html
# Test locally
cd dist
node server.js
# Stop server
Get-Process -Name node | Stop-Process -Force
```
### On Server:
```powershell
# Install dependencies
npm install express axios
# Restart IIS
iisreset
# Check node processes
Get-Process -Name node
# View logs
type C:\inetpub\wwwroot\pozo.dev\iisnode\*.log
```
---
## ๐ฏ CHECKLIST BEFORE DEPLOYMENT
- [ ] Local build completed without errors
- [ ] Local server tested and SEO verified
- [ ] All pages show correct titles and meta tags locally
- [ ] `dist/server.js` exists
- [ ] `dist/server/seo-middleware.js` exists
- [ ] `dist/web.config` exists
- [ ] Backed up old production files
- [ ] iisnode installed on server
- [ ] URL Rewrite module installed on server
- [ ] Node.js installed on server
- [ ] `npm install` run on server
- [ ] Permissions set correctly
- [ ] Application pool restarted
- [ ] Production site tested
- [ ] SEO tags verified on production
---
## โจ SUCCESS CRITERIA
Your deployment is successful when:
1. โ
All pages load without errors
2. โ
Every page has unique, correct title in browser tab
3. โ
Page source (`Ctrl+U`) shows all SEO meta tags
4. โ
Google Rich Results Test shows no errors
5. โ
Social media preview tools show correct title, description, and image
6. โ
Assets (images, CSS, JS) load properly
7. โ
No console errors in browser (F12)
---
## ๐ SUPPORT
If you face any issues:
1. Check the TROUBLESHOOTING section above
2. Check server logs: `C:\inetpub\wwwroot\pozo.dev\iisnode\*.log`
3. Check browser console (F12) for errors
4. Verify all files uploaded correctly
5. Confirm Node.js and dependencies installed on server
---
**Created:** 2025-11-04
**Version:** 1.0
**Project:** POZO - Retail ERP & POS
**Tech Stack:** React + Vite + Node.js + Express + IIS + iisnode
---
**เฎจเฏ เฎเฎจเฏเฎค guide-เฎ เฎชเฎเฎฟ เฎชเฎเฎฟเฎฏเฎพ follow เฎชเฎฃเฏเฎฃเฎพ, 100% guarantee SEO work เฎเฎเฏเฎฎเฏ! ๐**
**Oru step-um miss เฎชเฎฃเฏเฎฃเฎพเฎคเฏ! เฎเฎฒเฏเฎฒเฎพเฎฎเฏ เฎเฎฐเฎฟเฎฏเฎพ เฎตเฎฐเฏเฎฎเฏ! ๐ช**