Question
Transferring existing droplet to subdomain on another droplet
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.
Thanks!
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.
×