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

I have a domain that needs to redirect from www.subdomain.domain.net to subdomain.domain.net

I know this is possible, but how? It isn't automatic. What DNS records do I need to update?

share|improve this question
    
Are you hosting this web site by your self. Are you using apache ? –  proy Mar 12 '12 at 5:27
    
Nope, shared hosting. –  CommunistPancake Mar 12 '12 at 5:29

2 Answers 2

up vote 3 down vote accepted

Update your DNS with a CNAME record.

NAME                TYPE   VALUE    
foo.example.com.    CNAME  bar.example.com.

or in your case:

NAME                     TYPE   VALUE    
www.subdomain.domain.net CNAME  subdomain.domain.net

For more information, look at wikipedia's description

share|improve this answer

If you just want www.subdomain.domain.net to work then just setup DNS and setup the web server to respond to that host header as well as the normal one.

If you want www.subdomain.domain.net to actually change in the browsers URL bar to subdomain.domain.net that'll require the DNS change and the web server being configured to return 301 responses along with the new URL to redirect to.

share|improve this answer

Your Answer

 
discard

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.