Is it possible to point a subdirectory to another domain?

I may be asking a stupid question here. But please bear with me.

I have and DNS A Record value of is set to this IP address.

I have a subfolder /var/www/html/mysub-folder and wondering if it is possible to set a DNS A Record value of this subfolder to another domain name,

Or do I have to use another droplet?

Submit an answer

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!

Sign In or Sign Up to Answer

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.

Want to learn more? Join the DigitalOcean Community!

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.

Hello, @okadashinichi2819

You can host multiple websites on your droplet. You can point another domain’s A record to your droplet and then create the virtual host for the domain name and point it to the subdirectory as per your wish.

If you’re using Apache the following article will help you to create another virtual host:

A similar article for Nginx (the version is for Ubuntu 16.04, but the process is relatively the same):

Regards, Alex