News for hackers. Stuff that matters.

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!

( 2 comments | 2 points | on HN )
Re:Ask HN: What's a good URL scheme for dev/test/stage/prod? by dylanhassinger on Monday December 10, 2012 @02:37AM (#4897963)
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

Re:Ask HN: What's a good URL scheme for dev/test/stage/prod? by madpilot on Monday December 10, 2012 @06:21AM (#4898539)
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.