I’ve been asked to figure out why Google isn’t indexing the site that can be found at http://www.wtaarch.com. It’s not a site that I’ve worked on, and it’s a WordPress site. Here is what I know (or think I know, anyway): in Google Webmaster Tools, there are 88 pages listed as detected but not indexed. All of them indicate an http response code of 302 (temporary redirect), which I understand is not cool, as in Google won’t index it. If I click on any entry to view the detail, it says “Google couldn’t follow your URL because it redirected too many times.”
Now, here’s an example:
http://www.wtaarch.com/about/ will redirect to http://www.wtaarch.com/#!/about/. As I understand it, the “#!” is so Google knows that content is being served via Ajax, and that knowing this allows Google to properly index the page. As far as I can tell, the redirect is done via a Javascript script that is part of the WordPress theme.
So far, it sounds like I don’t want to mess with the “#!”, as that is supposed to help Google index the page, and yet it also seems to be the cause of the problem… I assume that the 302 code “is what it is” and there’s nothing I can really do to change it. I guess one possibility would be to put something in the htaccess file that does a 301 (permanent) redirect from the non-hashbanged URLs to the hashbanged ones. Presumably this would put an end to the 302 redirects, but something tells me that’s not an ideal solution. And actually, it might not work anyway. Why? Because when I put a hashbanged URL in Webmaster Tools and do a “Fetch as Google” (Fetch and Render), it works fine except that the rendering is of the site’s home page, not the page whose URL I entered, even though I have no problem accessing the page in my browser.
As far as I can tell, the sitemap.xml file works fine and Google has no problem with it per se. But it’s a virtual file, so I don’t think I could manually manipulate it to include the hashbangs in the URLs even if I wanted to (and I think it would suck to have to do that anyway). Plus, again, it might not even work. Since this isn’t “my” site, I don’t feel as though I have the luxury of doing a lot of trial-and-error messing around.
Does anyone have any ideas? Thanks in advance for any help!