1

I have an issue with Google crawling my site through my sitemap. Sitemaps are supposed to have encoded urls like http://example.com/attraction%2Fsoto-sakuradamon-gate%2F16892 but the problem is, how do I get Backbone to load the encoded url when Google hits that page?

I know Google can't crawl my JavaScript, but will be able to crawl the HTML snapshot I send it when visiting the encoded url. However, I need the encoded url working in order to be able to take my HTML snapshot and to fix the crawl errors in Google webmaster tools.

Any suggestions on how to solve this?

Jason Biondo
  • 736
  • 5
  • 16
  • 34
  • Purely out of interest, can you provide a link about "Sitemaps are supposed to have encoded urls"? – spender Aug 29 '14 at 19:10
  • @spender when I created a sitemap without it and ran it through google webmaster testing tools it throws an error. It also throws an error in the browser as well. – Jason Biondo Aug 29 '14 at 19:13

1 Answers1

0

I'll answer generally - you need to have routes that correspond to the encoded URL. Here is a related question which discusses this more:

backbone.js routing when query passed to route contains /

Other options include decoding in your webserver (apache/nginx):

http://backbonetutorials.com/seo-for-single-page-apps/

Additionally, you may want to double check the version of backbone you are using. Release notes indicate backbone will respond to encoded urls:

http://backbonejs.org/#upgrading

Community
  • 1
  • 1
tmruss
  • 322
  • 1
  • 8