{"id":3103,"date":"2011-08-18T12:41:41","date_gmt":"2011-08-18T04:41:41","guid":{"rendered":"http:\/\/www.janleow.com\/life\/?p=3103"},"modified":"2011-08-18T12:41:41","modified_gmt":"2011-08-18T04:41:41","slug":"domain-name-with-without-www-prefix","status":"publish","type":"post","link":"https:\/\/www.janleow.com\/life\/domain-name-with-without-www-prefix.html","title":{"rendered":"To use or not to use WWW before your domain name"},"content":{"rendered":"<p>It seems the www. prefix to your domain name is actually a subdomain. When internet first started, and website were being created, www prefix would refer to a website as being a World Wide Web, probably trying to differentiate from the intranet website I suppose.<\/p>\n<p>However, due to frequent usage, most people would consider affixing a www prefix whenever they type in a domain in the URL address. Hence as webmaster, we still maintained the www prefix to a domain. And yet, using it, it actually means a subdomain, and hence when you make your website, it is referring to the various pages in the subdomain of the www.yourwebsite.com! <!--more--><\/p>\n<p>In the web hosting provider, the control panel has set up the DNS to point the URL with or without the www prefix to the same content. In some ways this is not good in terms of SEO because with and without the prefix is considered as separate domain, thus search engine like Google would treat it as separate and ends up as duplicate content, and there is a possibility of getting both pages penalized. If you are lucky then just one of the pages will still show up during search while the other is sandboxed.<\/p>\n<h3>Setting your Website with or without the WWW prefix<\/h3>\n<p>So the way out for this is to use the Apache htaccess configuration file and make it redirect to your preferred URL display. Easily done by including this entry to set the condition in the htaccess file:<\/p>\n<blockquote><p>\n# To redirect all users to access the site WITH the &#8216;www.&#8217; prefix,<br \/>\n# (http:\/\/example.com\/&#8230; will be redirected to http:\/\/www.example.com\/&#8230;)<\/p>\n<p>RewriteCond %{HTTP_HOST} ^example.com$ [NC]<br \/>\nRewriteRule ^(.*)$ http:\/\/www.example.com\/$1 [L,R=301]\n<\/p><\/blockquote>\n<blockquote><p>\n# To redirect all users to access the site WITHOUT the &#8216;www.&#8217; prefix,<br \/>\n# (http:\/\/www.example.com\/&#8230; will be redirected to http:\/\/example.com\/&#8230;)<\/p>\n<p>RewriteCond %{HTTP_HOST} ^www.example.com$ [NC]<br \/>\nRewriteRule ^(.*)$ http:\/\/example.com\/$1 [L,R=301]\n<\/p><\/blockquote>\n<p>Now the question is, which way is better? With or without the www prefix?<\/p>\n<p>Actually there is no which one is better. It is up to your preference. If you like it with the prefix based on the traditional way most websites were set up, then add it in. If you would prefer straight in without the prefix to make the URL look nicer and shorter, so be it. So far most websites is still sticking to the traditional URL with the prefix on their domain name. Facebook, Microsoft, Google, Yahoo, etc they are still using the prefix. Twitter has done away with the prefix perhaps to keep in character with their short 140 character blog limit!<\/p>\n<p>Once you have chosen your preferred URL display, you should use the Apache rewrite configuration to set only one way for your domain URL to be displayed to avoid the duplicate content issue.<\/p>\n<p>In terms of SEO, neither has any advantage over the other. So it is just a matter of personal preference.<\/p>\n<p>I suppose you can even separate your website sections by providing different content for the www and non-www section. You can separate it by configuring your DNS to treat each separately. But I wouldn&#8217;t recommend that, as it would lead to confusion for your visitors. There are so many other subdomain names you can choose for better sectioning of your website!<\/p>\n<h3>Short Domain Names<\/h3>\n<p>Since of recent, I&#8217;ve been experimenting with short domain names, I decided to do away with the www prefix and see how it goes. Mind you, it is very difficult to get nice short domain names. Virtually impossible to get 3 letters or 3 characters domains with .com, .net, .org, etc. They are all gone and taken up! The 4 letters (or some people call it the LLLL.com or 4L TLDs) is probably all gone though you might still get lucky with .net, .org, etc; while there is still possibilities with 4 character (CCCC.com or 4C TLDs). I got one with a mix of alphabets and a number and it is a .com.<\/p>\n<p>Why go for .com? Well, it is more recognizable, also when most people key in directly into the address bar, they tend to type .com extension rather than .net or .org. In terms of search, it doesn&#8217;t matter which extension you use. Hey you can even use the less popular .info or .biz, but in all my search experience, only a few rare .info and .biz websites pop up. Somehow a .com seemed to do better but not always. Perhaps it is due to the popularity of the .com. After all, Wikipedia uses .org and they still do well in search.<\/p>\n<p>So with short domain name for my website, I decided to go without the www prefix and make the address shorter when showing in the URL address bar of the browser. In case somebody types in with the www prefix, the Apache htaccess condition entry will resolve that for me. In terms of search, no issue at all. Just make sure all your SEO linking efforts is pointing to an address without the www prefix.<\/p>\n<p>Alright, back to fixing my website!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>It seems the www. prefix to your domain name is actually a subdomain. When internet first started, and website were being created, www prefix would refer to a website as being a World Wide Web, probably trying to differentiate from the intranet website I suppose. However, due to frequent usage, most people would consider affixing &hellip;<\/p>\n<p class=\"read-more\"> <a class=\"\" href=\"https:\/\/www.janleow.com\/life\/domain-name-with-without-www-prefix.html\"> <span class=\"screen-reader-text\">To use or not to use WWW before your domain name<\/span> Read More &raquo;<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_newsletter_tier_id":0,"footnotes":"","jetpack_publicize_message":"","jetpack_is_tweetstorm":false,"jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","enabled":false}}},"categories":[12],"tags":[111,160,161,162],"jetpack_publicize_connections":[],"jetpack_sharing_enabled":true,"jetpack_featured_media_url":"","jetpack_shortlink":"https:\/\/wp.me\/p1bS5F-O3","jetpack-related-posts":[{"id":1488,"url":"https:\/\/www.janleow.com\/life\/playing-around-with-dns-zone.html","url_meta":{"origin":3103,"position":0},"title":"Playing Around with DNS Zone","author":"Jan","date":"7 May 2010","format":false,"excerpt":"I've been tinkering and fiddling with my domain DNS zone. I tweak my website a lot. This is one interesting hobby, making website, experimenting with a feature here and there and trying something new and see whether it will be useful widget or just some red herring. DNS zoning is\u2026","rel":"","context":"In &quot;Website&quot;","block_context":{"text":"Website","link":"https:\/\/www.janleow.com\/life\/category\/website"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":2944,"url":"https:\/\/www.janleow.com\/life\/removed-infolinks-code.html","url_meta":{"origin":3103,"position":1},"title":"Removed Infolinks Code","author":"Jan","date":"21 March 2011","format":false,"excerpt":"Finally removed Infolinks code since it conflicts with Kontera T&Cs. I had to remove the related tags as well when Kontera send me another mail saying that has to be removed too. I was still thinking of testing out Infolinks somehow. Since Kontera and Infolinks must not show at the\u2026","rel":"","context":"In &quot;Website&quot;","block_context":{"text":"Website","link":"https:\/\/www.janleow.com\/life\/category\/website"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":631,"url":"https:\/\/www.janleow.com\/life\/joomla-smf-forum-installation-guide.html","url_meta":{"origin":3103,"position":2},"title":"Joomla SMF forum installation guide","author":"Jan","date":"17 April 2007","format":false,"excerpt":"I've come across several website where they have integrated Joomla with SMF (Simple Machine Forum). I thought it would be nice to have the two programs together thereby having a same overall look and feel theme when you make your own website. It turns out to be not so difficult\u2026","rel":"","context":"In &quot;Website&quot;","block_context":{"text":"Website","link":"https:\/\/www.janleow.com\/life\/category\/website"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":2703,"url":"https:\/\/www.janleow.com\/life\/vox-com-closing-its-free-blogging-service.html","url_meta":{"origin":3103,"position":3},"title":"Vox.com Closing its Free Blogging Service","author":"Jan","date":"3 September 2010","format":false,"excerpt":"Oh, oh, looks like Six Apart's Vox.com is closing its door. Another free blogging service bites the dust. I have been using Vox.com for mobile blogging since 31\/Aug\/2008 or roughly for about two years. And what a coincidence the date I sign up was on Malaysia Merdeka Independence day! The\u2026","rel":"","context":"In &quot;Website&quot;","block_context":{"text":"Website","link":"https:\/\/www.janleow.com\/life\/category\/website"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":566,"url":"https:\/\/www.janleow.com\/life\/basic-information-about-web-hosting-for-beginners.html","url_meta":{"origin":3103,"position":4},"title":"Basic information for choosing a web hosting provider","author":"Jan","date":"1 January 2006","format":false,"excerpt":"When it comes to choosing a web hosting provider, you will need to do some research and find out which hosting provider would be suitable for you. There are so many hosting companies throughout the world and going through them all would really be a difficult task. What I will\u2026","rel":"","context":"In &quot;Website&quot;","block_context":{"text":"Website","link":"https:\/\/www.janleow.com\/life\/category\/website"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":3583,"url":"https:\/\/www.janleow.com\/life\/how-to-recover-from-a-faulty-corrupted-wordpress-sql-database-caused-by-bad-plugins.html","url_meta":{"origin":3103,"position":5},"title":"How to Recover from a Faulty Corrupted WordPress SQL Database caused by Bad Plugins","author":"Jan","date":"30 July 2012","format":false,"excerpt":"I guess eventually it would happen, the Wordpress SQL database would eventually get corrupted from bad plugins. Wordpress plugins are useful, but they also create configuration inserted into the WP_options MySQL table that are difficult to sort out. If the plugins worked well, no need to do anything. But if\u2026","rel":"","context":"In &quot;Website&quot;","block_context":{"text":"Website","link":"https:\/\/www.janleow.com\/life\/category\/website"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]}],"_links":{"self":[{"href":"https:\/\/www.janleow.com\/life\/wp-json\/wp\/v2\/posts\/3103"}],"collection":[{"href":"https:\/\/www.janleow.com\/life\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.janleow.com\/life\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.janleow.com\/life\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.janleow.com\/life\/wp-json\/wp\/v2\/comments?post=3103"}],"version-history":[{"count":0,"href":"https:\/\/www.janleow.com\/life\/wp-json\/wp\/v2\/posts\/3103\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.janleow.com\/life\/wp-json\/wp\/v2\/media?parent=3103"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.janleow.com\/life\/wp-json\/wp\/v2\/categories?post=3103"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.janleow.com\/life\/wp-json\/wp\/v2\/tags?post=3103"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}