.htaccess (hypertext access) redirect is very important to route all the traffic to one form of URL of their blog. It is best to use .htaccess redirect both in the case of humans and bots, as the bots and humans will be handling the URL for various purposes like linkback in case of humans or crawling in case of bots of Google and Microsoft. .htaccess redirect helps in maintaining a single format for your blog or website.
The Different forms of URL can hinder the Pagerank and other analytics, as they would take your blog or website in two different forms and rate it differently. The two most commonly seen formats are with WWW and without WWW , for example ;
http://www.domain.com
http://domain.com
The two formats will be differently handled and hence the linkbacks for humans and the URL for Google bots and Microsoft bots will not appear same. The solution for the above problem is to use .htaccess redirect.
Redirection from with www to without www can be achieved by creating a .htaccess file in your control panel root directory, this will usually be in the public_html in cpanel file manager and similarly in other Control panels like Plesk.
To redirect the with www URL to without www URL, edit the .htaccess file and insert the code given below and save:
RewriteCond %{HTTP_HOST} ^www\.(.*)$ [NC]
RewriteRule ^(.*)$ http://%1/$1 [R=301,L]
yeah u r right….this duplicate url issu can create problems with google…..learnt abt this today only at some forum…well we can manage redirects (301) from server side so that it redirects to our preferred choice of domain..i also saw an option in google webmaster tools where we can specify which url google shud consider…..i m not sure which i m gonna do out of these 3 until i read more and get expert opinions 😛
Google will let you specify which domain you want as default, but remember, the other domain is still being treated as a duplicate.
Always do a 301 redirection from server side, to avoid getting your domain marked as duplicate content host.
I did same you say in tips. I use my domain with www and permanet redirect the non-www to www domain. Thanks to share it. I really enjoy post.
Good tips. I always prefer to have “www” on my domain. I think it looks more cute. 🙂
@jasmine….
I cant understand the cuteness..could u be more elaborate on this one…
Wats cute in that?
I think this redirect is hardly going to effect pagerank because google is highly selective in indexing new urls
@usman….
google will take your two Urls differently.. the new search engine algorithm, named caffiene is much better at indexing latest news..so dontworry about ur blog being new or something..if ur blog is new.. make sure u ping the google search engine to come visit your blog using pingomatic…
Thanks for the useful seo tips
hope it helped..thank you..
Ya dude it helped a lot 🙂
@prabhakaran & @raghunath….Please try…
Interesting read! Will do this for my site!
Useful. Will give a try!. Thanks