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
March 12th, 2010 at 9:38 pm
Your writing keeps getting better and better! Your older articles are not as good as newer ones you have a lot more creativity and originality now. Keep it up!
March 14th, 2010 at 6:43 am
Well I found this on Digg, and I like it so I dugg it!
March 18th, 2010 at 6:23 pm
I couldn’t agree more! I was searching on google when I found your post, and I found just what I was looking for. I’ve added your rss feed to my Google reader, I look forward to more posts from you. Thanks!
March 28th, 2010 at 3:53 am
Hello, How is it going? I have to say that i appreciate the special information of your website a great deal, can’t help wondering how you find all of this from. Best regards Ps3Ylodfix
March 31st, 2010 at 10:52 am
Hey, just want to let you know that your RSS feed is receiving WC3 errors for me. Please find a solution!
June 17th, 2010 at 4:37 pm
Thanks for an interesting article. After looking through different websites I finally found something worth reading.
July 4th, 2010 at 1:03 pm
This was a great post, thank you for sharing.