301 or canonical for multiple homepage versions?
-
I used 301 redirects to point several versions of the homepage to www.site.com. i was just rereading moz's beginners guide to seo, and it uses that scenario as an example for rel canonical, not 301 redirects. Which is better? My understanding is that 301s remove all doubt of getting links to the wrong version and diluting link equity.
-
Looks like you found the solution below. Nice work!
-
In case this is helpful to anyone else reading this post, here is the code I am now using in the .htaccess, which seems to have eradicated the double redirect (thanks to help from phranque and lucy24 at webmasterworld):
RewriteEngine On
RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /([^/.]+/)*(index.html|default.asp)\ HTTP/
RewriteRule ^(([^/.]+/)*)(index|default) http://www.site.com/$1 [R=301,L]
RewriteCond %{HTTP_HOST} !^(www.site.com)?$ [NC]
RewriteRule (.*) http://www.site.com/$1 [R=301,L]
-
Cyrus - Thanks. A familiar face - I've seen it attached to many an article that I've read;)
While I have you here, maybe you can answer another question related to the situation that has me slightly nervous:
I've read warnings about creating a loop with a 301 redirect - and I keep being pointed to default.asp in Open Site Explorer (with the message that the url I entered - www.site.com- redirects to /default.asp) but any redirect checkers I've used don't show that. Would it be obvious if I didn't implement it correctly? It looks fine in the browser.
Would a rel canonical tag in addition to a 301 redirect be a good idea?
-
Hi Kimberly,
The rel="canonical" is a good option when you can't 301 a page. If you can 301 a page, such as /index.html or some other duplicate version, it's usually a better way to go. As you said, it removes all doubt about where to send visitors and link equity.
Both rel canonicals and 301s pass about the same amount of link equity (thought to be around 85%) so it's safe to use either.
Canonical tags are usually best when you have lots of parameters needed to render the page, like homepage?color=red&length=long&manu=apple. In this case it wouldn't make much sense to 301, and the rel canonical is easier to implement.
Hope this helps. Best of luck with your SEO.
-
Glad that was useful, Kimberly. Many times, folks just want a "when this happens, do that" kind of response, but usually in SEO there so many "it depends" aspects to an issue that it's vastly more useful to understand the Why, so you can work out the solution to the specific issue yourself. Sounds like you're that kind of person too.
That said - this discussion seems to be going round and round on you. If you want to PM me your site address, I can get a handle on your exact situation and try to explain exactly what's happening. I have my suspicions, but don't want to confuse the issue further with speculation.
Paul
-
Could the code I used explain why Open Site Explorer won't let me view link data for www.site.com, but shows me www.site.com/default.asp instead? And within that data it shows an incoming link from www.site.com as a 301 redirect. But when I check it in a browser or redirect checker, it shows www.site.com as the final destination. My head hurts.
Edit: (This is what OSE says "The URL you've entered redirects to another URL. We're showing results for www.site.com/default.asp since it is likely to have more accurate link metrics. See data for www.site.com instead?")
-
I don't have access to the control panel and the person who does never did the redirect when I asked so i just did it myself with .htaccess. So did you say I should change it to your code and that will handle everything, including the double redirect?
(Edited out a question that I figured out the answer to.)
-
So you are saying I should use the following exact code instead of the code I have:
RewriteEngine On
RewriteCond %{HTTP_HOST} !^www.domain.com$ [NC]
RewriteRule ^(.*)$ http://www.domain.com/$1 [R=301,L]And that will take care of the default.asp and index.html as well? And it won't redirect to the www in between, thus creating 2 redirects, correct?
If you don't mind explaining, what's the working difference between the first code I tried (below) and the above code that makes the above code work?
RewriteEngine On
RewriteCond %{HTTP_HOST} !^www..* [NC]
RewriteRule ^(.*) http://www.%{HTTP_HOST}/$1 [R=301,L] -
Yes that's classic asp
what sort of server is it on windows?
What sort of webserver IIS? if so what version, if it is 7 or greater it is very easy to do your redirects if you have access to the controlpanel
-
I didn't build the site, nor do I have anything to do with the hosting, but I do have FTP access. I can't remember how or why but I came to the conclusion that it's ASP Classic. Is there a quick way for me to double check? All the files end in .asp if that helps.
-
you are correct, it want do the index.html or default.asp
but this rule will solve all your domain problems, not the "!" mean not, so if not the desired domain, then redirect to the desired domain not matter what the domain is. this will fix non www, or any other secondary domain you may have such as oldDomain.com or mergedSite.com
Options +FollowSymLinks RewriteEngine On
RewriteCond %{HTTP_HOST} !^www.domain.com$ [NC]
RewriteRule ^(.*)$ http://www.domain.com/$1 [R=301,L]but if you have a page called default.asp. your site is a classic ASP site, ASP is a Microsoft technology and would be on a Microsoft web server IIS. if so 301 redirects are very easy to do.
Is your site ASP.is it on a Microsoft IIS server?
-
I would like to politely add (and first say that I do appreciate anyone's attempt at a helpful response) that it's a very delicate matter to be giving answers without 100% certainty or valid first-hand experience. At least we as a community should be careful to include somewhat of a disclaimer should our answers be anything less than certain. I, for one, do not want to steer anyone down a dangerous path. I do understand it's my responsibility to gauge the accuracy of an answer before I implement it. Think of the potential consequences to someone else if they implement bad/incorrect advice on a site - ouch!
-
Thank you Paul! Knowing the WHY behind something always solidifies my understanding of a concept. It does make me wonder why the cheat sheet linked by Sangeetac and Moz's Beginner's Guide to SEO both use that scenario as an example for a 301 redirect - it certainly adds to the confusion.
Alan - while we are on the subject...here is the code I used for the 301 redirect, which was my first ever using .htaccess. The problem is it redirects twice from certain starting points: first from site.com/default.asp to www.site.com/default.asp then to www.site.com/.
RewriteEngine On
RewriteCond %{THE_REQUEST} /index.html? [NC]
RewriteRule ^(./)?index.html?$ /$1 [R=301,L]
RewriteCond %{THE_REQUEST} /default.asp? [NC]
RewriteRule ^(./)?default.asp?$ /$1 [R=301,L]
RewriteCond %{HTTP_HOST} !^www..* [NC]
RewriteRule ^(.*) http://www.%{HTTP_HOST}/$1 [R=301,L]Initially I tried this (which I think is what you are suggesting?), but if I remember correctly, it wasn't taking care of default.asp or index.html (don't quote me on that):
RewriteEngine On
RewriteCond %{HTTP_HOST} !^www..* [NC]
RewriteRule ^(.*) http://www.%{HTTP_HOST}/$1 [R=301,L]
Thanks for helping me do things the right way!
-
Agree with Paul here.
A 301 is a directive to the crawler, while a canonical tag is only a hint and is not always followed. Bing for one will ignore canonical tags if it believes they are misused.
as for the mention of "multiple 301 redirect" .
You do not need to have a 301 redirect for every url, just follow the logic
if HTTP_Host is not myPreferredDomain then redirect to myPreferredDomain -
Sorry, I have to categorically disagree with Sangeetac here. Kimberley, your understanding is entirely correct.
There's so much misinformation and misunderstanding about canonicalization, and there doesn't really need to be.
The rel canonical tag is ONLY to be used when there is a justifiable reason why the multiple duplicate pages in question should actually be reachable via different URLs. Unless such a reason exists, you should ALWAYS use a 301 redirect.
Put another way, duplicate page issues should ALWAYS be resolved using 301 redirects unless doing so would harm the user experience.
In the case of multiple versions of a home page, there is absolutely NO BENEFIT to the user to be able to reach that page via multiple different URLs. (In fact the multiple URLs could be confusing.) Therefore, the 301 redirect should be used to FORCE the user (and search engine) to the single version the site owner has decided should be the primary URL. Again, the other URLs are pointless, so the user should be blocked from ever being able to reach them. Using the 301 in this case has the added benefit of explicitly and automatically telling the search engines that all the redirected URLs for that page should be dropped from the index as they are non-functional. (And that's exactly what happened, Kimberley, as you saw default.asp and index.htm disappear from the index.)
The ONLY time you'd use a rel canonical tag in this case, instead of a 301 redirect, is if for some reason the site owner doesn't have sufficient access to the sever files to be able to implement a 301 redirect properly. In that case, a rel canonical tag can be used as a "better than nothing" solution.
The classic example of when to use a rel canonical tag is in the case of a page that lists a large number of products. That default (and therefore canonical version) version of the page may very well list the products in the order they were added to inventory. There may well be additional versions of the page, each at a different URL (often using query parameters, for example) which lists exactly the same content, but one page sorted by size, another version sorted by colour, yet another sorted by price.
Obviously in this case, 301-redirecting those additional dupe pages to the original page would be harmful to the user experience, because the user would never be able to access the content sorted the way they want to see it. So each duplicate version of the page has value to the user and therefore MUST remain available to the user, and therefore to the search engine.
In this case, the site owner adds a rel canonical tag to each of the dupe pages pointing to the primary (canonical) version, to make it clear to the search engine that the dupe pages are intentional secondary variations that should pass all their ranking value back to the primary page. But NOTE! Google themselves say they consider the rel canonical tag as a suggestion only, and will ignore it if they deem it incorrect or manipulative. So it is NOT NEARLY as strong an indicator as a 301 redirect which forces both user and search engine into the desired behaviour.
Sorry if that got a little long-winded, but once we get clear on the basic purpose of 301 redirects vs rel canonical tags, it becomes much more straightforward which to use when. The confusion usually stems from folks trying to justify using canonical tags for purposes for which they were never designed. They are not a panacea or a catch-all for fixing site architecture mistakes.
Hope that clears, rather than muddies the waters?
Paul
-
And I just did a site operator search fror default.asp and index.htm and they are no longer in the index, though I never removed them after the 301 redirect. So I'm assuming Google did the math as expected.
-
Please excuse the typos - my iPad does not like complying
-
Thanks for the link to that cheat sheet, I had forgotten about that! I have to say, the contradictory information I find and receive regarding SEO can make learning feel counterproductive half the time. Last time I asked this question, I was told 301 redirects were the correct plan of action. Are they equally good so long as I remove the others from the index? I am still seeing default.asp in some report
-
if you have several versions of homepage, it is good to use rel='canonical' instead of 301. If you will use multiple 301 redirect then you have to make sure to remove these urls from google or bing webmaster's url removal tool. For more info about canonical tag, visit Moz's Developer cheat sheet.
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
-
Unsolved I did not know that automatic payments were being made after using the trial version. I just saw money was flowing through my credit card and I urgently canceled my subscription. Request a refund for the amount
I did not know that automatic payments were being made after using the trial version. I just saw money was flowing through my credit card and I urgently canceled my subscription. Request a refund for the amount. As i am learning will use after some time.
Moz Pro | | NatwarG
Kindly refund my amount.0 -
Duplicate Content & Rel Canonical Tag not working
I'm really questioning the legitimacy of the duplicate content flags with moz. I'm building a website that sells home decor products and a lot of the pages are similar in structure (As would be expected with a store that sells thousands of individual products). It seems a little overkill to me to flag the following pages as duplicate content. They have different urls, titles, h1, h2, and h3 tages, different meta tags, etc. Right now, it's saying that the following have duplicate page content: http://www.countryporchhomedecor.com
Moz Pro | | cp_web
http://countryporchhomedecor.com/park-designs/pillows/christmas-vacation-embroidered-pillow
http://www.countryporchhomedecor.com/donna-sharp/throws/camo-bear-throw
http://countryporchhomedecor.com/park-designs/teapots/wonderland-teapot
http://countryporchhomedecor.com/park-designs/rag-rugs/cambridge-rug-36x60
http://www.countryporchhomedecor.com/donna-sharp/lodge-quilts/king%2C-woodland
http://www.countryporchhomedecor.com/park-designs/rag-rugs/redmon-rag-rug-36x60
http://www.countryporchhomedecor.com/park-designs/valances/hearthside-valance-72x14
http://countryporchhomedecor.com/park-designs/valances/hearthside-valance-72x14
http://countryporchhomedecor.com/donna-sharp/lodge-quilts/king,-woodland
http://www.countryporchhomedecor.com/park-designs/teapots/wonderland-teapot
http://countryporchhomedecor.com/donna-sharp/throws/camo-bear-throw
http://countryporchhomedecor.com/park-designs/accessories/home-place-tumbler
http://www.countryporchhomedecor.com/donna-sharp/lodge-quilts/king,-woodland
http://www.countryporchhomedecor.com/park-designs/rag-rugs/cambridge-rug-36x60
http://www.countryporchhomedecor.com/park-designs/pillows/christmas-vacation-embroidered-pillow
http://www.countryporchhomedecor.com/donna-sharp/lodge-quilts/king%2C-woodland?pi=18
http://countryporchhomedecor.com/donna-sharp/lodge-quilts/king%2C-woodland
http://www.countryporchhomedecor.com/park-designs/accessories/home-place-tumbler
http://countryporchhomedecor.com/park-designs/rag-rugs/redmon-rag-rug-36x6 Any ideas? Also, it seems like it's not honoring the rel-canonical tag. It keeps saying that pages with a rel canonical tag are duplicates when some of the urls that it's flagging shouldn't even be indexed because of the canonical tag. The "pi" in the query string should not be indexed! http://www.countryporchhomedecor.com/bedding-&-quilts/shams/standard-shams?pi=18&page=3
http://countryporchhomedecor.com/bedding-&-quilts/shams/standard-shams?page=6
http://www.countryporchhomedecor.com/bedding-&-quilts/shams/standard-shams?page=7
http://www.countryporchhomedecor.com/bedding-&-quilts/shams/standard-shams?pi=18&page=6
http://www.countryporchhomedecor.com/bedding-&-quilts/shams/standard-shams?page=10
http://www.countryporchhomedecor.com/bedding-&-quilts/shams/standard-shams?pi=18&page=8
http://www.countryporchhomedecor.com/bedding-&-quilts/shams/standard-shams?page=8
http://www.countryporchhomedecor.com/bedding-&-quilts/shams/standard-shams
http://countryporchhomedecor.com/bedding-&-quilts/shams/standard-shams?page=7
http://www.countryporchhomedecor.com/bedding-&-quilts/shams/standard-shams?pi=18&page=7
http://www.countryporchhomedecor.com/bedding-&-quilts/shams/standard-shams?page=1
http://countryporchhomedecor.com/bedding-&-quilts/shams/standard-shams?page=8
http://www.countryporchhomedecor.com/bedding-&-quilts/shams/standard-shams?pi=18&page=5
http://www.countryporchhomedecor.com/bedding-&-quilts/shams/standard-shams?pi=18&page=10
http://countryporchhomedecor.com/bedding-&-quilts/shams/standard-shams?page=3
http://countryporchhomedecor.com/bedding-&-quilts/shams/standard-shams
http://www.countryporchhomedecor.com/bedding-&-quilts/shams/standard-shams?page=5
http://www.countryporchhomedecor.com/bedding-&-quilts/shams/standard-shams?pi=18&page=4
http://www.countryporchhomedecor.com/bedding-&-quilts/shams/standard-shams?pi=18&page=9
http://www.countryporchhomedecor.com/bedding-%26-quilts/shams/standard-shams
http://www.countryporchhomedecor.com/bedding-&-quilts/shams/standard-shams?pi=18
http://www.countryporchhomedecor.com/bedding-&-quilts/shams/standard-shams?pi=18&page=1
http://www.countryporchhomedecor.com/bedding-&-quilts/shams/standard-shams?page=6
http://countryporchhomedecor.com/bedding-&-quilts/shams/standard-shams?page=1
http://countryporchhomedecor.com/bedding-&-quilts/shams/standard-shams?page=5
http://www.countryporchhomedecor.com/bedding-&-quilts/shams/standard-shams?page=2
http://www.countryporchhomedecor.com/bedding-&-quilts/shams/standard-shams?page=9
http://countryporchhomedecor.com/bedding-&-quilts/shams/standard-shams?page=4
http://www.countryporchhomedecor.com/bedding-&-quilts/shams/standard-shams?page=3
http://countryporchhomedecor.com/bedding-%26-quilts/shams/standard-shams
http://www.countryporchhomedecor.com/bedding-%26-quilts/shams/standard-shams?pi=18
http://countryporchhomedecor.com/bedding-&-quilts/shams/standard-shams?page=9
http://countryporchhomedecor.com/bedding-&-quilts/shams/standard-shams?page=10
http://www.countryporchhomedecor.com/bedding-&-quilts/shams/standard-shams?pi=18&page=2
http://countryporchhomedecor.com/bedding-&-quilts/shams/standard-shams?page=2
http://www.countryporchhomedecor.com/bedding-&-quilts/shams/standard-shams?page=40 -
301 Redirects
Hi, Going to be redirecting our current domain to a new domain. Can anyone verify for me that I'm doing it correctly. I want to forward the entire domain plus individual urls. My current structure is below: Options +FollowSymLinks
Moz Pro | | healthpointeseo
RewriteEngine on RedirectMatch 301 ^(.*)$ http://www.new-site.net Redirect 301 /old-page.html http://www.new-site.net/web-page0 -
Crawl Diagnostics - 350 Critical errors? But I used rel-canonical links
Hello Mozzers, We launched a new website on Monday and had our first MOZ crawl on 01/07/15 which came back with 350+ critical errors. The majority of these were for duplicate content. We had a situation like this for each gym class: GLOBAL YOGA CLASS (canonical link / master record) YOGA CLASS BROMLEY YOGA CLASS OXFORD YOGA CLASS GLASGOW etc All of these local Yoga pages had the canonical link deployed. So why is this regarded as an error by MOZ? Should I have added robots NO INDEX instead? Would think help? Very scared our rankings are gonna get effected 😞 Ben
Moz Pro | | Bendall0 -
Rel=canonical "redirects" to double links
Our devs have set up rel=canonical on our website. First they used relative links href="/dir1/dir2/dir3" for the page http://www.mysite.com/dir1/dir2/dir3/?detail1=1?detail2=2 meaning that it will redirect to http://www.mysite.com/dir1/dir2/dir3, but no luck, the MOZ dashboard showed the tag value to be http://www.mysite.com/dir1/dir2/dir3/dir1/dir2/dir3, then we have decided to rewrite the code, and now the canonical to http://wwwmysite.com/dir1/dir2/dir3/?detail1=1?detail2=2 looks like href="http://www.mysite.com/dir1/dir2/dir3/" but the tag on MOZ looks like http://www.mysite.com/dir1/dir2/dir3http://www.mysite.com/dir1/dir2/dir3. So what is the problem? I really got a problem or MOZ does? The code on website looks exactly like href="http://www.aaa.com/en/bbb/ccc/vvv/nnn/" rel="canonical" /> for the page http://www.aaa.com/en/bbb/ccc/vvv/nnn/
Moz Pro | | apartmentGin0 -
Duplicate content & canonicals
Hi, Working on a website for a company that works in different european countries. The setup is like this: www.website.eu/nl
Moz Pro | | nvs.nim
www.website.eu/be
www.website.eu/fr
... You see that every country has it's own subdir, but NL & BE share the same language, dutch... The copywriter wrote some unique content for NL and for BE, but it isn't possible to write unique for every product detail page because it's pretty technical stuff that goes into those pages. Now we want to add canonical tags to those identical product pages. Do we point the canonical on the /be products to /nl products or visa versa? Other question regarding SEOmoz: If we add canonical tags to x-pages, do they still appear in the Crawl Errors "duplicate page content", or do we have to do our own math and just do "duplicate page content" minus "Rel canonical" ?0 -
Multiple Anchor text Links to 1 Page
Hi, Currently we have this page on our site - http://www.highstreetvouchers.com/gift-vouchers/gift-vouchers-cards.jsp It contains both "Gift Vouchers " & "Gift Cards" content which are 2 keywords we are targeting for. Currently the top nav link anchor is "Gift Vouchers & Gift Cards" If we were to change the top nav to be "Gift Vouchers" & "Gift Cards" as different tabs, both linking to the same page, what might be the SEO consequences? thanks
Moz Pro | | NSJ780 -
Can I have multiple domains under the same account>
I own more than one website. Can I have more than one website under this account? thanks Al
Moz Pro | | ayabi0