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?
Answer
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.
No comments:
Post a Comment