Carter Cole LinkedInCarters Twitter PageCarter Cole on Facebook Carter Coles RSS

Friday, August 6, 2010

New SEO API - HTTP Redirect Chain Test lets you enumerate all the jumps

One of the things that you should know about redirects and SEO is that only 301 Moved Permanently if there is more than one redirect then the crawler will use the "weakest" code it saw... You can test the tool below and see how it behaves... after about 5 redirects GoogleBot will stop following them so my script also cuts off around that point. You can put any url you like below and it will show you the destination url with any hops it makes in between

To see code and use tool you need to be on original post

You can see that this default one makes too many jumps and it cuts off but lets talk about formats and how to use the API. It can return a JSON or JSONP (requires attribution link) and will follow up to 6 redirects and return info about each leg of the journey
This is a sample call, it takes 1 required parameter url= which is url to check and an optional callback= parameter if you want a JSONP response. (an object wrapped in function as output)

Ok heres the example API url
and a sample output from its response... it has a original url, a destination and its status code, as well as an array called "chain" that holds each leg of the jump

I created this for use with new version of SEO Site Tools but im releasing it publicly because I dont know of any other SEO APIs avaiable that do this kind of results so use the tool and I hope you find it useful. If you have questions bother me at one of my social profiles... im pretty sure theres hundreds now :)
built with tech

6 remarks:

Post a Comment

Link to this post if you found it usefull

New SEO API - HTTP Redirect Chain Test lets you enumerate all the jumps