Hi there,
Quick question- how could I have so that when people visit my site: mydomain.com, it automatically adds a www. making it www.mydomain.com?
~ Thanks
Hi there,
Quick question- how could I have so that when people visit my site: mydomain.com, it automatically adds a www. making it www.mydomain.com?
~ Thanks
Log into your Cpanel interface
- select Redirects
- add a Redirect
Type: Permanent (301)
http:// yourdomain.com /
redirects to --> http:// www.yourdomain.com
www redirection: Do Not Redirect WWW
- click ADD
Go to http://yourdomain.com and see if it redirects to http://www.yourdomain.com
Mike
Note that a mod_rewrite rule may be more effective as mod_rewrite can take http://yourDomain.com/anything and automatically convert it to http://www.yourDomain.com/anything
Do an Internet Search for this, there are plenty of tutorials on how to do this. You would simply place these rules in a .htaccess file.
This is what I use in my .htaccess file:
Code:RewriteEngine On RewriteCond %{HTTP_HOST} ^domain\.com$ [NC] RewriteRule ^(.*)$ http://www.domain.com/$1 [R=301,L]