Answer the question
In order to leave comments, you need to log in
How do I prevent third-party sites from extracting information from pages on my site?
For example, I copy a link from a certain page of the site and paste it into vk. How can I make my site prohibit VKontakte from generating previews using the link of my site? Really?
Answer the question
In order to leave comments, you need to log in
Vkontakte is most likely real. You need to look at the user agent with which he surfs the sites and stupidly ban it (this is the first thing that comes to mind). For the general case, no. Well, either it will be done with great damage to usability.
Upd. Option for the general case: we define ip, then whois, well, or nslookup it and decide whether it is a user or a parser
The trick is simple - set a cookie that is set to the visitor when they first enter the site, if there are no cookies, set the cookie and give the page where the redirect will be formatted as JS or html, but not 403. It will not be noticeable to the user, but you can make a whole landing page for the robot .
Only it will be necessary to provide that the search engines do not die from this, but this is already easier - they do not hide.
Look at the headers from where they are knocking on you, but cut those who are objectionable in the bud.
It is possible even without the code with the usual furvol a la iptables or whatever.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question