Www or no www
-
right now our organization has the a robot text file set to block search engines from indexing the non-www version of our URL - example.com
looks like this
#Dynamically generated robots.txt file for example.com
User-agent: *Disallow: /
Of course, we do allow search engines to crawl the www. version
Is this the best way to do this?
-
Likewise to you Simon, thanks a lot for the advice!
-
Thanks so much Kevin. Much appreciated!
-
I wouldn't recommend setting your robots.txt to disallow indexing of the site without www. The best method is to create a domain wide 301 redirect using .htaccess. You should also set it up in Google Webmaster tools under settings and select with www as your preferred domain. Below is an example of the rewrite in .htaccess.
RewriteEngine on
RewriteCond %{HTTP_HOST} ^mysite.com [NC]
RewriteRule (.*) http://www.mysite.com/$1 [L,R=301]
Hope that helps!
Kevin
-
Hi Kevin
That is a risk, you could end up blocking search engines from indexing your entire website. Usually, both www and non-www point to the same location, so one robots.txt file can apply to both (unless you've configured your site differently).
Check out http://www.google.com/support/webmasters/bin/answer.py?hl=en&answer=44231
I'd suggest removing that Disallow command within your robots.txt file and do the following:
Within Google Webmaster Tools, go to 'Site configuration' 'Settings' ~ from there you can set how you'd like your pages to be displayed in Google's search results, either with or without the www. (or can leave Google to decide).
Regards
Simon
Got a burning SEO question?
Subscribe to Moz Pro to gain full access to Q&A, answer questions, and ask your own.
Browse Questions
Explore more categories
-
Moz Tools
Chat with the community about the Moz tools.
-
SEO Tactics
Discuss the SEO process with fellow marketers
-
Community
Discuss industry events, jobs, and news!
-
Digital Marketing
Chat about tactics outside of SEO
-
Research & Trends
Dive into research and trends in the search industry.
-
Support
Connect on product support and feature requests.
Related Questions
-
Www to non www on a .com/blog url
hi guys, I have had to reset my site from www to non-www. via htacces and this worked out just fine.However, the /blog WordPress section will not redirect to the non-www. I have changed the config.php to non-www. However, the /blog WordPress section will not redirect to the non-www. I have changed the config.php to non-www. Does anyone have an idea as to what I need to do to force the non-www in a folder installed blog http://5starweddingdirectory.com/ http://www.5starweddingdirectory.com/blog/ Regards T
Technical SEO | | Taiger0 -
301 redirect to WWW on a 2 year old website with good SERPs and organic traffic?
Hi everyone, Recently someone pointed out that my website can be accessed in both ways i.e. by typing www.example.com or example.com. He further added that Google might identify this as duplicate content and penalize my website. So now I'm thinking about 301 redirection from non WWW to WWW using htaccess method. But my website is 2 year old now and I'm getting some decent traffic from Google. Will this redirection have an adverse effect on my rankings? Is there any other way to resolve this issue? I don’t want to lose my current rankings or organic traffic. Any help would be very much appreciated. P.S. Currently Google index my website pages with WWW.
Technical SEO | | nicksharma040 -
Redirect root domain to www
I've been having issues with my keyword rankings with MOZ and this is what David at M0Z asked me to do below. Does anyone have a solution to this? I'm not 100% sure what to do. Does it hurt ranking to have a domain at the root or not? Can I 301 redirect a whole site or do I have to do individual pages. "Your campaign is looking for rankings for the www version of the campaign but the URL resolves as a root domain. This would explain the discrepancy. Since there is no re-direct between the two, you can have brickmarkers.com 301 re-direct to www.site.com which will prevent you from re-creating your campaign to track the root domain. Once the re-direct is in place it will take a while for Google to show the www version in the results in which your campaign rankings will be accurate." Thanks
Technical SEO | | SeaDrive0 -
WWW wordpress multisite network for Main
I have a year old site with not many links, and my original intent was non www so http://rootdomain.com However, since its a subdomain multisite, I have received notice from google webmaster tools because of poor quality on one of my subsites.maindomain.com I do have the google account setup to be "root domain only" - however, i am still being penalized it seems. So should I convert my wordpress main site to use WWW. and modify my google webmaster/analytics profile, update my site links, etc. Or what do you suggest?
Technical SEO | | inllc0 -
For SERPS which is better www or non www
Does it matter if i use to www or no www for SERPS on google? Obviously the redirection would be set up for either in the htaccess file.
Technical SEO | | apwade0 -
Www or no www in search results??
I am working with a client, and when I check on SERP placement, I never see the "www" in the SERP's only nameofcustomer.com not www.nameofcustomer.com. Of course there is a redirect going on...Question is...should this matter at all? I dont understand the relationship between this kind of redirect and SEO. Thank Mozzers
Technical SEO | | Giggy0 -
Www/nonwww .co.uk/.com
When I started SEO - I didn't really know what I was doing (still don't!) Just wondering if anyone can help me with this small problem. I now understand that I basically have 4 URLs www.ablemagazine.com (Page Authority: 38/100) www.ablemagazine.co.uk (Page Authority: 47/100) ablemagazine.com (Page Authority: 3/100) ablemagazine.co.uk (Page Authority: 51/100) What should be configuration be to ensure I'm not loosing masses amounts of linkjuice? At the moment I have ablemagazine.co.uk set as my default domain in webmaster tools. www.ablemagazine.com www.ablemagazine.co.uk and ablemagazine.com all 301 redirect here (I think)
Technical SEO | | craven220 -
New website branding, differences between http://www and http://
Hey Mozers! We will be creating another brand pretty soon with some pretty cool interactive features and before we start development of the site I was wondering if there are any pros/cons to branding the site sans the www. For example http://example123.com and http://www.example123.com. I would much prefer to brand it has http://example123.com but I just wanted to check first to see if that would have any negative SEO ramifications. It seems that it might just be a preference as I looked at Facebook and Twitter and they both do it differently, same with Groupon and LivingSocial. Looking forward to hearing from you guys!
Technical SEO | | Riggz1