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
-
Wrong redirect used
Hi Folks,
Intermediate & Advanced SEO | | Patrick_556
I have a query & looking for some opinions. Our site migrated to https://
Somewhere along the line between the developer & hosting provided 302 redirect was implemented instead of the recommended 301 (the 301 rule was not being honured in the htaccess file.)
1 week passed, I noticed some of our key phrases disappear from the serps 😞 When investigated, I noticed this the incorrect redirect was implemented. The correct 301 redirect has now been implemented & functioning correctly. I have created a new https property in webmaster tools, Submitted the sitemap, Provided link in the robots.txt file to the https sitemap Canonical tags set to correct https. My gut feeling is that Google will take some time to realise the problem & take some time to update the search results we lost. Has anyone experienced this before or have any further thoughts on how to rectify asap.0 -
Can I undo 301 redirects to purchase site
A website I am thinking of buying has 301 redirected all pages on his site to one page that explains the site is closing down. If I tell him to change the 301 to 302s will I be able to recover the old pages on the site and keep the authority, rankings and link power of the old pages and not the "Closing page"? Is all i have to do is undo the 301 redirects and everything will go back to how the site was before the 301s were in place? Or will I lose all the link power on individual pages because they already transferred to the "Closing page"? Thanks!
Intermediate & Advanced SEO | | atomiconline0 -
Redirecting old mobile site
Hi All, Trying to figure out the best option here. I have a website that used to utilize a separate mobile site (m.xyz.com) but now utilizes responsive design. What is the best way to deal with that old mobile site? De-index? 301 redirect back to the main site in the rare case someone finds the m. site somewhere? THanks! Ricky
Intermediate & Advanced SEO | | RickyShockley0 -
Moving to a new site while keeping old site live
For reasons I won't get into here, I need to move most of my site to a new domain (DOMAIN B) while keeping every single current detail on the old domain (DOMAIN A) as it is. Meaning, there will be 2 live websites that have mostly the same content, but I want the content to appear to search engines as though it now belongs to DOMAIN B. Weird situation. I know. I've run around in circles trying to figure out the best course of action. What do you think is the best way of going about this? Do I simply point DOMAIN A's canonical tags to the copied content on DOMAIN B and call it good? Should I ask sites that link to DOMAIN A to change their links to DOMAIN B, or start fresh and cut my losses? Should I still file a change of address with GWT, even though I'm not going to 301 redirect anything?
Intermediate & Advanced SEO | | kdaniels0 -
Why does old "Free" site ranks better than new "Optimized" site?
My client has a "free" site he set-up years ago - www.montclairbariatricsurgery.com (We'll call this the old site) that consistently outranks his current "optimized" (new) website - http://www.njbariatricsurgery.com/ The client doesn't want to get rid of his old site, which is now a competitor, because it ranks so much better. But he's invested so much in the new site with no results. A bit of background: We recently discovered the content on the new site was a direct copy of content on the old site. We had all copy on new site rewritten. This was back in April. The domain of the new site was changed on July 8th from www.Bariatrx.com to what you see now - www.njbariatricsurgery.com. Any insight you can provide would be greatly appreciated!!!
Intermediate & Advanced SEO | | WhatUpHud0 -
Explaining 301 redirects instead of 302
I am trying to explain in layman's terms to a client why using 302 for their redirects (which they have done themselves) is not right. There view is they do not seem to listen or believe what is being said to them and do not want to do permanent damage to the old domain so are using 302 redirects. I have explained over and over 301 is needed but I do not seem to be good at communicating this. Can someone give me a good example or description I can use to get my point across?
Intermediate & Advanced SEO | | JohnW-UK0 -
Is my site being penalized?
I launched http://rumma.ge in February of this year. Because I'm using a domain hack (the Georgian domain), I'd really like to rank for just the word "rummage". After launching, I was steady at around page 4/5 on searches for "rummage". However since then I've tumbled out of the first 100. In fact I can't even find the site in the first 20 pages on Google for that search. Even a search for my exact homepage title text doesn't bring up the site, despite the fact that the site is still in the index. I'm wondering if one of the following could be the root cause: We have a ccTLD (.ge)--not sure about the impacts of this, but seems like it might not be the root cause because we were ranking for "rummage" when we first launched. Tried running an Adwords campaign but the site was flagged as a "bridge page" (working on getting this addressed). I'm wondering if this could have carryover impacts into natural search rankings? We've tried doing some press and built up a decent number of backlinks over the past couple of months, many of which had "rummage" in the anchor text. This was all organic, but happened over the span of a month which may be too fast? Am I being penalized? Beyond checking indexing of the site, is there a way to tell if I've been flagged for some bad behavior? Any help or thoughts would be greatly appreciated. I'm really confused by this since I feel like I've been doing things right and my rankings have been travelling downward. Thanks!! Matt
Intermediate & Advanced SEO | | minouye0 -
Can this site be optimised?
I have been told that because of the technology this site was developed with it cannot be changed for example urls title and meta tags cannot be changed. why is that and what other types of sites also cannot be changed. http://www.alliedpickfords.com/Pages/Landing.aspx For example i have been told alot of online stores cannot be optimised because the urls change every time some one goes to the page therefor you cant lionk to a certain page is that true and what is the way around it if any.
Intermediate & Advanced SEO | | duncan2740