@@ -13,6 +13,22 @@ This guide covers two deployment environments:
1313Both environments use ** floating IPs** for stable DNS configuration and leverage
1414** Hetzner DNS** for complete zone management.
1515
16+ ### Domain Choice Considerations
17+
18+ #### ` .dev ` Domains (HSTS Preload Required)
19+
20+ - ** ⚠️ Browser Behavior** : ALL browsers automatically redirect HTTP → HTTPS
21+ - ** 🔒 SSL Required** : HTTPS certificates mandatory for browser access
22+ - ** ✅ Security** : Enhanced security with forced encryption
23+ - ** 🧪 Testing** : Use curl for HTTP API testing during development
24+
25+ #### ` .com ` Domains (Standard HTTP/HTTPS)
26+
27+ - ** 🌐 Normal Behavior** : Browsers respect server HTTP/HTTPS configuration
28+ - ** 🔧 Flexibility** : Can start with HTTP and migrate to HTTPS when ready
29+ - ** 📈 Production** : Standard choice for production services
30+ - ** 🛠️ Development** : Easier for development and testing workflows
31+
1632### Floating IP Architecture
1733
1834The deployment uses dedicated floating IPs to maintain stable DNS records across
@@ -199,6 +215,10 @@ deployment target:
199215
200216For testing and development using the staging domain:
201217
218+ ⚠️ ** Important** : ` .dev ` domains are on Chrome's HSTS preload list, meaning ALL browsers
219+ automatically redirect HTTP to HTTPS. For testing without SSL certificates, use curl
220+ commands or consider using a ` .com ` domain instead.
221+
202222``` bash
203223# Create staging environment configuration
204224make infra-config-staging PROVIDER=hetzner
@@ -716,7 +736,55 @@ by Hetzner. Use `hcloud server-type list` for current availability.
716736 - ` infrastructure/config/providers/hetzner.env `
717737 - Environment variable: ` export HETZNER_API_TOKEN=your_token_here `
718738
719- #### 3. Provider Configuration Variable Collision
739+ #### 3. Browser HTTPS Redirect Issues with .dev Domains
740+
741+ ** Problem** : Web browsers automatically redirect HTTP to HTTPS for ` .dev ` domains, even when server
742+ only serves HTTP.
743+
744+ ** Root Cause** : ` .dev ` domains are on Chrome's HSTS preload list, which ALL browsers respect.
745+
746+ ** Symptoms** :
747+
748+ ``` bash
749+ # These work fine with curl
750+ curl http://tracker.torrust-demo.dev/health # ✅ Works
751+ curl https://tracker.torrust-demo.dev/health # ❌ May fail if no SSL
752+
753+ # But browsers automatically redirect HTTP → HTTPS
754+ http://tracker.torrust-demo.dev → https://tracker.torrust-demo.dev (automatic)
755+ ```
756+
757+ ** Solutions** :
758+
759+ 1 . ** Use .com domains for testing** (no HSTS preload):
760+
761+ ``` bash
762+ # .com domains work normally with HTTP in browsers
763+ http://tracker.example.com # Works in browsers if server serves HTTP
764+ ```
765+
766+ 2 . ** Install SSL certificates for .dev domains** :
767+
768+ ``` bash
769+ # Deploy with HTTPS support
770+ make app-deploy ENVIRONMENT_TYPE=staging ENVIRONMENT_FILE=staging-hetzner
771+
772+ # Access via HTTPS
773+ https://tracker.torrust-demo.dev
774+ ```
775+
776+ 3 . ** Use curl for HTTP testing with .dev domains** :
777+
778+ ``` bash
779+ # For API testing during development
780+ curl http://tracker.torrust-demo.dev/api/health_check
781+ curl " http://tracker.torrust-demo.dev/api/v1/stats?token=TOKEN"
782+ ```
783+
784+ ** Important** : This behavior is ** specific to .dev domains only** . Regular .com domains
785+ do not have this HSTS preload requirement.
786+
787+ #### 4. Provider Configuration Variable Collision
720788
721789** Problem** : Error "Configuration script not found" in provider directory.
722790
0 commit comments