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
-
How to handle SEO redirection after remove www
Recently our https://bestclassifiedsusa.com free classifieds USA website we move from www to non www format. Now old urls still showing in Google SERP. When click they show 404 error pages due to removed old ads.
Technical SEO | | bcuclassifieds
We redirect www to non www version for main domain but still old cache pages affected.
How to dynamically handle this case, all old www version ads pages auto redirect to relevant category pages?0 -
301 Redirect Url Within a Canonical Tag
So this might sounds like a silly question... A client of mine has a duplicate content issue which will be fixed using canonical tags. We are also providing them with an updated URL structure meaning rwe will be having to do lots of 301 redirects. The URL structure is a much larger task that than the duplicate content so i planned to set up the canonicals first. Then it occurred to me id be updating the canonical tags with the urls from the old structure which brings me to my question. Will the canonical tags with the old urls redirect credit to the new urls with the 301? Or should i just wait until we have the new url structure in place and use these new urls in the canonicals? Thanks!
Technical SEO | | NickG-1230 -
404 vs 410 vs 301
Hi guys, I am managing a real estate website, and obviously we have a LOT of pages detailing each property. As those properties get sold and removed from the website, I'm wondering how best to handle this - I know 404, 410 and 301's are all valid ways to go, but I want to provide the best UX combined with the best SEO effect. My thinking is to customise a 410 page to show the page has been permanently removed, and has a relevant message (rather than a generic 404 message) and shows a search box - possibly pre-populated according to the page they were looking for.
Technical SEO | | LoonyToons
I think this gives a good UX and helps Google to understand the importance of the 000's of pages on our website.
I'd also like to clear property detail 404's as quick as possible to make it easier to see if we have problems elsewhere on the site. Having explained this to our development/SEO agency, they are strongly pushing for 301 redirects or leave as 404.
I think 301's would be the worst for UX, and as explained earlier, the volume of 404's is massive and makes it difficult to see real errors. They seem to think this is a better UX and better for SEO. Just wondering what you guys would recommend?0 -
HTacess 301 redirect with special characters
Hello moz community ! I would to make a special 301 redirection through my htaccess file. I am a total noob concerning regexp and 301 redirection. I would like to redirect(301) this url : http://www.legipermis.com/stages-points/">http://www.legipermis.com/stages-points/</a></p>; yes yes it's in the index of google, this strange url includes the last ; to http://www.legipermis.com/stages-points/ I have already include a canonical tag by security, i would like to remove url with a 301 redirection and by remove this url through GWT (but the removal tool can't "eat' this kind of URL) Please consider the fact that i am not an expert about 301 redirections and regexps. No 301 redirect generator works properly for such a strange URL (which triggers content duplication corrected anyway with canonical tag). Thanks for your help.
Technical SEO | | LegiPermis0 -
Am I using 301 correctly?
Hello, I have a 'Free download' type site for free graphics for designers. To prevent hot linking we authenticate the downloads and use a 301 redirect. So for example: The download URL looks like this if someone is clicking on the download button: http://www.website.com**/resources/243-name-of-the-file/download/dc37** and then we 301 that URL back to: http://www.website.com**/category-name/243-name-of-the-file** Is a 301 the correct way to do that?
Technical SEO | | shawn810 -
Versions of same site with www, no www, ww, and w
It's just come to light that a couple of our clients have both www. and no www versions of their site, with no 301 in place. That's all fine, we're (trying) to get them to sort it. But, strangely, one of our clients not only has the www. and no www, but they also have ww., and w. - all showing their site as normal - the only difference being that the www. and no www are both PR 3 while all other versions are N/A. Does anyone have any idea what's going on/if it's a problem? Thanks very much 🙂
Technical SEO | | Chuck-Boom0 -
Removing 301 Redirects
Is it safe to remove old 301 Redirects from an SEO standpoint and can 301s dramatically affect seo? Prior to switching our old domain over to our new domain, we had (and currently still do) tons of 301 redirects, because of optimizing our file names and structure. Then our old domain was redirected to our new domain in the same redirect file. So that being said, now that our new domain has been up and running for about 3 months, would it be safe for me to get rid of the old 301 redirects and redirect anything that was on our old domain to our new domains home page? This would clean up our redirects tremendously and I hope would help with SEO.
Technical SEO | | hfranz0 -
301 an old site to a newer site...
Hi First, to be upfront - these are not my websites, I'm asking because they are trying to compete in my niche. Here's the details, then the questions... There is a website that is a few months old with about 200 indexed pages and about 20 links, call this newsite.com There is a website that is a few years old with over 10,000 indexed pages and over 20,000 links, call this oldsite.com newsite.com acquired oldsite.com and set a 301 redirect so every page of oldsite.com is re-directed to the front page of newsite.com newsite.com & oldsite.com are on the same topic, the 301 occurred in the past week. Now, oldsite.com is out of the SERPs and newsite.com is pretty much ranking in the same spot (top 10) for the main term. Here are my questions; 1. The 10,000 pages on oldsite.com had plenty of internal links - they no longer exists, so I imagine when the dust settles - it will be like oldsite.com is a one page site that re-diretcts to newsite.com ... How long will a ranking boost last for? 2. With the re-direct setup to completely forget about the structure and content of oldsite.com, it's clear to me that it was setup to pass the 'Link Juice' from oldsite.com to newsite.com ... Do the major SE's see this as a form of SPAM (manipulating the rankings), or do they see it as a good way to combine two or more websites? 3. Does this work? Is everybody doing it? Should I be doing it? ... or are there better ways for me to combat this type of competition (eg we could make a lot of great content for the money spent buying oldsite.com - but we certainly wouldn't get such an immediate increase to traffic)?
Technical SEO | | RR5000