How to redirect non www to www using DSN - Cname

Discussion in 'Web Hosting' started by wilyjose, Apr 9, 2015.

  1. #1
    Hello I would like to know how I can redirect non www to wwww using only DSN management

    Thanks
     
    wilyjose, Apr 9, 2015 IP
  2. TheSHosting

    TheSHosting Member

    Messages:
    24
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    48
    #2
    Redirection is not possible at DNS ( if that is what you meant ) level. DNS is supposed to be for name resolution and redirection should be done at web server level. You can redirect the domain name based on the web server you use ( using htaccess rule with Apache as an example ).
     
    TheSHosting, Apr 10, 2015 IP
  3. wilyjose

    wilyjose Active Member

    Messages:
    245
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    81
    #3
    I figures out this. I used domain forwarding option and seems to work

    Thanks
     
    wilyjose, Apr 12, 2015 IP
  4. 4i4i

    4i4i Active Member

    Messages:
    3
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    51
    #4
    The best an clean way is with .htaccess file:
    RewriteCond %{HTTP_HOST} ^site.com$ [NC]
    
    RewriteRule ^(.*)$ http://www.site.com/$1 [R=301,L]
    Code (markup):
     
    4i4i, May 25, 2015 IP