Google webmaster fetch as google issue - angularjs

I have an angularjs app. In order to make the app Ajax Crawlable, I changed all the '#' to '#!' . When I tried the change with google webmaster tools, the results still will be redirected to the index page(Home page). my site URL is like https://www.sample.com/web/ and the rest of the URL im entering for fetch and render is like, #!/wellness . The issue is, Im always getting the rendering googlebot snapshot as the homepage(image of https://www.sample.com/web/). And the "path" column of that fetch attempt is / (The part I entered which is, #!/wellness not there).

Finally I've found the solution. Though the Google web crawlers recognize the #! to escaped-fragment Fetch as Google bot requires it to be entered manually
Refer these links if someone needs help regarding an issue like this.
Below is the link to a question that exactly like mine and it has the answer
https://productforums.google.com/forum/#!msg/webmasters/fZjdyjq0n98/PZ-nlq_2RjcJ
Below link give a complete explanation on these issues
Google bot crawling on AngularJS site with HTML5 Mode routes

Related

What is the status of Angularjs SEO in 2018?

I remade my website, and used angularJS for some part of it. It is online for three weeks now, and seems that Google still not indexed any of the angularjs content.
I would like to know what is the status of Google crawling Angularjs in 2018?
Searching the web returns old articles that claims that Google cannot crawl Angularjs, although google claim they do crawl Angularjs.
Should I wait patiently for Google to crawl my site or generate a server-side-rendering instead?
Also, I would like a link to how to properly do server-side-rendering in 2018?
Is hashbang is still the standard way to do it? There are some similar questions on Stack Overflow that are several years old, but I wonder if the situation has changed.
here is a good article - http://kevinmichaelcoy.com/blog/2018/02/19/2018-search-engine-optimization-with-angularjs-1-x-single-page-application/
Also, for your sanity, you can check what your website looks like when Google crawls it by going to Google Webmaster/Search Console and under “Crawl” choose “Fetch as Google”, then “Fetch and Render” :
https://www.google.com/webmasters/tools/googlebot-fetch
In the case of my site - google doesn't index angular JS so well
For some page it display the content as I would expected, but on other it just display the raw html (i.e. with the {{title}} ng tag instead of the value of the $scope.title)
I'm fetching a category page that uses ajax to display the category content - some category display well, thus it might be a bug in the googlebot-fetch tool
https://buyamerica.co.il/ba_supplier#/showCategory/ba-suplier/840
https://buyamerica.co.il/ba_supplier#/showCategory/ba-suplier/468
But I still don't know how long should it take for google to show it in the index?
NOTE: according to this https://webmasters.googleblog.com/2015/10/deprecating-our-ajax-crawling-scheme.html server side rendering is deprecated

Google bot cannot fetch AngularJS site in html5 mode

My site, which is using AngularJS 1.4.8 in html5 mode and NOT using hashes in URLs is not properly indexed by Google. When I fetch and render the sub-pages in google console, it renders only the main page and apparently treats them as duplicates. It does not seem that googlebot executes Javascript although I really don't know how it can be checked on the google console. On the other hand it accepts individual URLs pointing to subpages that it can't see. Any ideas how to debug such problems?
It seems that adding angularjs-viewhead and generating titles for each subpage solved the problem.

Prevent Googlebot from indexing a page while still allowing access

In a angularjs app, I'm using some fragment like /fragments/welcome-1.html which get displayed as a part of /welcome. I thought, I could exclude it from Google search via
Disallow: /fragments
in robots.txt, but it completely prevents any access by Googlebot and therefore the page /welcome can't be displayed correctly.
Obviously, I can't do this, but how can I ensure that Google can fetch the fragment and it won't index it? Note that it's no real HTML, just a part of the body, so I can't really use a meta tag.
I don't think this is a angularjs issue or if can be resolve with angular. I had a similar problem with the bot. I have a folder that I host multiple websites. I resolve it in Google analytics console, after you validate and monitor your domain, there is an option on the menu called Google index in there's an option to removes URLs. Just put all the URLs that you dont want Google to index.
https://www.google.com/analytics/
I've just found the X-Robots-Tag and I serve all pages from /fragments using
X-Robots-Tag: googlebot: noindex
Let's see if it really works.

angularjs sitemap SEO

I don't see any updated answer on similar topics (hopefully something has changed with last crawl releases), that's why I come up with a specific question.
I have an AngularJS website, which lists products that can be added or removed (the links are clearly updated). URLs have the following format:
http://example.com/#/product/564b9fd3010000bf091e0bf7/published
http://example.com/#/product/6937219vfeg9920gd903bg03/published
The product's ID (6937219vfeg9920gd903bg03) is retrieved by our back-end.
My problem is that Google doesn't list them, probably because I don't have a sitemap.xml file in my server..
In a day a page can be added (therefore a new url to add) or removed..
How can I manage this?
Do I have to manually (or by batch) edit the file each time?
Is there a smart way to tell Google: "Hey my friend, look at this page"?!
Generally you can create a JavaScript - AngularJS sitemap, and according to this guidance from google :
https://webmasters.googleblog.com/2015/10/deprecating-our-ajax-crawling-scheme.html
They Will crawl it.
you can also use Fetch as Google To validate that the pages rendered correctly
.
There is another study about google execution of JavaScript,
http://searchengineland.com/tested-googlebot-crawls-javascript-heres-learned-220157

HTML snippets for AngularJS app that uses pushState?

I'm deciding whether it's safe to develop my client-facing app in AngularJS using pushState.
I've read that when using pushState in an AngularJS app, we don't need to worry about Googlebot because it can now execute enough JS to produce an HTML snippet for itself. But then I wonder about Bing, Facebook and other bots and scrapers. The tutorials I've seen for making AngularJS SEO-friendly all deal with apps that use hashbangs (#!). These don't apply to me since I'm not using hashbangs.
Does anyone have insight into this problem? What are some methods for ensuring an AngularJS app that uses pushState is SEO-friendly and Social-scraper-friendly? If you use a service like Seo4Ajax or prerender.io I'd appreciate your thoughts on it.
Note: As I understand it, when developing single page apps in the last couple of years it has been necessary to send HTML snippets to SEO crawlers. This was accomplished by using hashbangs and a meta tag that let Google, Bing and Facebook know that it needed to replace the bang (!) with an _escaped_string when making a request. On the server you'd listed for requests with _escaped_string and deliver the appropriate HTML snippet using a tool to generate HTML snippets like phantomJS.
Now that we have pushState, I don't see how we indicate to javascript-less bots what part of the URL to rewrite with an _escaped_string or even if it's necessary. I'm having trouble finding any information beyond "you're site will be okay with google ;)".
Here are some other SO questions that are similar but have gone unanswered.
Angularjs vs SEO vs pushState
.htaccess for SEO bots crawling single page applications without hashbangs
Here's a solution I posted in that question and am considering for myself in case I want to send HTML snippets to bots. This would be a solution for a Symfony2 backend:
Use prerender or another service to generate static snippets of all your pages. Store them somewhere accessible by your router.
In your Symfony2 routing file, create a route that matches your SPA. I have a test SPA running at localhost.com/ng-test/, so my route would look like this:
# Adding a trailing / to this route breaks it. Not sure why.
# This is also not formatting correctly in StackOverflow. This is yaml.
NgTestReroute:
----path: /ng-test/{one}/{two}/{three}/{four}
----defaults:
--------_controller: DriverSideSiteBundle:NgTest:ngTestReroute
--------'one': null
--------'two': null
--------'three': null
--------'four': null
----methods: [GET]
In your Symfony2 controller, check user-agent to see if it's googlebot or bingbot. You should be able to do this with the code below, and then use this list to target the bots you're interested in (http://www.searchenginedictionary.com/spider-names.shtml)...
if(strstr(strtolower($_SERVER['HTTP_USER_AGENT']), "googlebot"))
{
// what to do
}
If your controller finds a match to a bot, send it the HTML snippet. Otherwise, as in the case with my AngularJS app, just send the user to the index page and Angular will correctly do the rest.
Supposedly, Bing also supports pushState. For Facebook, make sure your website takes advantage of Open Graph META tags.

Resources