Domain not working with WWW in front

lazlow

Regular Member
Joined
Mar 22, 2009
Messages
437
Reaction score
974
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?
 
I think you need to create a DNS entry of www pointing towards your IP.
 
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:
 
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
 
@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.
 
Sent a support ticket to my host asking to do that.
Thanks dudes! ;)
 
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]
 
Back
Top