AngularJS application problems appearance in Google search - angularjs

I have a personal project which consumes my free time and effort for about a year without significant profit. I have problems with it appearance in Google and would really appreciate to get help here.
This project (http://yuppi.com.ua - similar to craiglist in US) is WEB-based AngularJS 1.2 application that uses PHP rest API hosted on GoDaddy. And in order to make this application popular it have to be very visible in internet and very searchable in Google and users have to be able to share pages via social networks or skype.
According to Google specification, google crawlers doesn't run javascript to get content of a web page before index, so I've added _escaped_fragment_ page that displays content of web page without javascript. For example:
Page: http://yuppi.com.ua/#!/items/sub/18/_
Dirty : yuppi.com.ua/?_escaped_fragment_=/items/sub/18/_
This dirty page will be redirected here where google will see content.
http://yuppi.com.ua/server/crawler_proxy/routee.php?path=/items/sub/18/
So basically I have two versions on HTML file for that page. One version is the one that available to users, which has styles, a lot more HTML tags etc. And the second is the version for Google crawler - very light-weight without any styles. And I am expecting to see clean link to my site in Google, not dirty.
So, If to search all links to a web site in Google you will see that one of the links displays it's "dirty" state.
Another problem is sharing links in Skype.
When I send a link to someone, I am expecting that this link will be transformed to thumbnail image but it is not happens. Instead I see ungly link to my web site.
Please help me to understand how to make happy everyone: users, google crawler, GoDaddy and me.

I was encountering the same problems last year with a big project and we ended to use : https://prerender.io/.
It's a prerendering system that work with a phantomjs browser to detect bot request and render a full html template. It does also instanciate a cache service to not render again a template that haven't change.
Hope it help's.

Related

Page not mobile friendly error when testing on google mobile friendly test

I test my site url on google mobile friendly test. It showing me page is mobile friendly but some times it is showing me that page is not mobile friendly. So why it is happen. Please help me out for this. I added some codes in htaccess but not getting positive thing. Site in wordpress.
URL : https://www.example.com/test/
This could happen when the google mobile bot is not able to fetch and render the page correctly for the mobile platforms.
If you test this in your search console, you can see the errors for the static assets not getting loaded for mobile. It could happen due to a variety of reasons based on your Wordpress website configurations and plugins.
If you are not using google search console, make sure you use it to figure out the actual cause of these issues.
Check out this detailed blog for the fix relates to static content delivery - Fix Page not friendly issue

How to modify HTMLElement in index.html before page gets returned to requestor

Based on my custom URL parameters I process, I am trying to modify dynamically a meta tag I have id'ed in index.html like so:
<meta name="og:image" content="http://example.com/someurl.jpg" id="ogImage"/>
The code below in my home.ts seems to be working
document.getElementById('ogImage').setAttribute("content", Media.ImageURL) ;
I can verify it is via the browser dev console/elements.
However, when I view from facebook via their ojbect graph debugger at
https://developers.facebook.com/tools/debug/og/object/
It appears to see the default
http://example.com/someurl.jpg
as if the index.html is shipped before my home.ts gets chance to make the update.
Perhaps, my understanding is flawed and there is better way to do this.
Thank you.
Note1: initially, I was thinking I had to make some angular binding between index.html and one of my services but I could not locate any sample code, the closest I came to was this post
How can I update meta tags in AngularJS?
But I don't know how to apply it for my ionic2/3 code, so I opted for the document.get approach.
Note2: the ultimate goal here is to share a link into a social media (web or app) like facebook, a messenger like viber/skype, etc... and have it resolve to meaningful images, title, description to drive the visit back to the site via browser, or app if the user clicking on the link is on a mobile device with my app version of the site installed on his device.
Note3: if you decide to point me to ionic deeplinking please provide code to match above, because I could not understand how to apply to my case.
If you are trying to implement dynamic open graph meta tags values in your pages, you will need a server-side scripting language like php. Such a script will run on the server, update the pages as needed, then the pages will be served to the requesting site or application.
client-side scripting (ie. JavaScript) is usually ignored when a site or app is merely visiting your site/link for the purpose of extracting (aka scrapping, parsing html) information such as the one provided by the open graph meta tags (og:title, og:description og:image...).

AdSense and AngularJS application -- approval

My website is a Single Page Application written with AngularJs.
I am trying to add AdSense for some pages. After submitting, my site was rejected because of the following reason: "Insufficient Content".
My question here is: were adSense crawlers able to access and view my website considering that we use escaped_frangment and phantomJs to render the pages? (This works pretty fine for google bots.)
What can I doto make my website approved by adSense?
Thanks in advance.
I've used Prerender successfully in the past. It was a bit of a pain to set up, but works very nicely.
Search engines and social networks are always trying to crawl your
pages, but they only see the javascript tags...
We render your javascript in a browser, save the static HTML, and you
return that to the crawlers!

Weird Content of Facebook share/like button preview from angular app

I have an issue with share/like button from Angular app. I finally made it working correctly with links but share/like preview if completely wrong. I tried XFBML.parse(), switching to html 5 mode, etc.
There are two complete enigmas:
1. I got "Given URL is not allowed by the Application configuration..." despite adding all possible variants to fb app setting.
When share preview appear - it has "Angular", but I never added it anywhere.
Here is the link
Would be grateful for any ideas...
Thx
The Facebook Scraper only looks at the HTML code your server delivers, it does not execute any JavaScript.
So if you want to share different articles, you need an individual URL for each article, that delivers the relevant meta data when requested from the server.
You can find some more explanation and hints on how to implement this in this article, http://www.michaelbromley.co.uk/blog/171/enable-rich-social-sharing-in-your-angularjs-app

Crawling a website that uses angular routes

I have a personal website that I use for some of my motorbike racing. I created it recently using node and angular. I decided to try angular routes for my page navigation etc. I think it worked well but I'm annoyed that my website isn't showing on google search.
When I've looked into how to get google to find your website I've followed many suggestions with meta names etc but when I came to a sitemap I discovered that most crawlers etc have problems finding any links on my website to other pages.
You can see my website here - MPC Racing
I have tried using this automatic sitemap creator and it can't find anything apart from my main page - XML Sitemap
Do you have any suggestions on how I can my website more easily found by search engines?
For example, a design company designed all my graphics for my bike and if I type into google "Webstep Racing Team" I get the link to their website as the first hit but nothing at all on my website. What is it they are doing and I'm not? - Webstep Racing Team
In Google Webmaster tools there is an option to 'Fetch as google'. So you see what google sees when it crawls your angular app. It gives you an image of what google sees.
However for me the problem is that the crawler does not crawl the angular links within the app.
By default the hashes are getting ignored by search engines, because normally they refer to parts of the same page.
You can follow google guidelines for ajax crawling urls to get the hashed url indexed by Google. The same standard also supported by Bing according to searchEngineLand post.
And because you are using angularJs, you might find Matias Niemela's post on how to have your AngularJS application indexed very useful. Demo and source code.

Resources