Question

I have a page that is so javascript intensive I can't even begin to write the equivalent PHP for it. That being the case, the page has a <noscript> tag that says the page is unviewable to non-js users.

Anyway it is possible for me to serve up a snapshot version of the page so that google can see what the page contains and so that people can find my pages by searching for phrases.

So is there a way for me to have my cake and eat it too? Meaning can I have a blank page for non-js users but if a google bot comes along serve it a skeleton page?

How would I even go about doing this? Also will doing something like this hurt my rankings?

Was it helpful?

Solution

It may be worth noting that Googlebot is known to execute a significant amount of Javascript now. So long as the page which loads has all the necessary content on it, you may be fine (for Google at least -- other search engines, perhaps less so).

Failing that: You don't necessarily need to have all the exact same content in the noscript version of the page, just an attempt to convey the same sort of information. I don't know what your site involves, but if you can just dump a basic text representation of the page's content, that might be sufficient.

OTHER TIPS

You could serve something different to user agents with Googlebot in them, but this is very risky, as Google can detect it as an attempt to scam their robot.

Just to let you know: Google policy on serving different content based on user info.

Cloaking refers to the practice of presenting different content or URLs to users and search engines. Serving up different results based on user-agent may cause your site to be perceived as deceptive and removed from the Google index.

Some examples of cloaking include:

Serving a page of HTML text to search engines, while showing a page of images or Flash to users.
Serving different content to search engines than to users.

If your site contains elements that aren't crawlable by search engines (such as rich media files other than Flash, JavaScript, or images), you shouldn't provide cloaked content to search engines. Rather, you should consider visitors to your site who are unable to view these elements as well. For instance:

Provide alt text that describes images for visitors with screen readers or images turned off in their browsers.
Provide the textual contents of JavaScript in a noscript tag.

Ensure that you provide the same content in both elements (for instance, provide the same text in the JavaScript as in the noscript tag). Including substantially different content in the alternate element may cause Google to take action on the site. Sneaky JavaScript redirects

When Googlebot indexes a page containing JavaScript, it will index that page but it may not follow or index any links hidden in the JavaScript itself. Use of JavaScript is an entirely legitimate web practice. However, use of JavaScript with the intent to deceive search engines is not. For instance, placing different text in JavaScript than in a noscript tag violates our Webmaster Guidelines because it displays different content for users (who see the JavaScript-based text) than for search engines (which see the noscript-based text). Along those lines, it violates the Webmaster Guidelines to embed a link in JavaScript that redirects the user to a different page with the intent to show the user a different page than the search engine sees. When a redirect link is embedded in JavaScript, the search engine indexes the original page rather than following the link, whereas users are taken to the redirect target. Like cloaking, this practice is deceptive because it displays different content to users and to Googlebot, and can take a visitor somewhere other than where they intended to go.

Note that placement of links within JavaScript is alone not deceptive. When examining JavaScript on your site to ensure your site adheres to our guidelines, consider the intent.

Keep in mind that since search engines generally can't access the contents of JavaScript, legitimate links within JavaScript will likely be inaccessible to them (as well as to visitors without Javascript-enabled browsers). You might instead keep links outside of JavaScript or replicate them in a noscript tag. Doorway pages

Doorway pages are typically large sets of poor-quality pages where each page is optimized for a specific keyword or phrase. In many cases, doorway pages are written to rank for a particular phrase and then funnel users to a single destination.

Whether deployed across many domains or established within one domain, doorway pages tend to frustrate users, and are in violation of our Webmaster Guidelines.

Google's aim is to give our users the most valuable and relevant search results. Therefore, we frown on practices that are designed to manipulate search engines and deceive users by directing them to sites other than the ones they selected, and that provide content solely for the benefit of search engines. Google may take action on doorway sites and other sites making use of these deceptive practice, including removing these sites from the Google index.

If your site has been removed from our search results, review our Webmaster Guidelines for more information. Once you've made your changes and are confident that your site no longer violates our guidelines, submit your site for reconsideration.

I'm working on a similar issue with a website, and there is a way to serve up a HTML snapshot of the page. You can find it here on Google Developers:

https://developers.google.com/webmasters/ajax-crawling/docs/getting-started This page was last updated February 2012.

There's also the option to add a noscript tag in front of the content, which is a faster solution but which does have the possibility of being seen by Google as an attempt to skew ranking. From the research that I have done, people were posting about this type of tag as a solution around 2008-2010.

Although Googlebot can execute some Javascript, and this is something that Google is working on improving, it doesn't say that it is executing all Javascript on the site. From what I have found online, Google is only executing Javascript on the most heavily traversed pages of a site. I'd still recommend serving up the HTML snapshot but I don't like it.

It's possible to check the Apache log to see if Google is executing Javascript on your page.

http://arstechnica.com/information-technology/2012/05/googles-bots-learn-to-read-interactive-web-pages-more-like-humans/

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top