Infinite 302 redirects on a site using Angular JS
-
I'm not quite sure what I'm seeing here. It's a site that uses Angular JS (version 1) and the crawl is showing infinite 302 redirects, but the redirects are all to the same URL?
Here's an example: https://www.razoo.com/us/story/Armco-Park-Foundation
Has anyone seen this before? What causes it and how do I counsel the client on how to fix it?
-
Indeed: thanks for the update. AngularJS is a great technique but relatively new and so much different from the techniques we've gotten used to working with in the past couple of years that this is an interesting case.
Good luck with the project and cool to see more people using AngularJS!
-
Thank you so much for following up, Katherine! We really appreciate it.
-
The pages are definitely 302 redirecting 10+ times - shown in both the Deepcrawl and Screaming Frog data, but not in the tools l like redirect checker. The redirects showed up in Screaming Frog and Deepcrawl.
I got my answer from Nicholas Chimonas who is on the Online Geniuses slack group and I've posted his response below.
-
Google Fetch & Render won't work as the site wasn't set up properly. And I got the data from Deepcrawl AND Screaming Frog, but that didn't help me with the why.
Nicolas Chimonas actually helped me figure it out and posted the answer on the Online Geniuses Slack group as well as the Tech SEO Google+ community, and here it is for all who are curious:
Nicholas ChimonasJun 7, 2016<a data-content="Figured%20I'd%20post%20my%20thoughts%20for%20the%20community%20here%20that%20I%20brought%20up%20in%20the%20Online%20Geniuses%20slack.%3Cbr%3E%3Cbr%3EAngular%20is%20throwing%20a%20wrench%20in%20the%20works%2C%20I'm%20not%20sure%20cloaking%20is%20really%20the%20intent%20here%20%3Cspan%20class%3D%22proflinkWrapper%22%3E%3Cspan%20class%3D%22proflinkPrefix%22%3E%2B%3C%2Fspan%3E%3Ca%20class%3D%22proflink%20aaTEdf%22%20href%3D%22%2F117530250543183103093%22%20oid%3D%22117530250543183103093%22%3ERick%20Bucich%3C%2Fa%3E%3C%2Fspan%3E%26nbsp%3Byou'll%20notice%20the%20differences%20in%20code%20when%20you%20view-source%20versus%20inspect%20element%20with%20chrome%20dev%20tools.%3Cbr%3E%3Cbr%3EExcerpt%20taken%20from%20%3Ca%20rel%3D%22nofollow%22%20target%3D%22_blank%22%20href%3D%22http%3A%2F%2Fipullrank.com%2F6-things-you-should-know-about-in-chrome-devtools%2F%22%20class%3D%22ot-anchor%20aaTEdf%22%20jslog%3D%2210929%3B%20track%3Aclick%22%20dir%3D%22ltr%22%3Ehttp%3A%2F%2Fipullrank.com%2F6-things-you-should-know-about-in-chrome-devtools%2F%3C%2Fa%3E%20%3A%3Cbr%3E%22First%20things%20first%2C%20View%20Source%2C%20we%E2%80%99ve%20had%20great%20times%20together%2C%20but%20it%E2%80%99s%20over.%20In%20the%20post-JavaScript%20age%2C%20there%20is%20little%20value%20in%20looking%20at%20the%20pure%20source%20code%20of%20a%20page%20before%20its%20JavaScript%20transformations.%20In%20fact%2C%20due%20to%20Google%E2%80%99s%20vast%20improvements%20in%20crawling%2C%20this%20is%20a%20fundamental%20flaw%20of%20all%20SEO%20crawling%20tools%20in%20that%20crawlers%20are%20not%20seeing%20the%20code%20as%20the%20user%20or%20Google%20sees%20it.%20Rather%2C%20SEO%20tools%20are%20seeing%20the%20code%20as%20it%E2%80%99s%20downloaded%20and%20not%20as%20it%E2%80%99s%20rendered.%20Granted%2C%20crawling%20with%20headless%20browsers%20is%20both%20slower%20and%20far%20more%20computationally%20expensive%2C%20but%20it%E2%80%99s%20also%20just%20a%20requirement%20at%20this%20point%20given%20the%20adoption%20rate%20of%20JavaScript%20frameworks.%20If%20you%E2%80%99re%20not%20using%20Inspect%20Element%20to%20review%20code%2C%20you%20are%20likely%20missing%20a%20big%20part%20of%20the%20picture.%22%3Cbr%3E%3Cbr%3ESo..%20with%20that%20in%20mind%2C%20I%20also%20went%20the%20route%20of%20investigating%20the%20page%20with%20different%20user-agents.%20By%20the%20way%2C%20Katherine%20fetched%20the%20URL%20as%20Googlebot%20and%20was%20served%20a%20302%20redirect%20in%20WMT.%3Cbr%3E%3Cbr%3EThis%20is%20the%20URL%20as%20Googlebot%20sees%20it%2C%20as%20mentioned%20totally%20different%20outline%2C%20and%20text%2C%20and%20links%20on%20the%20page.%3Cbr%3E%3Cbr%3E%3Ca%20rel%3D%22nofollow%22%20target%3D%22_blank%22%20href%3D%22http%3A%2F%2Fi.imgur.com%2FqQ4kwm2.png%22%20class%3D%22ot-anchor%20aaTEdf%22%20jslog%3D%2210929%3B%20track%3Aclick%22%20dir%3D%22ltr%22%3Ehttp%3A%2F%2Fi.imgur.com%2FqQ4kwm2.png%3C%2Fa%3E%3Cbr%3E%3Cbr%3EBoth%20of%20these%20red%20boxes%20in%20this%20image%20are%20links%20to%20%3Ca%20rel%3D%22nofollow%22%20target%3D%22_blank%22%20href%3D%22https%3A%2F%2Fwww.razoo.com%2Fstory%2FArmco-Park-Foundation%22%20class%3D%22ot-anchor%20aaTEdf%22%20jslog%3D%2210929%3B%20track%3Aclick%22%20dir%3D%22ltr%22%3Ehttps%3A%2F%2Fwww.razoo.com%2Fstory%2FArmco-Park-Foundation%3C%2Fa%3E%3Cbr%3E%3Cbr%3EWhich%20resolves%20when%20browsing%20as%20Googlebot.%20Notice%20the%20lack%20of%20%2Fus%2F%20prior%20to%20%2Fstory%2F%2C%20navigate%20to%20the%20above%20URL%20and%20you'll%20be%20302%20redirected%20to%20the%20%2Fus%2F%20URL.%3Cbr%3E%3Cbr%3EVersus%20when%20I'm%20in%20chrome%2C%20%3Ca%20rel%3D%22nofollow%22%20target%3D%22_blank%22%20href%3D%22https%3A%2F%2Fwww.razoo.com%2Fstory%2FArmco-Park-Foundation%22%20class%3D%22ot-anchor%20aaTEdf%22%20jslog%3D%2210929%3B%20track%3Aclick%22%20dir%3D%22ltr%22%3Ehttps%3A%2F%2Fwww.razoo.com%2Fstory%2FArmco-Park-Foundation%3C%2Fa%3E%20is%20a%20302%20redirect%20to%20%3Ca%20rel%3D%22nofollow%22%20target%3D%22_blank%22%20href%3D%22https%3A%2F%2Fwww.razoo.com%2Fus%2Fstory%2FArmco-Park-Foundation%22%20class%3D%22ot-anchor%20aaTEdf%22%20jslog%3D%2210929%3B%20track%3Aclick%22%20dir%3D%22ltr%22%3Ehttps%3A%2F%2Fwww.razoo.com%2Fus%2Fstory%2FArmco-Park-Foundation%3C%2Fa%3E%3Cbr%3E%3Cbr%3E%3Ca%20rel%3D%22nofollow%22%20target%3D%22_blank%22%20href%3D%22http%3A%2F%2Fi.imgur.com%2Flw9ta0R.png%22%20class%3D%22ot-anchor%20aaTEdf%22%20jslog%3D%2210929%3B%20track%3Aclick%22%20dir%3D%22ltr%22%3Ehttp%3A%2F%2Fi.imgur.com%2Flw9ta0R.png%3C%2Fa%3E%3Cbr%3E%3Cbr%3ESo%20that's%20where%20your%20redirect%20loop%20is%20coming%20from.%3Cbr%3E%3Cbr%3EThose%20links%20to%20%3Ca%20rel%3D%22nofollow%22%20target%3D%22_blank%22%20href%3D%22https%3A%2F%2Fwww.razoo.com%2Fstory%2FArmco-Park-Foundation%22%20class%3D%22ot-anchor%20aaTEdf%22%20jslog%3D%2210929%3B%20track%3Aclick%22%20dir%3D%22ltr%22%3Ehttps%3A%2F%2Fwww.razoo.com%2Fstory%2FArmco-Park-Foundation%3C%2Fa%3E%20which%20are%20highlighted%20in%20red%20boxes%20only%20appear%20for%20Googlebot%2C%20they%20don't%20appear%20on%20the%20human%20browser%2C%20or%20the%20screaming%20frog%20without%20being%20headless%20and%20spoofed%20as%20Googlebot%3Cbr%3E%3Cbr%3ESo%20when%20Googlebot%20is%20served%20up%20a%20version%20of%20the%20page%20which%20302%20redirects%20them%20from%20%3Ca%20rel%3D%22nofollow%22%20target%3D%22_blank%22%20href%3D%22https%3A%2F%2Fwww.razoo.com%2Fstory%2FArmco-Park-Foundation%22%20class%3D%22ot-anchor%20aaTEdf%22%20jslog%3D%2210929%3B%20track%3Aclick%22%20dir%3D%22ltr%22%3Ehttps%3A%2F%2Fwww.razoo.com%2Fstory%2FArmco-Park-Foundation%3C%2Fa%3E%20to%20%3Ca%20rel%3D%22nofollow%22%20target%3D%22_blank%22%20href%3D%22https%3A%2F%2Fwww.razoo.com%2Fus%2Fstory%2FArmco-Park-Foundation%22%20class%3D%22ot-anchor%20aaTEdf%22%20jslog%3D%2210929%3B%20track%3Aclick%22%20dir%3D%22ltr%22%3Ehttps%3A%2F%2Fwww.razoo.com%2Fus%2Fstory%2FArmco-Park-Foundation%3C%2Fa%3E%20they%20instead%20are%20once%20again%20served%20%3Ca%20rel%3D%22nofollow%22%20target%3D%22_blank%22%20href%3D%22https%3A%2F%2Fwww.razoo.com%2Fstory%2FArmco-Park-Foundation%22%20class%3D%22ot-anchor%20aaTEdf%22%20jslog%3D%2210929%3B%20track%3Aclick%22%20dir%3D%22ltr%22%3Ehttps%3A%2F%2Fwww.razoo.com%2Fstory%2FArmco-Park-Foundation%3C%2Fa%3E%20because%20the%20user-agent%20is%20Googlebot%2C%20which%20once%20again%20302%20redirects%20them%20to%20%3Ca%20rel%3D%22nofollow%22%20target%3D%22_blank%22%20href%3D%22https%3A%2F%2Fwww.razoo.com%2Fus%2Fstory%2FArmco-Park-Foundation%22%20class%3D%22ot-anchor%20aaTEdf%22%20jslog%3D%2210929%3B%20track%3Aclick%22%20dir%3D%22ltr%22%3Ehttps%3A%2F%2Fwww.razoo.com%2Fus%2Fstory%2FArmco-Park-Foundation%3C%2Fa%3E%20etc.%20ad%20infinitum%EF%BB%BF" data-profiledetails="%7B%22profileId%22%3A%22104133087852424173047%22%2C%22realName%22%3A%22Nicholas%20Chimonas%22%7D">Share</a>Figured I'd post my thoughts for the community here that I brought up in the Online Geniuses slack.
Angular is throwing a wrench in the works, I'm not sure cloaking is really the intent here +Rick Bucich you'll notice the differences in code when you view-source versus inspect element with chrome dev tools.
Excerpt taken from http://ipullrank.com/6-things-you-should-know-about-in-chrome-devtools/ :
"First things first, View Source, we’ve had great times together, but it’s over. In the post-JavaScript age, there is little value in looking at the pure source code of a page before its JavaScript transformations. In fact, due to Google’s vast improvements in crawling, this is a fundamental flaw of all SEO crawling tools in that crawlers are not seeing the code as the user or Google sees it. Rather, SEO tools are seeing the code as it’s downloaded and not as it’s rendered. Granted, crawling with headless browsers is both slower and far more computationally expensive, but it’s also just a requirement at this point given the adoption rate of JavaScript frameworks. If you’re not using Inspect Element to review code, you are likely missing a big part of the picture."So.. with that in mind, I also went the route of investigating the page with different user-agents. By the way, Katherine fetched the URL as Googlebot and was served a 302 redirect in WMT.
This is the URL as Googlebot sees it, as mentioned totally different outline, and text, and links on the page.
http://i.imgur.com/qQ4kwm2.png
Both of these red boxes in this image are links to https://www.razoo.com/story/Armco-Park-Foundation
Which resolves when browsing as Googlebot. Notice the lack of /us/ prior to /story/, navigate to the above URL and you'll be 302 redirected to the /us/ URL.
Versus when I'm in chrome, https://www.razoo.com/story/Armco-Park-Foundation is a 302 redirect tohttps://www.razoo.com/us/story/Armco-Park-Foundation
http://i.imgur.com/lw9ta0R.png
So that's where your redirect loop is coming from.
Those links to https://www.razoo.com/story/Armco-Park-Foundation which are highlighted in red boxes only appear for Googlebot, they don't appear on the human browser, or the screaming frog without being headless and spoofed as Googlebot
So when Googlebot is served up a version of the page which 302 redirects them fromhttps://www.razoo.com/story/Armco-Park-Foundation to https://www.razoo.com/us/story/Armco-Park-Foundation they instead are once again served https://www.razoo.com/story/Armco-Park-Foundation because the user-agent is Googlebot, which once again 302 redirects them to https://www.razoo.com/us/story/Armco-Park-Foundation etc. ad infinitum
-
Sounds like Deepcrawl, Screaming Frog, and Google Fetch & Render.
-
Hi Katherine,
Hmm difficult to answer that question since we don't know the techniques you are using on this site. Apart from AngularJS.
This site show me a 200-header code. Which is an indication that everything is OK.
http://www.webconfs.com/http-header-check.php
What site gave you the 302-header code? One of MOZ's tools?
Bas
-
I should clarify that I'm seeing the redirect chain in Deepcrawl and Screaming Frog, and via Google's fetch and render tool inside Google Search Console.
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
-
Site Redesign Performance
Hi, I am looking for a bit of advice if possible. In October 2018 we did a site redesign for a website that we had acquired (www.drainageonline.co.uk) but we have lost SO much organic traffic since Oct (-40/50% each month). I have amended any crawl errors including broken redirects ensuring all 301's that we put in place are working correctly, ensured 404 pages working OK, implemented canonical onto all pages along with other bits but we don't really seem to be seeing any improvements in our organic traffic. Can anyone offer any advice on the above? Thanks, Lea
Intermediate & Advanced SEO | | GAP_Digital_Marketing0 -
Rebranded Website Uses a Forward Slash /at End of URS-Is This Considered a Redirect?
Our website was rebranded and relaunched. The old site did not use a / at the end of the URL. The site uses a forward slash at the end of the URL. My developer claims that this makes no difference, that in Google's eyes this is meaningless. My concern is that link juice will be lost because this necessitates a redirect. Links that were developed in the last few months now are redirected to the identical domain, but with a backslash at the end. Is this something to be concerned about or is it meaningless? Thanks,
Intermediate & Advanced SEO | | Kingalan1
Alan0 -
What IP Address does Googlebot use to read your site when coming from an external backlink?
Hi All, I'm trying to find more information on what IP address Googlebot would use when arriving to crawl your site from an external backlink. I'm under the impression Googlebot uses international signals to determine the best IP address to use when crawling (US / non-US) and then carries on with that IP when it arrives to your website? E.g. - Googlebot finds www.example.co.uk. Due to the ccTLD, it decides to crawl the site with a UK IP address rather than a US one. As it crawls this UK site, it finds a subdirectory backlink to your website and continues to crawl your website with the aforementioned UK IP address. Is this a correct assumption, or does Googlebot look at altering the IP address as it enters a backlink / new domain? Also, are ccTLDs the main signals to determine the possibility of Google switching to an international IP address to crawl, rather than the standard US one? Am I right in saying that hreflang tags don't apply here at all, as their purpose is to be used in SERPS and helping Google to determine which page to serve to users based on their IP etc. If anyone has any insight this would be great.
Intermediate & Advanced SEO | | MattBassos0 -
1 Ecommerce site for several product segments or 1 Ecommerce site for each product segment ?
I am currently struggling with the decision whether to create individual ecommerce sites for each of 3 consumer product segments or rather to integrate them all under one umbrella domain. Obviously integration under 1 domain makes link building easier, but I am not sure how far google will favor in rankings websites focussed on one topic=product segment. Product segments are medium competitive.Product segments are not directly related but there may be some overlap in customer demographics- Any thoughts ?
Intermediate & Advanced SEO | | lcourse1 -
Do you use your own Blog networks?
Do you use a network of sites you own for links to your clients in your seo efforts? I see so many seo companies doing this from such junk sites with all their clients in the blog roll, it seems totally crazy. It seems this stuff works do any of you do this if so how do you keep it white hat?
Intermediate & Advanced SEO | | DavidKonigsberg0 -
Site #2 beats site #1 in every aspect?
Hey guys, loving SEOMoz so far and will definitely continue my subscription after the free trial. I have a question however, which I am really confused about. When researching my primary keyword, I have found that the second ranked site beats the top site in every single aspect, apart from domain age, which is almost 6 years for the top one and 6 months for the second. When I say every single aspect, I mean everything. More authority for the page and domain, more links, more anchor text links, more authoritive links, more social signals, more relevant links, better domain (although second ranked site is a .net), better MozRank, better MozTrust etc.... I have noticed though, that in the UK SERPs, those sites are switched, so #2 is actually #1. Could it be that the US SERPs just haven't updated yet, or am I missing something completely different.
Intermediate & Advanced SEO | | darrenspeed1 -
Does having many 302 redirects on a site hurt rankings?
I am working with an affiliate website which has many product listings but the "Buy Now" button on each product listing is an external link (affiliate link) to the appropriate product page on the actual website where the product can be bought. Each of these external links passes through an internal redirect, which is implemented as a 302. Consequently, when SEOmoz crawls that site, it gives me a warning that there are hundreds of 302 redirects on the site. Do you think this will hurt the site's potential to rank? Should I remove the redirects and leave them as direct links to the external site?
Intermediate & Advanced SEO | | AlexFusman0 -
Dupicated Site Issues?
We are launching a new site for the Australian market and the URL will just be siteAU.com. Currently the tech team (before we came on board) has it setup with almost exactly the same content (including the site css/nav/structure etc). Some product page content is slightly different, and category pages have different product orders, plus there are location pages that are specific to AU, but otherwise it's the same. The original site: site.ca has been around for 6+ years, with several thousand pages and solid organic ranking (though the last few months have dropped ) Will the new AU site create issues for the original domain? We also have siteUSA.com which follows the same logic and has been live for a while.
Intermediate & Advanced SEO | | BMGSEO0