Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

Does CNAME only work for subdomains? I wonder because I want to redirect from the domain name I registered, say, www.mycoolname.com, to my page at one of the famous social network web sites, say, www.fakebooked.net/coolnameofmine. Does anybody know if that is possible to accomplish somehow changing some DNS settings?

share|improve this question

migrated from stackoverflow.com Jul 12 '11 at 4:06

This question came from our site for professional and enthusiast programmers.

add comment

2 Answers 2

Short answer: no.

You can use URL forwarding services to achieve what you want to do ... which are fancy implementations of an iFRAME.

share|improve this answer
add comment

No, it's not possible. CNAME is just like an alias for a domain name (like www.mycoolname.com or www.facebooked.net). You cannot alias to another URL (like http://www.facebooked.net/coolnameofmine), because domains are not URLs.

In this example, the closest you can come is to have a CNAME from www.mycoolname.com to www.facebooked.net.

This would mean going to the URL http://www.mycoolname.com/coolnameofmine would probably be equivalent to http://www.facebooked.net/coolnameofmine

  • (unless the server at www.facebooked.net only responds to www.facebooked.net)

Of course, it would also mean that goign to http://www.mycoolname.com would be the same as going to http://www.facebooked.net/ which is not what you want.


The simplest thing you can do is check your domain registrar. Most of the big ones have options for how your domain works: they often let you chose from them hosting various DNS records, pointing your domain to external name servers, or setting up redirects. It's very likely you can just configure your domain using the control panel at your registrar to redirect.

The second best thing is to find a service that does URL forwarding (there are many), and then configure your domain appropriately (they'll have instructions on how to do it).

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.