How to add www. Before Your Website URL
Posted on June 8th, 2009 by Aditya under Blogging Tips
This is the most common people faces when they buy a domain and launch their website. They get shocked seeing that their website do not have a “www.” before it’s URL.
When you type your address in address bar like : -
But anyhow, It redirected to
When look into verious search engines your website URL turn up without “www.”. You will be surprised to know that even google takes www.adityavyas.com and adityavyas.com as two different websites. Although, they point towards the same website . The technical name of this problem is known as Canonical Problem.
You don’t have to worry about that because I am here to help everyone to solve this problem. Specially, if you use wordpress and are facing this problem. Its damn simple to solve all, do as follows :-
-
Login into your admin panel of Wordpress
-
Click on Settings
-
Change the Wordpress Address (URL) to http://www.yourwebsite.com
-
Change the blog address (URL) to http://www.yourwebsite.com
-
Click on “Save Changes”
Now, If your website showing www. then you dont have to use anysort of CMS or stuffs. You need to manually edit your .htaccess file which can be found at public_html folder of your webspace.
Just change the .htaccess file to follow format -
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{HTTP_HOST} !^www\.domain\.com$
RewriteRule ^(.*)$ http://www.domain.com/$1 [R=301,L]
</IfModule>
Save the .htaccess file and watch out for your website. The problem will be solved.
Tip: - Sometime your might not be able to find .htaccess file using your cpanel, as it may be in hidden mode. During such matter just use a FTP client to access your file manager. You will be able to see the .htaccess file from the FTP client and edit it.
I hope all of you will be able to fix your problem.
Related posts:




June 9th, 2009 at 10:15 am
Thanks for nice article. It’s so much useful.
June 14th, 2009 at 6:14 am
Thanks for the tutorial
June 16th, 2009 at 10:14 pm
How soon will you update your blog? I’m interested in reading some more information on this issue.
June 17th, 2009 at 9:11 am
I update my blog everyday so you can check for new topics whenever you visit my blog.
June 21st, 2009 at 8:36 am
Greatings, Super post, Need to mark it on Digg
Hobosic
July 2nd, 2009 at 1:53 am
Thanks for the great info always looking for anything to increase the views on my site.
July 7th, 2009 at 2:59 pm
Hey very nice blog!! Man .. Beautiful .. Amazing .. I will bookmark your blog and take the feeds also.
July 9th, 2009 at 8:14 pm
I should say that adityaseo.com has lots of interesting information. Looks like the author did a good job. I will be coming back to adityaseo.com for new information. Thank you.
December 23rd, 2009 at 7:59 pm
thanks its useful for me too .
regards ,
Ali
February 26th, 2010 at 6:24 pm
Hello I would like to find out where you got this blog template from I adore it!
March 5th, 2010 at 3:10 am
hey this blog is great. I’m glad I came by this blog. Maybe I can contribute in the near future. PM ME on Yahoo AmandaLovesYou702