I have several projects configured in DO, each representing an environment of my app (dev, staging, prod). I have one domain. I would like to set up DNS so that subdomains point at different environments (dev.mydomain.com, staging.mydomain.com, mydomain.com).
I see in the DO dashboard where to add a domain, but it looks like it wants to associate a domain with an individual project. Is there a way to set up DNS so that one domain can be used across projects?
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
Hii @proconnectapp,
What webserver are you using, Apache or Nginx?
You can solve it using Virtualhost, basically it is a way to virtualize a host.
Nginx - How To Set Up Nginx Server Blocks (Virtual Hosts) on Ubuntu 16.04
Apache - How To Set Up Apache Virtual Hosts on Ubuntu 16.04
Hope that helps ;)
Sergio Turpín
Hi @proconnectapp,
All you need to do is to create a subdomain and point it to your Droplet/Project. Associating the domain with a project won’t stop you from doing that so do not worry.
In regards to other configurations, please do let me know if you need any other assistance.
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.