can't figure it out if it is possible to set up DNS record to a folder on a server. Say sub.example.com to point on 1.2.3.4/e2/
Is it possible somehow to point domains directly to folders on a server so I can have different domains hosted on one server within different folders?
No. CNAME records can only point to DNS records.
Click on "Hosting" on the left side of the page under "My Products," then click on "Manage Account" and choose "Domain Management" under "Settings." Click "Add Domain." Enter the new domain name in the field marked "Domain," and enter the sub-folder that will contain the site in the "Folder" field.
3 types of DNS queries—recursive, iterative, and non-recursive.
It is possible to host multiple domains on one server. It is called Virtual Hosting.
But you are confusing a few concepts. DNS is for converting names to ip addresses. The DNS system knows nothing about the folder structure. That is the responsibility of the webserver. You will configure Virtual Hosts on the web server.
The way this is normally done is to
Add host record (aka, A record) in DNS. For example, coolname.domain.com -> 12.34.56.78.
Configure webserver to read content for coolname.domain.com from folder of your choice.
This is generally done with virtual hosting on your web server. DNS is not meant for that.
The closest you could do is use TXT
records, but then no one other than you would be aware of that, so your clients wouldn't even know.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With