How to Disallow the Right Click and Selecting Text in Hostinger Website Builder

Hey everyone, welcome to Ben’s Experience! In this blog post, I will show you how to disallow the right click and selecting text on your website in Hostinger Website Builder. This is a simple yet effective way to secure your content and enhance your website’s protection.

Step-by-Step Guide to Disallow Right Click and Selecting Text

  1. Access Website Settings
    • First, log in to your Hostinger account and navigate to your website dashboard.
    • Go to the ‘Website Settings’ or ‘Website Elements’ section.
  2. Integrations
    • Click on the ‘Integrations’ tab. Here, you will find various options to enhance your website.
  3. Add Custom Code
    • Copy the piece of text provided in this video description.
<script>
    document.addEventListener('contextmenu', event => event.preventDefault());
</script>

<script>
    document.onselectstart = () => {
        event.preventDefault();
    }
</script>
  1. This code snippet is essential to disallow the right click and selecting text.
  2. Paste the code into the appropriate section in the Integrations tab.
  3. Click ‘Save’ to apply the changes.
  4. Update Your Website
    • Don’t forget to update your website after saving the changes. This ensures that the new settings are applied.

Live Demonstration

Let’s see how it works on my website. As you can see, I can’t select any text on my website, and right-clicking is disabled. This method effectively secures your content from unwanted copying.

Special Offer

Before you go, I have something special for you! I have two free online video courses:

  • Hostinger Hosting and WordPress Managing: Learn everything about managing your hosting and WordPress sites.
  • Hostinger Website Builder: Discover how to create basic websites or online shops with Hostinger Website Builder.

You can get both courses for free by clicking the link in the description.

If you liked this guide, give it a thumbs up and subscribe to my channel for more tips. If you have any questions, leave a comment below!

Happy building!

Similar Posts