Hi, what to do to make sure that my website is always indexed with www.domain.extension and not without www I have created a .htaccess file for a 301 redirect but still that didnt done the job, I can see that my website is rank without www and with www how to make sure that link juice is not divided???
301 is part of what you need to do (I assume you confirmed the redirect worked and allowed time for Google to catch up, too), but you also need to set the preferred domain to www.domain.tld in Google Webmaster Tools. To do this, you will need to add both www.domain.tld and domain.tld to Google Webmaster Tools. Next go into Configuration > Settings and choose your preferred domain. After you've saved it, you can deleted domain.tld from Google Webmaster Tools. Don't worry, due to the 301 you're barely losing link juice (a minuscule amount).
For this scenario, rel="canonical" wouldn't be appropriate. There's a loss of juice and it's not a duplicate content issue. rel="canonical" is more used when there are pages with the same (or very similar) content. For example, you might have: and it gives a list of the different widgets, but you want to sort them by colour: The content is essentially the same, so you would have: <link rel="canonical" href="http://domain.com/widgets.php" /> HTML: So you wouldn't end up with the same page multiple times (or even domain.com/widgets.php?sort=colour as the indexed page instead).