Skip to main content
All CollectionsWebsite BuilderDesign
Website Builder: How to Disable Copying or Selecting Website Content
Website Builder: How to Disable Copying or Selecting Website Content

Disallowing to copy or select content in Hostinger Website Builder

Updated over a week ago

If you use Hostinger Website Builder and want to prevent copying or selecting your website content, follow the steps below.

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.

Did this answer your question?