some bots are grabbing my site's content everyday,I confirm if I set cookie protection the bots will not work again.

My question is how to use cookie to protect my content? if someone has no cookie then he can't go to next page.

1 Answer 1


Sounds like a case for user authentication?

The problem is the first page request will never have a server-side set cookie as it will be set on the subsequent request and you don't want to deny access on your homepage.

You could set the cookie with javascript, but then you risk blocking users with js disabled.

Requiring user login would be the easiest solution.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.