Polymer / hn-polymer-2

Polymer Hacker News clone
158 stars 23 forks source link

SEO Issue due to using Polymer 2.0 #10

Open Yuen92 opened 7 years ago

Yuen92 commented 7 years ago

Description

All your components using Polymer 2.0 doesn't render by Google Bot. You can figure it using "Fetch as Google and Render" in Google Search Console : https://support.google.com/webmasters/answer/6066468

You get the same result using Google Speed Insights : https://developers.google.com/speed/pagespeed/insights/?hl=fr&url=https%3A%2F%2Fhn-polymer-2.firebaseapp.com%2F&tab=mobile

So all your component "" doesn't render for Google Bot so it will be a serious SEO issue.

Expected outcome

"Fetch as Google and Render" in Google Search Console should be render the same html as the visitor see in his browser.

Actual outcome

"Fetch as Google and Render" in Google Search Console render only the root page (index.html) without the html contained in all :

Live Demo

You can see the issue with Google Page Speed Insights : (same behavior as Google Bot Desktop&Mobile) https://developers.google.com/speed/pagespeed/insights/?hl=fr&url=https%3A%2F%2Fhn-polymer-2.firebaseapp.com%2F&tab=mobile

You can also see the problem with Mobile Friendly : (same behavior as Google Bot Mobile) https://search.google.com/test/mobile-friendly?utm_source=mft&utm_medium=redirect&utm_campaign=mft-redirect&id=8EVV98SRe6QRqAcOSRWlGQ

Search Engine/Bot Affected

Note

The issue doesn't occur when we used Polymer 1.X : https://shop-1-init.appspot.com/ Google Page Speed Insights : (same behavior as Google Bot Desktop&Mobile) https://developers.google.com/speed/pagespeed/insights/?hl=fr&url=https%3A%2F%2Fshop-1-init.appspot.com%2F Mobile Friendly : (same behavior as Google Bot Mobile) https://search.google.com/test/mobile-friendly?utm_source=mft&utm_medium=redirect&utm_campaign=mft-redirect&id=Ljkcg5zCt_DLF5S4jRHb8g

Other example with the problem due to Polymer 2.0 : https://shop-init.appspot.com/ Google Page Speed Insights : (same behavior as Google Bot Desktop&Mobile) https://developers.google.com/speed/pagespeed/insights/?hl=fr&url=https%3A%2F%2Fshop-init.appspot.com%2F Mobile Friendly : (same behavior as Google Bot Mobile) https://search.google.com/test/mobile-friendly?utm_source=mft&utm_medium=redirect&utm_campaign=mft-redirect&id=wUq2BA_91Kwwz5VAew2ivw

I also did a post on Polymer project issue : https://github.com/Polymer/docs/issues/940

ghost commented 6 years ago

Hello @Yuen92 , i'm with the same problem and no clue in how solve it (if it's possible). Do you have some news?

https://developers.google.com/speed/pagespeed/insights/?url=http%3A%2F%2Falbion.oaktavern.cc%2F&tab=mobile

KiaraGrouwstra commented 6 years ago

Seems the suggestions at https://github.com/Polymer/shop/issues/135#issuecomment-320903983 have already been incorporated here. Does that mean this is resolved?

fasihrana commented 6 years ago

I'm having the same issues. None of my elements render.

I've added a WebCompnentsReady event listener to window, maybe that is the issue for me?

window.addEventListener('WebComponentsReady',function (){
//...
})
Yuen92 commented 6 years ago

@marcelofranzen @tycho01 The problem from the dependencie is maybe solved but you still need to build in ES5 for the SEO. It's due to google bot use Chrome 41 : https://developers.google.com/search/docs/guides/rendering

@fasihrana : Do you have an url to share? Do you have the problem with the ES5 building?

Regards

fasihrana commented 6 years ago

@Yuen92 My problem was that I wasn't serving a compiled app. I don't have this issue now.