developing web app with subdomains

my application will have a subdomain per customer to show their logo and some other stuff:

company1.service.com
company2.service.com

I'm trying to see what's the best way to work during development:

  1. configure the development machine HOST file to do some mapping, so I can access company1.localhost etc.
  2. Use some kind of secret config flag which the app will check to determine what is the overriden domain
  3. Do not use subdomains at all (even on production) and prefer query string

I think #1 should be ok for me just trying to see if anyone has bad experience with it or good with the other options.

I would use the first option because it is simple to setup and will reflect your target architecture. The third option is also simple to setup but it will differ from your actual scenario so you might need to make last minute changes before shipping which is never a good thing.