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
-
Need advice on redirects
Hi, I have new web addresses for my subpages. None if them have external links. Should I do redirects to the new pages or just leave the old pages in 404 and let google crawl and rank the new page. I am asking because my current pages don’t have a good ranking and I am thinking starting with a clean url is better. Thank you,
Intermediate & Advanced SEO | | seoanalytics1 -
Updating 2013 Site Built with Custom Theme, Modify Existing Theme, Create New Custom Theme, Or Use Child Theme?
Our website was designed in 2013 using a custom theme. Some of the plugins are built from scratch. Ranking in our industry is hyper competitive. We are seeking a better interface and also to improve ranking. I have read that custom themes use lighter code and can rank better. Does this apply to a custom theme from 2013? Will we have an SEO advantage using a custom theme? If so, will that advantage be significant? We are using a discontinued plugin called "Firestorm" to display real estate listings. That plugin has been customized. Can we use that plugin on a new "custom" theme? How about on a "child" theme? In terms of the cost of future maintenance, will a "custom" theme require much more intervention (manual installation of updates) moving forward? Which of the following options is best: 1. Adapt our existing custom theme
Intermediate & Advanced SEO | | Kingalan1
2. Create a new custom theme
3. Create a child theme Thanks,
Alan0 -
Is there an issue with my site?
Been mostly hanging around top of page two for the last couple of years for “Liverpool Wedding photographer” although got myself on page 1 for “Liverpool photographer” I have split the title of the page to target these two keywords. I took the Liverpool photographer off the title to see if it was being detrimental to the “Liverpool wedding photographer” I didn’t see no increase in ranking so put it back as I get a bit of commercial work from it. Since last year I have got onto page 1 at least three times around position 5-6. Within a week or two I start sliding down again and end up back at top of page two. I could understand this slow push out if my competitors were busy SEO wise but from what I have seen they are not. There is a guy using the keywords in URL and calls himself “Liverpool wedding photographer” last time I checked he literally had no links but is in the first 5 positions. I have I think a better link profile than every one else. Although I am on and off with Facebook and Instagram, (more off) so that probably isn’t helping. Although I have a colleague in the video side of things and he doesn’t use social media at all and it hasn’t harmed him. A few years ago I was burned quite badly by a total charlatan. He sunk my home page to page 4. He talked the talk about creating landing pages but his methods were shoddy to say the least. I can’t believe I was taken in by him, although I was only with him for 2 months. He was still using spammy link techniques to generate lots of toxic links for me! I disavowed all of his links and put the keywords back on the home page and was back to my usual top of page 2 position within a week. Since then I have disavowed all directory links and anything not wedding related. I have an article which ranks 1st or second for “Nikon CLS”. I have also another article of 2000 words or so on another reasonable placed photography website. A few links from other vendors or people I have taken photographs for. I have about 10 featured weddings with a link on 4 good weddings blogs. I don’t think a massive amount of blog comments although I have stopped doing this. If I look at most of the competitors these are their main links, with directories as well! Last winter I put a quite substantial article about documentary wedding photography on my home page. I flew to number 2, although I photographed The World Transformed (the alternative labour conference in Liverpool). I got a lot of clicks to a gallery page (few thousand off social media} so I don’t know if that coincided with it. Same thing – watching the website go down a few positions every day until within just over a week or two I was about 4<sup>th</sup> on page 2! Its like my website is on a spring which can push into page 1 but rebounds back to top of page 2. I am staring to worry that my site has been marked as a bad character in some way because I get what seems to be rough treatment from google compared to my peers. I have written I think 4 or 5 (1500 word) articles the last couple of months talking about lenses and wedding photography related topics and Google pushed me back to page 1, peaking At position 5. I was there for a few weeks and then the slide happened again. Bit demoralised at the moment, what to do? Any help or pointers would be most appreciated. Best wishes. David.
Intermediate & Advanced SEO | | WallerD0 -
Moving career site to new URL from main site. Will it hurt SEO for main page?
For one of our clients we are building a career site and putting it under a different URL and hosting service (mainly due to security concerns of hosting it under the same host and domain). almost 100% of the incoming traffic to their current career section (which it is in a sub-folder) receives traffic for branded keywords (brand + job/career/employment), that is, there are no job position specific keywords. The client is now worried that after moving the site, the inbound traffic to the main site will be severely affected as well as the SERP results. My questions are, will the non-career related SERPs be affected? I don't see how will they be but I could be wrong If no, how could we reassure her that the SEO to the main site wont be affected? are there any case studies of a similar case (splitting part of the website under a new URL and hosting service?) Thank you for your help. PS: this is my first post so please forgive me if this has been asked before. I could not find a good response.
Intermediate & Advanced SEO | | rflores0 -
Should you cache redirects?
I would like to know what fellow SEO people think, should you cache a redirect? Problems I see with caching redirects are meta refreshes and there might be a slow down in page load, but is it a big issue? Should we cache redirects? Do pages get indexed more if you cache redirects? Our ecommerce product pages are all dynamic, and currently we cache redirects but i'm seeing a lot of meta refresh issues. Another area that cropped up is that, the redirect doesn't pass on query parameters. Our system dumps URLs and they are redirected to SEO ones, but the redirect doesn't pass on parameters like Google Analytic tracking tags. What are your thoughts? Thanks
Intermediate & Advanced SEO | | Bio-RadAbs0 -
Homepage 302 Redirect For SSL
Hi All, My site, http://domain.com, currently has a 302 redirect from http://domain.com to https://domain.com. The reason we have an SSL cert is because we have a registration and log in form on the homepage (as well as log in options in the top bar of every page on the site - email/password). My question is: When taking SEO best practices into account, would we be better having a 301 redirect from http://domain.com to https://domain.com as most of our inbound links are directed to http://domain.com. Thanks for any help!
Intermediate & Advanced SEO | | Rogs.SEO0 -
Buying Domains from an auction and 301 redirecting to your new site.
Lets say I have a website in not to competitive niche. I was considering buying a few aged domains from godaddy auctions and 301 redirecting them to my new domain. Can this alone be enough to rank pretty high for a uncompetitive niche? Can this also be a link building technique in itself since the link juice from the domain purchased carries over? Thanks
Intermediate & Advanced SEO | | junkcars0 -
Original Site content was used for submission to article directories
I had a communication problem with my writer and she used original unspun content and posted it to Unique Article Wizard. So all UAW does is take each paragraph and mix them up. So I searched a sentence on my site where the content came from and got back a bunch of returns for that sentence. My site wasn't the first result returned. I"m wondering how bad that is going to be for me. The links from UAW are going back to an anchor layer that then links back to this site. Can anyone tell me if I need to rewrite the content on the original site? That is the only way I can think to make that not an issue. Thanks
Intermediate & Advanced SEO | | mtking.us_gmail.com0