One of the biggest issues while running a website is plagiarism. You work hard for many days writing an article that provides a solution to a very common problem in a niche, only to find that someone copied the article overnight and is now ranked better in search engines then your site because of the existing domain authority.
You can file a DMCA notice to search engines and web hosting company of the copying website but it takes time to remove the content, and by then the damage is done.
You can’t stop people from copying the content but you can minimize it. One reason why people copy content is because they don’t know that it will hurt their own website because it will get search engine penalty for copying.
People also don’t know that the content is copyrighted to the original author and should not be used on other websites without permission. You can inform users about this if they copy the content. This will solve 90% problem of plagiarism. The 10% are hardcore content thieves and they must be handled via DMCA and other legal ways.
To automatically add a copyright notice and a warning about search engine penalty to the copied text from your website, just place the following code before the </head>
tag in header.php file of your WordPress theme.
function addLink() {
var body_element = document.getElementsByTagName('body')[0];
var selection;
selection = window.getSelection();
var pagelink = "<br /><br /> Read more at:
<a href='"+document.location.href+"'>"+document.location.href+"</a><br />Copyright &copy; WordPress Tricks & Tips"; // You can change this if you want
var copytext = selection + pagelink;
var newdiv = document.createElement('div');
newdiv.style.position='absolute';
newdiv.style.left='-99999px';
body_element.appendChild(newdiv);
newdiv.innerHTML = copytext;
selection.selectAllChildren(newdiv);
window.setTimeout(function() {
body_element.removeChild(newdiv);
},0);
}
document.oncopy = addLink;
</script>
Currently the above code will automatically add a source link to the copied content. You can modify it as needed to add copuright notice and other warnings.