0

If we have two components in a API

api front-end

and we have three environments staging qa development

and a domain name superproduct.com

What would be the most logical domain spacing:

http://development.front-end.superproduct.com
http://development.api.superproduct.com

http://qa.front-end.superproduct.com
http://qa.api.superproduct.com

http://staging.front-end.superproduct.com
http://staging.api.superproduct.com

or the other way around:

http://front-end.development.superproduct.com
http://api.development.superproduct.com

http://front-end.qa.superproduct.com
http://api.qa.superproduct.com

http://front-end.staging.superproduct.com
http://api.staging.superproduct.com
1

Both are completely correct. It can differ organisation by organisation. Also, once you start using one of the domain namespace type, you will gradually remember the format and no issues will come. However, I can see one issue here which is related to SSL.

If you go with any one of the above mentioned namespaces, you need to generate multiple SSL certificates such as *.api.superproduct.com and *.front-end.superproduct.com.

If you go with other namespace type then SSL certs will be required for *.staging.superproduct.com, *.qa.superproduct.com and *.development.superproduct.com.

To avoid this, I would suggest you to have the domains in either of the following formats.

  1. <component-name>-<env-name>.superproduct.com

Examples are: api-qa.superproduct.com, api-staging.superproduct.com etc.

  1. <env-name>-<component-name>.superproduct.com

Examples are: qa-api.superproduct.com, staging-api.superproduct.com etc.

In this case, only one SSL certificate for *.superproduct.com will be required.

You can go ahead with the best possible option as per your requirements and analysis.

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.