Add a copyright notice in the clipboard when someone copies a text

Once you decide to publish something on the Internet, you won’t be able to stop people from copying your content. You know that and there’s practically nothing you can’t do about it. Whether it is only a sentence or you have written an entire story, whether it’s a photograph or an image you have drawn, a video you have created or something else, it will become public and accessible to practically anyone, no matter what you do to protect it. Even if you take extra precaution measures and make your content more secure, you will never be able to make it completely copy-proof.

Having that in mind, you can still make an effort and create warnings and copyright notices, or even try to disable copying entirely. One of the other things you can do is to add a link to the text people can copy from your site and make them paste that in addition. You have probably seen the feature in action on one of many popular websites which do so. If you copied text from their website, you ended up in having additional text saying something like “Read more at”.

Instead of blocking people from copying text from your website (they will find a way around if they really want to, you can’t do much about it), you could simply add your site name and a link to the original post.

Add a link to any copied text from your site:

  1. Open footer.php
  2. Copy and paste the following code:
  3. <script type="text/javascript">
    function addLink() {
    //Get the selected text and append the extra info
    var selection = window.getSelection(),
    pagelink = '<br /><br /> Read more at: ' + document.location.href,
    copytext = selection + pagelink,
    newdiv = document.createElement('div');
    //hide the newly created container = 'absolute'; = '-99999px';
    //insert the container, fill it with the extended text, and define the new selection
    newdiv.innerHTML = copytext;
    window.setTimeout(function () {
    }, 100);
    document.addEventListener('copy', addLink);
  4. Save changes

Now that you have the code saved to your footer, every time someone tries to copy text from your website, a new text with a link to the original post will be added after the original text.

While a person who has copied the text can still easily delete your addition in any text editor, at least you showed your link and that you’re aware of the copied material. While the most people will simply delete that addition, you can hope that someone will leave a link to your site (intentionally or not) and therefore thank you for your work.


This guide is an introduction to mastering the art of blogging. It provides easy to follow steps to start, maintain, and grow your blog.

Read the guide

Leave a Reply

Your email address will not be published. Required fields are marked *