0

I am working in Angula JS and Drupal in this i am facing two issue SEO and page preview when we paste url in Google,Facbook,Twitter and many more social site

i have done case for _escaped_fragment_ in url by this help url(https://developers.google.com/webmasters/ajax-crawling/docs/getting-started)

But the challange is coming when i paste my url like

http://example.com/#!/test/a/1235

then no preview is generated

How will i show preview in social sites.

Any help is appreciated.

Thanks

Rituraj ratan
  • 10,260
  • 8
  • 34
  • 55

2 Answers2

1

Welcome to Javascript application! :)

_escaped_fragment_ is not standard & Social platforms do not support it

Google developed the _escaped_fragment_ system but this not a standard. There is many bots on the web and most of them do not understand the _escaped_fragment_ solution and do not understand Javascript applications as AngluarJS ones.

As far as I know (I worked on many JS application websites), social platforms do not use the _escaped_fragment_ system.

Moreover, some Google services do not support it yet.

URL is standard and is supported by every bots

If you want every robots to be able to crawl your website, the only way for now is to use classic URLs.

For now, you need to make sure your content is delivered on classic URLs. It is the only way to be sure that it will be interpreted by every bots of the web

Community
  • 1
  • 1
Ciseur
  • 463
  • 2
  • 9
  • but can you help me regarding #1 url ;) – Rituraj ratan Jul 30 '14 at 11:17
  • Regarding #1 URL (`http://example.com/#!/test/a/1235`?), for now, you just can't make it works on robots not supporting `_escaped_fragment_`. That's what I meant in my answer. – Ciseur Jul 31 '14 at 11:41
-1

This can be a bit challenging and requires a two-fold answer.

Headless Browser

The majority of crawlers and bots cannot parse the javascript in your Single Page App (SPA). Therefore, you will need some sort of headless browser to generate what those bots see. I have used PhantomJS and it works well for me. Once your headless browser is up and running you can create rewrite conditions for the _escaped_fragment_. For example in Apache:

RewriteCond %{QUERY_STRING} ^_escaped_fragment_=(.*)$

I would suggest you create rewrite conditions based on user agents as well. This would be particularly useful when detecting "FaceBot", Facebook's preview crawler, and others.

Social Applications

The other part of the solution is to read the developer docs on exactly how to manipulate the generation of these previews. Here are a couple resources for this (sorry I can't find twitter's):

When checking you page for Facebook, they have a neat little tool that will help you troubleshoot your site/page for preview rendering: https://developers.facebook.com/tools/debug

Community
  • 1
  • 1
Stephen J Barker
  • 999
  • 8
  • 16
  • Thanks for your time but it will not helpful for http://example.com/#!/reader/i/124 for direct url i have set on my website http://tech-blog.maddyzone.com/ but i need to do like "#!" this type url – Rituraj ratan Jul 28 '14 at 14:01