Google indexing pages with #! although we don't have any
Our company has developed a Single Page Application using AngularJS and its routing. Google indexed our site decently with JavaScript but it did not index some pages very well so we have developed an HTML only version.
We have followed the Ajax Crawling Specification posted here and have a <meta name='fragment' content='!'> tag and canonical urls. We expect http://www.example.com/foo/bar to be fetched from http://www.example.com/?_escaped_fragment_=/foo/bar.
However, we have found out that when we rolled the AJAX specification we now have all pages indexed twice, once with the JavaScript version as http://www.example.com/foo/bar and once with the new version as http://www.example.com/#!/foo/bar. This is harmful to us since it's duplicate content and also mis-representing out site.
I have tried looking for similar questions here and in the Google product forum but could not come up with anything.
When in doubt, use rel="canonical". This could be as simple as putting <link rel="canonical" href="http://blog.example.com/dresses/green-dresses-are-awesome" /> in your <head>. See Google for more info.
This won't keep bots from crawling both "versions", but it will tell Google (and other SERPs) to only index the canonical document.
I don't really understand about javascript.
In Google indexing, us the canonical url in <head> like @philtune says. But if you can't expect http://www.example.com/foo/bar to be fetched from http://www.example.com/?_escaped_fragment_=/foo/bar .
Google Fetch just fetched the canonical url.
In this case, the url is http://www.example.com/foo/bar, google will index http://www.example.com/foo/bar too.
If you want Google index you're page, add this script in <head>:
<meta content='index, follow' name='googlebot'/>
and then fetch again using the Google Fetch.
Note:
google will crwal and follow and crawl the website and follow all links on the page. If in you're page have a link like http://www.example.com/?_escaped_fragment_=/foo/bar and redirect to http://www.example.com/foo/bar, google will index http://www.example.com/foo/bar because http://www.example.com/?_escaped_fragment_=/foo/bar are redirect to http://www.example.com/foo/bar.
Comments
Post a Comment