3 ms·
Ask HN: What's a good URL scheme for dev/test/stage/prod?
one option:
www.example.com (production)
www-staging.example.com (staging)
www-test.example.com (testing)
www-dev.example.com (dev, goes to 127.0.0.1)
other:
by port, would have to hit one ip, then redirect. could use a load balancer.
by deeper subdomain, stage.www.example.com , problems w wildcard ssl certs? would need ucc cert?
with subfolder, would have to hit one ip, then redirect
issues:
0. assume different machines for d, t, s, p
1. we have multiple real subdomains, so don't want, say "dev.example.com"
2. ssl certs
3. we always use www for webservers due to the problem w cookies on naked domains, meaning that we always 301 redirect example.com to www.example.com
4. working on multiple sites at a time
thanks!
- dylanhassinger 14y agoi like this: myapp.com << production staging.myappdev.com << staging master.myappdev.com << integration server xxx.myappdev.com << additional sandboxes as needed i am not an expert
- madpilot 14y agoProd: www.example.com Staging: www.example-staging.com Dev: www.example.dev (via host file pointing at 127.0.0.1) Slightly more expensive (you need more domains) but you sub domains are consistent, which is often easier to deal with.