My DNS records direct to several droplets as specified below:
hostname | Value |
---|---|
*.django | IP#1 |
*.pipit | IP#2 |
* | IP#3 |
Navigating to the IP address, each IP displays a different content, as expected.
However, switching the subdomain/Hostname with the IP, all hostnames point to the domaine name. In that case, leacards.site.
How should I then point correctly the subdomain to the specific IP rather than the domain-name?
Thanks for your considertion.
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.
Hello @leacards
To properly handle the subdomains, you need to set up virtual hosts (for Apache) or server blocks (for Nginx) on your droplets to direct the traffic to the correct document root based on the requested domain.
For Apache, you can follow this tutorial to set up virtual hosts: How to Set Up Apache Virtual Hosts on Ubuntu 18.04.
For Nginx, you can follow this tutorial to set up server blocks: How to Set Up Nginx Server Blocks (Virtual Hosts) on Ubuntu 16.04.
Make sure to replace the example domain names with your own subdomains and IP addresses. If you still experience issues, please provide more information about your web server and configuration so we can check this with you.
Hope that this helps!