Alternative Keywords in <h1> Disguised as Client-Side A/B Testing

vantablackhat

Newbie
Joined
Jul 19, 2024
Messages
2
Reaction score
0
What if I want to rank a page for 2 keyword phrases, so I put 2 versions of the page’s main heading in 2 <span> elements inside the <h1> tag and use JavaScript to hide a random one of the <span>s to do “A/B testing” of the headline? The real purpose of it is to try to help the page rank for more keywords by having more of them in the <h1>.

How effective is this technique? What are chances Google will catch it and penalize?
 
google can read JS, so they will see the code, but I don't think they'll penalize you. But you might still lose rankings because when googlebot visits the page again after it's already ranking it will see that the title had changed and it might alter the ranking (up or down)
 
Back
Top