1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Domain not working with WWW in front

Discussion in 'Domain Names & Parking' started by lazlow, Dec 7, 2009.

  1. lazlow

    lazlow Regular Member

    Joined:
    Mar 22, 2009
    Messages:
    434
    Likes Received:
    965
    Occupation:
    Webmaster
    Location:
    This Place
    Hi, I have this problem where my domain doesn't redirect to my website when I type in www.mysite.com but it works fine when I type in mysite.com in browser.

    What is causing this? Any quick solution to fix this?
     
  2. Knoxgates

    Knoxgates Supreme Member

    Joined:
    Aug 9, 2008
    Messages:
    1,266
    Likes Received:
    918
    I think you need to create a DNS entry of www pointing towards your IP.
     
    • Thanks Thanks x 1
  3. lazlow

    lazlow Regular Member

    Joined:
    Mar 22, 2009
    Messages:
    434
    Likes Received:
    965
    Occupation:
    Webmaster
    Location:
    This Place
    Knoxgates could you please clarify a bit more.
    I once had this similar problem, asked my host support to fix it, they did fix it.. they said it had something to do with database.. :confused:
     
  4. cypionate

    cypionate Power Member

    Joined:
    Jun 13, 2008
    Messages:
    659
    Likes Received:
    691
    You need to create an A record for www. If it's on a dedicated server you can do this yourself. Otherwise if it's shared hosting just ask your provider to do it.

    Cyp
     
    • Thanks Thanks x 1
  5. Knoxgates

    Knoxgates Supreme Member

    Joined:
    Aug 9, 2008
    Messages:
    1,266
    Likes Received:
    918
    @lazlow:

    If you are hosting your site which offers cpanel then you have to contact your host support team. They just need to create a DNS entry of www pointing towards your domain ip.

    Right now you only have an entry of http pointing towards you domain.
     
    • Thanks Thanks x 1
  6. lazlow

    lazlow Regular Member

    Joined:
    Mar 22, 2009
    Messages:
    434
    Likes Received:
    965
    Occupation:
    Webmaster
    Location:
    This Place
    Sent a support ticket to my host asking to do that.
    Thanks dudes! ;)
     
  7. marko79

    marko79 Newbie

    Joined:
    Sep 30, 2009
    Messages:
    19
    Likes Received:
    3
    Occupation:
    dvm
    do it with .htaccess .
     
  8. Mesach

    Mesach Junior Member

    Joined:
    Oct 1, 2009
    Messages:
    108
    Likes Received:
    39
    Here is the code to do it using your .htaccess file

    Code:
    RewriteEngine on
    RewriteCond %{HTTP_HOST}   !^$
    RewriteCond %{HTTP_HOST}   !^your-domain.com [NC]
    RewriteRule ^/(.*)         http://your-domain.com/$1 [L,R=301]