Many times it happened to me that somebody copied my contents. Most new bloggers copy other websites contents because they are not familiar with Google Algorithm like penguin and panda that are developed to remove sites that do not have original materials.

So, I am going to share a trick with you which is entirely related to protecting your blog contents from copying by disabling copy function.

I will share you Javascript and CSS code to disable copy buttons like Ctrl+A, Ctrl+ C and mouse copy functions. Visitors only can view the text but will never be able to copy it so it will help you to make your contents protectable.

In this tutorial, I am sharing two different way to disable copy function in BlogSpot blog.

How to Disable Copy Function with Javascript

1.Go to your Blogspot account and select blog where you want to disable copy function.

2.Click on Template>Edit HTML

3.Press Ctrl+F to open the Search box and then search for the following tag <head> in the HTML box. Paste all the javascript after the <head> tag and Save the template.

<!–Disabe Copy Paste Function—BV–>

<script language=’JavaScript1.2′>

function disableselect(e){

return false


function reEnable(){

return true


document.onselectstart=new Function (&quot;return false&quot;)

if (window.sidebar){





How to Disable Copy Function except in Blockquote

Bloggers like us sometimes share cool stuff with Blogspot members like widgets and gadgets in the form of codes like HTML/CSS/Javascript. They face that disabling function does not only allow readers to copy their text but also disallow to copy codes like HTML/CSS that they are sharing to then.

But with my little trick you can allow users to copy your codes by giving allow function in blockquote. It means that readers can copy everything which is within blockquote tag.

It is so simple to activate this function just search for that code ]]></b:skin> and paste the following CSS before this tag in Blogspot Template Editor.

/*—– Disable Text Selection with CSS Code— BV—-*/

.post blockquote {

-webkit-user-select: text !important;

-moz-user-select: text !important;

-ms-user-select: text !important;

user-select: text !important;


body {

-webkit-user-select: none !important;

-moz-user-select: -moz-none !important;

-ms-user-select: none !important;

user-select: none !important;


Or you can add this CSS to Layout by putting <style></style> before-after the code.

In the above CSS code, the first tag is allowing to select text within blockquote tag. You can also be able to disallow by removing post blockquote and its style codes or simply change the text to none. But you do not need that extra code.

If you want to disable copy paste and do not want to allow in blockquote then simply paste the above CSS code.

body {

-webkit-user-select: none !important;

-moz-user-select: -moz-none !important;

-ms-user-select: none !important;

user-select: none !important;


Now whenever you put Code in post give it blockquote style, and it will become selectable for readers only if you are using both CSS code.

If your blogger template use different post class like .post-body then change the .post blockquote into .post-body blockquote or if your template uses any other class then replaces .post with it.

Note: Both codes can be removable from template simply by inspect element feature available in almost all browsers. However, it takes a long time to find these codes.

About the author 

Muhammad Rizwan

I am Muhammad Rizwan, a student of BSCS, and a part-time blogger. My interest in computer and internet brought me to web development, and now I am working on this website. I love to share my opinions and review and to help peoples worldwide. My goal is to improve myself in blogging field and to make my website successful.

Leave a Reply

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

{"email":"Email address invalid","url":"Website address invalid","required":"Required field missing"}