Search engines treat and evaluate http://domain.com , http://www.domain.com and http://www.domain.com/index.php seperately. So if you have incoming links to your root domain (domain.com) you are losing some great value of incoming links.
If you do a link building campaign, you can always use the same domain, but if there natural links coming to your site, you are not the one to decide which domain to link. This way, you will not have to worry about sharing the value of incoming links between root and www domains.
Is permanent redirect the solution?
Yes, doing a permanent redirect from your root domain to the complete domain will solve the problem.
Whoever types http://daily-seo.com will be permanently redirected to http://www.daily-seo.com . You can test it at our blog.
Code to add to your .htaccess file :
Just add this piece of code to your .htaccess file. If you don’t have an .htaccess file, you can create one in your root folder.
Options +FollowSymLinks
RewriteEngine on
RewriteCond %{HTTP_HOST} ^domain.com [NC]
RewriteRule ^(.*)$ http://www.domain.com/$1 [L,R=301]
Replace domain.com with your domain name.
Next time if a search engine bot or a visitor follows a link to daily-seo.com they will be landing at www.daily-seo.com
{ 4 comments… read them below or add one }
In the RewriteCond:
RewriteCond %{HTTP_HOST} ^domain.com [NC]
It is more efficient and less ambiguous to write it as:
RewriteCond %{HTTP_HOST} ^domain\.com [NC]
Because the “^domain\.com” part is a regular expression, you want to force the period to be interpreted literally.
What would be the disadvantage of using ^domain.com ? Because I have been using this on several sites (including Daily-SEO) and never faced a problem.
I have seen it elsewhere, too. It will still work, but it’s suboptimal.
In a RewriteCond, the last part is a regular expression. In a regex, a period is a special character meaning “any character.” So ^domain.com matches “domainXcom”, “domain&com”, and “domain$com”, as well as the intended “domain.com”.
By escaping the period, you’re forcing it to be interpreted literally. Thus, ^domain\.com can be interpreted only as “domain.com”. It’s unambiguous and slightly more efficient.
Let’s say we have a database driven blog, which may have some variables
in the url. Example:
http://www.adomainname.com/blogs_ma/?u=me
What is your take on using a domain name and forwarding that to that blog, or forwarding and masking that domain name to that blog? How would the search engines treat each?
Thanks!