-1

So I'm having an argument with my boss over what domains to use when developing a website project.

I believe, since all of our projects are developed locally in virtualbox with NAT setting, that we should always be developing on a real domain that we own and have control over. We can just use a "dev" subdomain or similar on the dev environments. So for example, we own the ourcompany.com domain and we can develop locally on dev.ourcompany.com. We just need to make it company policy that a "dev" subdomain is reserved for local development. The hosts file would look something like:

192.168.1.1 dev.ourcompany.com

My boss says we should use an invalid url like "ourcompanydev" for development. As it would create less confusion. The hosts file will look something like:

192.168.1.1 ourcompanydev

To me, the "invalid url" method seemed like a bad idea but I tried it out and it worked fine. It still makes me uncomfortable though because what if some browser or application in the future decides that it's going to check whether a url is valid before even trying to resolve.

Are my concerns unfounded? Is it okay to use an invalid URL for local development?

  • 2
    Your boss is only correct because he's the boss. – jscott Sep 21 '16 at 15:29
  • Maybe you can show this to your boss: serverfault.com/questions/17255/… though I do not agree 100% with the opinions there. – Ryan Babchishin Sep 21 '16 at 15:37
  • "It still makes me uncomfortable though because what if some browser or application in the future decides that it's going to check whether a url is valid before even trying to resolve." You'll make a quick change to the development version of the app to accommodate it? – ceejayoz Sep 21 '16 at 15:45
3

Both Methods are valid approaches. Use what works for you. I'd personally try to avoid something on your prod domain to limit problems e.g. going to dev.companydomain.com expecting your dev environment and getting your local environment. (I use $something.local for my local dev work).

Your concern about a browser checking if a url is 'valid' is not really a problem. http://ourcompanydev/ is a perfectly valid url. unless you where doing something that violated rfc with your name it's not a concern. Of course it probably wouldn't work anyway at that point.

0

It's absolutely okay to use a domain like ourcompanydev for local development. Think about localhost for example, it resolves to different hosts on all computers, but it's probably the most commonly used domain name to development.

The key here is that ourcompanydev is a valid domain name just as localhost is. It might not be accessible from the outside, but there won't ever be a day that browsers, or applications complain about it.

Also, dev.ourcompany.com probably is more confusing than ourcompanydev, as it implies whatever VM is shared across all of ourcompany.com.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.