Hostinger AI Builder: How to disable copying or selecting website content in manual mode

Prevent visitors from copying or selecting content on your Hostinger AI Builder manual mode website.

Updated 1 month ago

Prevent visitors from copying or selecting content on your Hostinger AI Builder manual mode website using custom code.

Keep in mind that the below approach is not foolproof. Determined users can still access your content through other means, such as inspecting the page source or disabling JavaScript in their browser. Therefore, this method is not a robust way to protect your content.

Additionally, it can be seen as an annoying user experience, and it’s not recommended for most websites.

Consider other options like watermarking images, using server-side security, or relying on copyright protection.

Copy the code

Copy the preferred code.

Disallow the Right Click

<script>
    document.addEventListener('contextmenu', event => event.preventDefault());
</script>

Prevent From Selecting Text

<script>
    document.onselectstart = () => {
        event.preventDefault();
    }
</script>

Paste the code

Go to your website’s SettingsIntegrations, and paste the code in the Custom code field. Then, save the changes and update your website.