Is JS or PHP best for google cloaking ?

M4DM4X

Elite Member
Joined
Jan 21, 2015
Messages
2,909
Reaction score
1,753
Hi,
I have a new site, if people visit it I want them to be redirected to my affiliate link right away. If google bots visit it I want them to see the content and stay on the site.
Is it better to use JS or PHP to do this?
I mean the most reliable. I think Google can read JS so they will smell the bs, thus php is preferable no?
Thanks
 
Thanks guys, let's built this with php then
 
chatgpt built me a nice php cloacking script it's all good thanks guys
 
PHP for cloaking is like using a sniper — precise and silent. JS? More like throwing glitter and hoping Googlebot blinks. Use both if you're brave… or bored.
 
You’re spot onG, oogle’s pretty sharp and can spot JavaScript redirects easily. PHP’s better because it runs server-side, so it’s less obvious. But cloaking showing different content to users and search engines is a no-go and could get you penalized. If you’re trying to send users to an affiliate link, go for geo-targeted or intent-based redirects that still show the same content to both bots and people. PHP gives more control, but keeping things ethical with SEO is always the way to go.
 
PHP is more suitable for cloaking based on user agents.
 
Back
Top