Should I 301 my non-www accesses to www accesses?
-
We have external links pointing to both mydomain.com and www.mydomain.com. I read this: http://www.stepforth.com/resources/web-marketing-knowledgebase/non-www-redirect/ and wondered if I should add this to my .htaccess file:
RewriteCond %{HTTP_HOST} ^mydomain.com
RewriteRule (.*) http://www.mydomain.com/$1 [R=301,L]so that the link juice all flows to the www version of the site? Any reason not to do it?
-
Mike,
This is best practice on all sites. Forgetting about the links for a minute; you have two versions of the same page (in search engines eyes) so the first step is to do exactly what you're asking and consolidate into one.
The next step is to ensure your URLs end with a trailing slash because if you have www.url.com and www.url.com/ you again have two different versions.
DD
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
-
301 Redirect non existant pages
Hi I have 100's of URL's appearing in Search Console for example: ?p=1_1 These go to on to 5_200 etc.. I have tried to do htaccess and the mod rewrite is on as I can redirect directories to the root i.e RewriteRule ^web_example(.*)$ /$1 [R=301,N,L] However I have tried all kinds of variations to redirect ?p= and either it doesn't work at all or it crashes the website. Can anyone point me in the right direction to fix this.
Technical SEO | | Cocoonfxmedia0 -
301 Redirects in subfolders
Hi, we're making our site into a static site but I would like to transfer the Google juice. Most of the links and database exist on subfolders though. Could I simply do 301 redirects on the subfolders and retain the value or does it have to be on the full domain?
Technical SEO | | Therealmattyd0 -
Need Help With WWW vs. Non-WWW Duplicate Pages
A friend I'm working with at RedChairMarket.com is having duplicate page issues. Among them, both www and non-www URLs are being generated automatically by his software framework, ASP.net mvc 3. How should we go about finding and tackling these duplicates? Thanks!
Technical SEO | | BrittanyHighland0 -
Importance of 301 Redirects
Hello, I have been brought in at the last minute to consult for an e-commerce client who is about to relaunch their website. The site currently receives 8000 visits a month, 3100 of which are from organic search. They have a few thousand product pages. The web development firm they are using is changing all of the old product page urls and using 'search engine friendly' urls for the new site, which is expected to launch in a few weeks. However, they did not/are not planning on including 301 redirects from the old URLs. Other than simply stating 'this will be bad for your SEO', what would be a correct way of explaining to the client how much of a problem it will be if their new site launches without 301s. For example, is this a big enough issue to delay the launch of the site / get in a contract dispute with the web developer?
Technical SEO | | stageagent0 -
301 Redirect
Hello, On the 26.2.13 we changed domain names having followed the guidance of both Matt Cutts Youtube videos and googles own online documentation. We have a 301 redirect in place from our old domain ukmotorhomehirerental.com to our new site leisurerentalsdirect.com on a page to page basis. The site structure has not been altered in anyway. Google has been informed of the change of address. After the change the new domain transition was pretty seamless and ranked in the same postion in the SERPsThe one thing I've not done yet is tell all the webmasters who link to the old site that the address has changed (could this be it?)
Technical SEO | | Badapplemedia0 -
Canonical versus 301 for affilaite links
Affiliate links for the Volusion ecommerce shops are of the form mydomain.com/?Click=XX where XX is the affiliate ID. Volusion uses rel=canonical to redirect the affiliate links to mydomain.com. Is this a good solution? I used iDevAffiliate for another online store, and their solution was to use 301 redirects to trip off the ? string. Comments? Best,
Technical SEO | | ChristopherGlaeser
Christopher0 -
Linux Server recognizing ASP Pages (301)
Greeting, I am in the process of 301 a group of pages on our site. We are thinking about switching from ASP to a Linux Server. Question 1. - Would anyone have any information of creating a Sever Spoof so that the Linux Server will recognize asp pages for a 301? Question 2 - How will this style of 301 Effect SEO rankings? Thanks, Tony
Technical SEO | | Tonyd230 -
301 redirects inside sitemaps
I am in the process of trying to get google to follow a large number of old links on site A to site B. Currently I have 301 redirects as well a cross domain canonical tags in place. My issue is that Google is not following the links from site A to site B since the links no longer exist in site A. I went ahead and added the old links from site A into site A's sitemap. Unfortunately Google is returning this message inside webmaster tools: When we tested a sample of URLs from your Sitemap, we found that some URLs redirect to other locations. We recommend that your Sitemap contain URLs that point to the final destination (the redirect target) instead of redirecting to another URL. However I do not understand how adding the redirected links from site B to the sitemap in site A will remove the old links. Obviously Google can see the 301 redirect and the canonical tag but this isn't defined in the sitemap as a direct correlation between site A and B. Am I missing something here?
Technical SEO | | jmsobe0