

Ask HN: What's a good URL scheme for dev/test/stage/prod? - elchief

one option:<p>www.example.com (production)<p>www-staging.example.com (staging)<p>www-test.example.com (testing)<p>www-dev.example.com (dev, goes to 127.0.0.1)<p>other:<p>by port, would have to hit one ip, then redirect. could use a load balancer.<p>by deeper subdomain, stage.www.example.com , problems w wildcard ssl certs? would need ucc cert?<p>with subfolder, would have to hit one ip, then redirect<p>issues:<p>0. assume different machines for d, t, s, p<p>1. we have multiple real subdomains, so don't want, say "dev.example.com"<p>2. ssl certs<p>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<p>4. working on multiple sites at a time<p>thanks!
======
dylanhassinger
i 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
Prod: 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.

