I've recently had to deal in several of my sites with the www vs. non www URL addresses issue. That is, for example, both jaffa-cakes.com and www.jaffa-cakes.com used to show exactly the same page, and this is bad because if Google attempts to index both addresses, your rankings could be damaged due to duplication. So I did some research and I found 3 solutions to this problem. The 3 of them work, and I thought I'd put them in a post in case other people find it useful. SOLUTION 1 - Use .htaccess to do a 301 redirect When you land on a page and it redirects you to another address, the server always gives your browser a reason why you are being redirected. One of the possible reasons that can be given is: "because the original page has been moved permanently". That reason is referred to with the number 301, so whenever your browser is given a "301 redirect", you are being told that you should forget the old address and in the future go straight to the new one. To make your server redirect your visitors (and Google!) to the www versions of your site, you can edit the .htaccess file in the root of your site, and add this line: Redirect 301 / http://www.kromfeld.com.ar/ This means: * The "Redirect" bit is telling your webserver to redirect the visitors * 301 is the reason "moved permanently" * "/" means that this applies to your entire site (it works recursively from / (the root directory) on). * http://www.kromfeld.com.ar/ is the domain (subdomain in this case) where the visitors should be sent. So your visitors always end up at the www address, regardless or whether they typed or followed a link with or without the www’s. SOLUTION 2 - Use the webmaster tools You can sign up for the Google webmaster tools at: http://www.google.com/webmasters/tools And you can follow the instructions to add your site to your account and then verify it. Then, in the left hand menu, you can go to "Tools" and then "Set preferred domain", and there you can specify whether Google should index your pages with or without the www's. Solution 2 is straight to the point, as you're telling Google directly what you want. However, people tend to have 2 concerns: * You might not want to give all your stats away to Google * Solution 2 only works for Google, while solution 1 works with all search engines. SOLUTION 3 - Point your domain and your www to different servers Google say that if you have your domain (i.e. l4u.com.ar) and the domain (i.e. www.l4u.com.ar) pointed to different servers, you should be alright. So, if you can manage your DNS's, make sure your www subdomain is pointed (with an A record) to your actual hosting server while the domain (without the www's) is pointed somewhere else. This is particularly easy to do when you have a domain in the account you have with the registrar, but you're hosting your site somewhere else. What you can do, is instead of pointing l4u.com.ar to the hosting server, just point www.l4u.com.ar to the server. Solution 3 rules out the duplication danger, but it does have 2 problems that I’m aware of: * If people link to your site without the www’s, the search engines probably won’t count it. * If people type your site’s address without the www’s they might not end up at your site and get frustrated. Some browsers and DNS servers tend to add the www’s automatically whenever the non-www site doesn’t seem to exist. With some registrars, you can configure your non-www to be redirected to the www version (which in turn will go wherever you have your site hosted). Be careful, however, that this redirection is a simple and clear URL redirection that makes the www’s appear in your browser even if you didn’t type them and that your site doesn’t appear inside a frame (as that might make it invisible to search engines). That’s all for now. If you have something to add and/or correct, you're more than welcome to post. Hope someone finds it useful. Cheers, Alex
Or do none of these , Google treats www.mydomain.com and http://mydomain.com as the same domain, www (if rightly configured ) is a c name , meaning it is the same as, or is another name for. There is no duplicate issue there , Google is clever, not stupid
Well, Sleuth1, you are not quite right - I would rather say that from the very beginning you need to have a clear URL stucture that says what is right: www. or non-www version...
SE's see www. and non www. as 2 differents URLS otherwise how could the same page have different PR?!?! By leaving it this way, you are splitting your SEO efforts for two pages instead of having all the links pointing to the same page for example.
but there not, check the forum in my sig , if you set the www as a sub-domain ( that is on its own A record ) then you are asking for trouble. Screwing with these records can give you a lot of grief , not just for SEO either, ask any webhost , Rule number one, know what you doing first
Not necessarily, as that would rule out the possibility of using the www and non-www subdomains for completely different purposes
And why would you do that ? when people type www.mydomain.com or http;//mydomain.com or mydomain.com they rightly expect to see the same files , right ? If you create a separate sub-domain which you appear to be doing : www.mydomain.com and display other files, then confusion abounds, for people search engines , whomever. If you display the same files, then you are doubly clueless , and google may treat you accordingly , can you explain your logic in doing this and why you advise others to do the same?
Although search engines try and do a good job at finding what people want, that doesn't necessarily mean that just because people expect one particular thing, search engines are gonna do exactly that.
I have read a lot of things about the issue and i really cant understand why its a problem. I hope sleuth1 is right and im gonna trust him now by not doing anything on my www and non www....coz i have one problem in 301 redirect.. i dont have access to cpanel and cant access my .hhtpd config....anyways thanks for clearing things...sleuth1 thanks
First of all, Google see www.domain.com and domain.com as 2 different domains. for example see this example1 and this example2 . Look at the results of indexed sites of both examples. www or non www in Webmaster tools tells Google that domain.com=www.domain.com, but Yahoo and other search engines spiders will not know this... So the 301 redirect is better. I don't know why google don't see domain.com and www.domain.com as a duplicated content. I'm still wondering why domain.com is not seen the same as www.domain.com. I think it's a technical problem, or something.... cheers