Hi, I have two droplets that are each currently accessed through their own domains (let’s called them domainA and domainB). However, I would like to merge the domains so that the droplet accessed via domainB is a now accessed as a subdomain of domainA.
I created an A record for a subdomain for domainA, and when I navigate to subdomain.domainA.com it successfully takes me to the site hosted on domainB’s droplet. However, the url in the browser changes to domainB.com instead of staying subdomain.domainA.com. What should I do to make sure the url displays correctly?
Additionally, I will likely keep domainB around for awhile in case old users try to return to it, but I would like it to redirect to subdomain.domainA.com. However I still want to keep the subdomain on a different droplet so I don’t have to change all the db references and such in my code.
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!
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.
Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.
Click below to sign up and get $200 of credit to try our products over 60 days!