How to protect information from copying on a WordPress site

print · Время на чтение: 5мин · - · Опубликовано · Обновлено

playListen to this article

Copy protection on a WordPress site.Greetings, friends. In this post, I will tell you how to protect information on the site from copying. Copy protection solves the problem of content theft, which is not new, but very painful for websites.

Most site owners, one way or another, are faced with the problem of content theft. It’s not very pleasant to see a picture of how your text over which you pore over is impudently copied to another site. In my case, even images were copied, people, in general, do not take a steam bath, I look. If your site is powered by WordPress then protect yourself fromcopy pasteur", it will be much easier for you.

The content of the article:

Protection against copying information from a WordPress site

We will protect our site using a plugin All In One WP Security.
1. Install and activate the All In One WP Security plugin.

All In One WP Security for copy protection.
2. Great, after activating the plugin, do the following:
3. From the main menu, hover over WP Security (at the very bottom of the menu, sidebar), then click on Miscellaneous.

All In One WP Security - copy protection settings.
4. Then check the box Activate copy protection. Save your settings.

Enabling the copy protection feature in the All In One WP Security plugin.
That's all, now the information from your site cannot be copied. This plugin has a huge number of tools to keep your website secure. which I recommend to familiarize yourself with and put into practice.

It is worth paying attention to the following: whether you need to prohibit copying information from the site. This is not always appropriate, some users react negatively to such add-ons. Accordingly, this can lead to a deterioration in the site's bounce metric.
See below for more information on this matter.

Add a link to the source of the material when copying

For example, I do not want to prohibit copying from my site. Why? I have already tried to put a ban on copying information from the site and this backfired on me with negative reactions from users. But you need to protect yourself somehow, and one of the solutions is to introduce a script that adds a link to the source when copying.

So the blindcopypaste» may not notice the link. And this is still an indication of your site as the primary source, such links in some cases can be useful.

Injecting a script into the site header:

The script itself works as follows. It doesn't matter how much information is copied, the script will automatically insert a link and copyright at the end of the text. Here is the script:

<script type="text/javascript">
function wpguruLink() {
var istS = <'Источник:'>;
var copyR = <'© WPguru.ru'>;
var body_element = document.getElementsByTagName('body')[0];
var choose = window.getSelection();
var myLink = document.location.href;
var authorLink = " " + istS + ' ' + ""+myLink+" " + copyR;
var copytext = choose + authorLink;
var addDiv = document.createElement('div')
addDiv.style.position='absolute';
addDiv.style.left='-99999px';
body_element.appendChild(addDiv);
addDiv.innerHTML = copytext;
choose.selectAllChildren(addDiv);
window.setTimeout(function() {
body_element.removeChild(addDiv);
},0);
}
document.oncopy = wpguruLink;
</script>

Pay attention to where: the word must be in quotation marks, specify the data of your site.
We insert this code into the header.php file, between the tags. I recommend, if you do not have knowledge of html, to insert the code immediately after the tag, or immediately before the tag, otherwise you risk inserting the script inside some other element, which will result in the inoperability of both scripts.
Script - adds a link to the source of the material when copying.
Please note that this script does not only work on WordPress and can be used on other sites.

Script injection in functions.php

This method is not suitable for everyone and may cause an error in some cases. I use it, it allows me not to burden the HTML code with extra lines. In my case, everything works correctly, the main thing is to correctly insert the code into the functions.php file.

An example of what the script does:

How to create a sitemap? This question is asked by many novice web masters. Actually creating an XML and HTML sitemap is very easy.

Source here: https:/ / nicola.top/

As you can see, everything is simple, here is the script itself:

/* copy source link function */ function wpcourses_add_copy_link() { $source_text = __( 'Source here: %link%' ); $source_text = str_replace('"', '\"', $source_text); echo'  '; } add_action( 'wp_footer', 'wpcourses_add_copy_link', 99 ); /*function link to source when copying - end of function*/

Script for functions.php - add a link to the source of the material when copying.The code is inserted into the functions.php file after the opening tag <?php и до тега закрытия. Для проверки скрипта, после внесения изменений отчистите кеш сайта, скопируйте любое содержимое и вставьте куда-нибудь.  Обратите внимание, скрипт не работает на бэкенде сайта.

Conclusion

In this article, I talked about the most effective ways, how to protect information on the site from copying. If you have any questions, feel free to leave comments. Pay attention to the following articles, they will be of interest to you: how to make a redirect in WordPress, how to make money on a blog, and why choose WordPress.

Reading this article:

Thanks for reading: SEO HELPER | NICOLA.TOP

How useful was this post?

Click on a star to rate it!

Average rating 5 / 5. Vote count: 418

No votes so far! Be the first to rate this post.

Читайте также:

Добавить комментарий

Your email address will not be published. Обязательные поля помечены *

4 × three =