- Move all deployment documentation to docs/deployment/ (16 files) - Move all phase documentation to docs/phases/ (9 files) - Move deployment scripts to scripts/ (3 PowerShell scripts) - Remove temporary deployment zip files (5 files) - Remove duplicate documentation files - Create documentation indexes for better navigation - Clean up root directory to essential files only - Update documentation references Root directory reduced from ~50+ files to 20 essential files. All documentation properly organized and indexed.
5.2 KiB
5.2 KiB
🌐 Custom Domain Setup Guide
Domain: mim4u.org
Static Web App: mim-prod-igiay4-web
CNAME Target: lemon-water-015cb3010.3.azurestaticapps.net
📋 DNS Configuration Steps
Step 1: Configure DNS Records
You need to add the following DNS records at your domain registrar or DNS provider:
For Apex Domain (mim4u.org):
Option A: Using Azure Static Web App (Recommended)
- Add a TXT record for validation:
- Name:
@ormim4u.org - Type:
TXT - Value: (Will be provided by Azure when you add the hostname)
- Name:
Option B: Using CNAME (if supported by your DNS provider)
- Add a CNAME record:
- Name:
@ormim4u.org - Type:
CNAME - Value:
lemon-water-015cb3010.3.azurestaticapps.net
- Name:
For www Subdomain (www.mim4u.org):
- Add a CNAME record:
- Name:
www - Type:
CNAME - Value:
lemon-water-015cb3010.3.azurestaticapps.net
- Name:
🔧 Azure Configuration
Step 2: Add Custom Domain to Static Web App
Once DNS records are configured, add the custom domain:
# For apex domain (requires TXT validation)
az staticwebapp hostname set \
--name mim-prod-igiay4-web \
--resource-group rg-miraclesinmotion-prod \
--hostname "mim4u.org" \
--validation-method "dns-txt-token"
# For www subdomain (CNAME validation)
az staticwebapp hostname set \
--name mim-prod-igiay4-web \
--resource-group rg-miraclesinmotion-prod \
--hostname "www.mim4u.org"
Step 3: Get Validation Token (for apex domain)
# Get validation token for TXT record
az staticwebapp hostname show \
--name mim-prod-igiay4-web \
--resource-group rg-miraclesinmotion-prod \
--hostname "mim4u.org" \
--query "validationToken" -o tsv
Add this token as a TXT record in your DNS:
- Name:
asuid.mim4u.orgor_asuid.mim4u.org - Type:
TXT - Value: (validation token from above)
☁️ Cloudflare Configuration
If using Cloudflare:
Step 1: Add Domain to Cloudflare
- Log in to Cloudflare Dashboard
- Add site:
mim4u.org - Update nameservers at your domain registrar
Step 2: Configure DNS Records in Cloudflare
- Go to DNS → Records
- Add records:
| Type | Name | Content | Proxy Status | TTL |
|---|---|---|---|---|
| CNAME | www | lemon-water-015cb3010.3.azurestaticapps.net | ✅ Proxied | Auto |
| CNAME | @ | lemon-water-015cb3010.3.azurestaticapps.net | ⚠️ DNS Only (for apex) | Auto |
| TXT | _asuid | (validation token) | - | Auto |
Note: For apex domains in Cloudflare, you may need to use:
- CNAME Flattening (enabled by default in Cloudflare)
- Or use A/AAAA records pointing to Azure IPs (not recommended)
Step 3: Configure SSL/TLS
- Go to SSL/TLS → Overview
- Set encryption mode to Full (strict)
- Enable Always Use HTTPS
- Enable Automatic HTTPS Rewrites
Step 4: Configure Page Rules
Create rules for:
- Force HTTPS:
*mim4u.org/* - Cache static assets:
*mim4u.org/assets/*
Step 5: Security Settings
- Go to Security → Settings
- Configure:
- Security Level: Medium
- Challenge Passage: 30 minutes
- Browser Integrity Check: On
✅ Verification Steps
1. Verify DNS Propagation
# Check DNS resolution
dig mim4u.org
dig www.mim4u.org
# Check CNAME
dig www.mim4u.org CNAME
# Check TXT record (for validation)
dig _asuid.mim4u.org TXT
2. Verify Domain in Azure
# List configured hostnames
az staticwebapp hostname list \
--name mim-prod-igiay4-web \
--resource-group rg-miraclesinmotion-prod
# Check validation status
az staticwebapp hostname show \
--name mim-prod-igiay4-web \
--resource-group rg-miraclesinmotion-prod \
--hostname "mim4u.org" \
--query "{hostname:name, validationState:validationState}"
3. Test HTTPS
# Test HTTPS connection
curl -I https://mim4u.org
curl -I https://www.mim4u.org
# Check SSL certificate
openssl s_client -connect mim4u.org:443 -servername mim4u.org
⏱️ Timeline
- DNS Propagation: 24-48 hours (usually faster)
- SSL Certificate Provisioning: 1-24 hours after DNS validation
- Full Configuration: 24-48 hours total
🔍 Troubleshooting
Issue: Domain validation fails
Solution:
- Verify TXT record is correctly added
- Wait for DNS propagation (can take up to 48 hours)
- Check record name format (
_asuidvsasuid)
Issue: SSL certificate not provisioning
Solution:
- Ensure DNS validation is complete
- Wait up to 24 hours for certificate provisioning
- Check Azure Portal for validation errors
Issue: CNAME conflicts with apex domain
Solution:
- Use Cloudflare CNAME flattening
- Or use A/AAAA records (not recommended)
- Or use subdomain only (www.mim4u.org)
📝 Current Status
- Static Web App: ✅ Ready for custom domain
- CNAME Target:
lemon-water-015cb3010.3.azurestaticapps.net - DNS Configuration: ⚠️ Pending (needs to be done at registrar/DNS provider)
- Azure Configuration: ⚠️ Pending (waiting for DNS)
Next Steps:
- Configure DNS records at your registrar/DNS provider
- Add custom domain to Azure Static Web App
- Wait for validation and SSL certificate provisioning
- Verify HTTPS access