Mobile app version of vmapp.org
Login or Join
Frith620

: "Fetch as Google" doesn't find the HTML snapshot for my AJAX content For my webpage I generate the content via JavaScript, so I want to use ?_escaped_fragment_ to redirect Google to my HTML

@Frith620

Posted in: #CrawlableAjax #EscapedFragment #FetchAsGoogle #GoogleSearchConsole #Seo

For my webpage I generate the content via JavaScript, so I want to use ?_escaped_fragment_ to redirect Google to my HTML snapshot.

I have a RewriteRule for my Apache

RewriteEngine on
RewriteCond %{REQUEST_URI} ^/$
RewriteCond %{QUERY_STRING} ^_escaped_fragment_=/?(.*)$
RewriteRule ^(.*)$ /snapshot/.snapshot_.html [NC,L]


Which redirects ?_escaped_fragment_= to /snapshot/.snapshot_.html (http://example.com/?_escaped_fragment_=). This works fine.

I also added <meta name="fragment" content="!"> to my homepage.

When I do "Fetch as Google" in my Webmaster Tools, it doesn't fetch the content of the ugly url but from example.com.

Is there anything I did not consider?

10.02% popularity Vote Up Vote Down


Login to follow query

More posts by @Frith620

2 Comments

Sorted by latest first Latest Oldest Best

 

@Heady270

Google's John Mueller answered a similar question in the Google Product Forums:


For URLs that use the AJAX-crawling scheme, you need to submit the "escaped-fragment" versions in Fetch as Google. The "hash-bang" URLs themselves won't work there.


It appears that "Fetch as Google" isn't able to handle hash bang URLs or fragment meta tags.

10% popularity Vote Up Vote Down


 

@Si4351233

"Fetch as Google" does not fetch the same way as Google does. "Fetch as Google" doesn't check the page for the meta tag. (The crawling algorithm does)

A workaround is adding it manually in the "fetch as Google" statement. ex:
example.com/?_escaped_fragment_=

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme