Mobile app version of vmapp.org
Login or Join
Berumen354

: Hijax == sneaky Javascript redirects? Will I get banned from Google? Question Will I get penalised as "sneaky Javascript redirects" by Google if I have the following Hijax setup (which requires

@Berumen354

Posted in: #Ajax #Google #Javascript #Redirects #Seo

Question

Will I get penalised as "sneaky Javascript redirects" by Google if I have the following Hijax setup (which requires a JavaScript redirect on the page indexed by google).

Goal

I want to implement Hijax to enable AJAX content to be accessibile to non-JavaScript users and search engine crawlers.

Background


I'm working on a static file server (GitHub Pages). No server side tricks allowed (so Google's #! "hash bang" solution is not an option).
I'm trying to keep my files DRY. I don't want to repeat the common OUTER template in all my files i.e. header, navigation menu, footer, etc They will live in the main index.html


Setup the Hijax


index.html page contains all OUTER html/css/js... the site's template.
index.html has a <div id="content"> which defaults to containing the "homepage" html.
index.html has a navigation menu, with a Hijax link to an "about" page.
With JavaScript disabled (e.g. crawler) it follows link to /about.html.
With JavaScript enabled (e.g. most people) the link updates the url hash fragment to /#about and jQuery replaces the <div id="content"> innerHTML with $("#content").load("about.html #inner -container");.


AJAX content

about.html does not contain anything extra to try an cloak content for crawlers.

about.html file contains enough HTML / CSS / JavaScript to display /about.html as a standalone page with it's own META data... e.g. <html><head><title>About</title>...</head><body></body></html>.

about.html has NO OUTER HTML template (i.e. header, navigation menu, footer, etc).

about.html <body> contains a <div id="inner-container"> which holds the content that is injected into index.html.

about.html has a <noscript> tag as the first child of <body> which explains to non-JavaScript users that they are viewing the about page "inner content" - with a link to navigate to the index.html page to get the full page layout with menu.

The (Sneaky?) Redirect

Google indexes the /about.html page. However when a person with JavaScript enabled visits that page there is no OUTER html template (e.g. header, navigation menu, footer, etc). So I need to do a JavaScript redirect to get the person over the /#about page (deeplinking to the "about" page "state" in index.html).

I'm thinking of doing a "redirect on click or after 10 seconds".

The end results is that user ends up on an "enhanced" page back on index.html with all it's OUTER template - but the core "page" content is practically identical.

Known issue with inbound links e.g. Share / Bookmarking

It seems that if a user shares the URL /#about on their blog, when allocating inbound links to my site Google ignores everything after the # ... it allocates value to the / page - See: stackoverflow.com/questions/5028405/hashbang-vs-hijax/5166665#5166665.

I can only try an minimise this issue offering "share" buttons on the page with the appropriate urls i.e. /about.html.

Duplicate

Sorry. I posted this same question over on stackoverflow.com/questions/5561686/hijax-sneaky-javascript-redirects-will-i-get-banned-from-google ... then realised it probably belongs more on this Stack Exchange site... Not sure if I should delete the Stack Overflow question? Or just leave it on both sites? Please leave comment.

10.02% popularity Vote Up Vote Down


Login to follow query

More posts by @Berumen354

2 Comments

Sorted by latest first Latest Oldest Best

 

@Correia994

I have had clients site drop out of the index because Google thought the JavaScript was suspicious. This normally happens when a programmer comes up with a clever method to do something shady.

My advice is this: If you have to ask, its probably a problem. Does it substantially improve the user experience? If not, why take the risk?

10% popularity Vote Up Vote Down


 

@Phylliss660

Hijax == sneaky Javascript redirects?


only if they are intended as sneaky.


Will I get banned from Google?


if they are not sneaky, most probably not.

a "penalty" is an editorial or semi-editorial (a mini algo targeted at a small subsample of sites) action from googles side to .. well .. penalize spammy, malicious sites. so the get a real penalty you have to have a malicious intend. i presume that your site is legit, so lets strike the word "penalty" and look at the technical implications of your solution.

here is a short, simplified outline on how google processes your site
see: stackoverflow.com/questions/5537612/pages-not-indexed-by-google/5548511#5548511 [stackoverflow]

discovery -> crawling -> indexing -> ranking (-> ux feedback)


a) google has a step called "ux feedback" in which it collects quality metrics on the site / page it did send traffic too. if you make an immediate redirect after the user reaches your site, it might break this step on the page level. (this is just a might, only a some specialized google engineers know for sure)

b) the other issue is, that users tend to copy&paste the URL directly from the address-bar, even if you over them "share / link to me" box. this URL from address-bar copy & paste behavior is hard coded into the well trained internet user by now, so there is no - easy - way to change this behaviour.

now some anecdotal "evidence": i once optimized a big job site in the austrian market which had these kind of ajax redirects. the site performed in the search engines, but not as good as the (non ajaxy) competition. only after these redirects were turned of (only the second page view was then done via some ajaxy magic)the site started to perform better. if this was because of a) or b) (we did see more direct links to the good urls) i can not say.

so maybe the "second page view via ajax" is a compromise you can go for.

anyway: for big comercial sites where the question of seo is a question of "to be or to be gone" the recommendation is still to not to any ajaxy urls, for everyone else: please do not care to much about seo, the internet is to much fun for it.

p.s.: the redirect after 10 seconds seems such a non ux thing to do so that i would not consider it. additionally the a) and b) issues would still be there.

p.p.s.: as for point a) i woud recommend posting it on the google forum www.google.com/support/forum/p/Webmasters/label?lid=41234c84d9491af8&hl=en as from time to time some humble engineers / google webmaster central guy are actually responding ... something)

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme