October DealsAmazon USOctober deal check: compare before you payAmazon US: current deals, useful picks and tech finds.Check DealsPC HealthRecommendedCrashes, freezes, slowdowns? Check your PC nowSpot repairable issues before they interrupt work.Check PCOctober DealsAmazon USDeal season is back - check today's better picksAmazon US: current deals, useful picks and tech finds.See Picks×
Skip to content
World desk3 min

Hostinger AI Builder: How to Disable Copying or Text Selection in Manual Mode

How to disable right-click and text selection on a Hostinger AI Builder site in manual mode using the Custom code field, with the limits Hostinger itself describes.
Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

You can turn off right-click menus and text selection on a Hostinger AI Builder site in manual mode by pasting a supplied JavaScript snippet into the site’s Integrations > Custom code field. Hostinger’s own support guide says this is a deterrent, not a reliable way to protect content, and that visitors can still get around it.

Steps to add the copy and selection restrictions

Hostinger’s support article “Hostinger AI Builder: How to disable copying or selecting website content in manual mode” describes one workflow for both restrictions. The steps below follow that guide.

As an Amazon Associate I earn from qualifying purchases.

  1. Open your website in Hostinger AI Builder and make sure it is in manual mode.
  2. In the site editor, click the More (⋯) menu, then choose Integrations.
  3. Paste the snippet you want into the Custom code field. Use the context-menu snippet, the text-selection snippet, or both, depending on which behavior you want to restrict.
  4. Save the changes and update the website so the snippet goes live.
  5. Open the published site in a browser and confirm the behavior you added. Hostinger’s guide does not state which browsers it tested, so check the browsers your visitors are most likely to use.

Hostinger’s broader manual-mode documentation distinguishes between the Integrations Custom code field, which it describes as the place for scripts that load in the page head, and the Embed code element, which it describes as the place for code in the page body. For this restriction, follow the guide’s instruction to use the Custom code field.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

The two snippets Hostinger publishes

Hostinger documents two separate snippets. They do different things, so decide which one you need before you paste anything.

Blocking the right-click context menu

This snippet listens for the contextmenu event, which fires when a visitor right-clicks, and cancels it. Visitors who right-click see no context menu, which removes options such as “Copy” and “Save image as” from that menu.

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

Preventing text selection

This snippet listens for the selectstart event, which fires when a visitor begins selecting text, and cancels it. Because the text cannot be highlighted, the most common way of selecting and copying a passage is blocked.

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

Both snippets are reproduced as Hostinger published them. The guide does not explain how they behave in individual browsers, so treat their behavior across browsers as unverified.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

What these restrictions do and do not stop

Hostinger states plainly that this approach is “not foolproof.” A visitor who inspects the page source or turns off JavaScript can get to the text, so the snippets only raise the effort required. Hostinger also warns that the restriction “can be seen as an annoying user experience” and says it is “not recommended for most websites.”

The snippets target only the context-menu and text-selection events. The guide does not address other routes, such as keyboard shortcuts, browser menus, or screenshots, and neither snippet should be relied on to stop them. Describe the result to readers and clients as an interaction restriction, not as copyright enforcement or a security control.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Other protections Hostinger mentions

The same support article points to other options for protecting content: watermarking images, server-side security, and relying on copyright protection. The guide does not compare how well these work or explain how to set them up, so treat them as directions to research separately rather than as a tested ranking. If the content you want to protect is high value, watermarking images and understanding your copyright options are usually more practical starting points than a script.

Should you use these snippets?

  • Use the context-menu snippet if you only want to stop casual right-click saving of images or copying of short text, and you accept that visitors can still bypass it.
  • Use the text-selection snippet only if you want to prevent highlighting of text and can accept that it will make the page feel restricted to readers.
  • Skip both if your main goal is protecting paid or proprietary material. Hostinger itself says the method is not foolproof, so use server-side access controls or other protections for content that must stay private.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Leave a Reply

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

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

More from the Wire

  1. World desk4 min
    How to Spot an AI Voice Scam Before Sending MoneyDon’t rely on how a caller sounds. Pause, call back through a known number, and verify the emergency with another trusted person before sending money.
  2. Mountain View desk4 min
    Google’s SynthID Detector: How to Check AI-Generated Images, Video and AudioGoogle’s SynthID Detector looks for an embedded watermark in supported images, video and audio. Here is what its results do—and do not—show.
  3. Redmond desk20 min
    How to create a link to File or Folder in Windows 11Windows 11 gives you several ways to point to a file or folder without moving or duplicating it. You can create a desktop shortcut,…
Recommended PC Tool
Recommended PC Tool
Windows Errors? Fix Them Before They SpreadFree repair scan
Outdated Drivers Are Slowing You DownFree scan - exact matches

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.