Can a DNS record point to an address like my.domain.com/subdir1
|
DNS records only map IP addresses to hostnames so in a word, no You could, however, use a hostname configuration in your web server to serve a subdirectory when a request comes in. Like having something.domain.com redirect/equate to somethingelse.domain.com/downhere. That would depend on your web server software, not DNS. |
|||||||
|
|
CNAME records are part of the Domain Name System, the naming system for the internet. Their only purpose is to translate host names, like Your example So, a workaround could be to define a CNAME to a different host header, which redirects to your folder using the HTTP status response 301 ("moved permanently"):
All web servers and web programming languages provide commands for these types of redirects. |
||||
|
|
|
What you're asking for is a URL redirect. A CNAME record will NOT accomplish this. Your easiest bet would probably be to either use an .htaccess file or (even easier) just write a quick web page with a meta refresh or a javascript redirect to automatically redirect the user. You didn't mention your OS or web server so I'm just trying to provide the best generic answer I can. |
|||
|
|
|
No. CNAME records can only point to DNS records. You're looking for a HTTP redirect. |
|||
|
|