iTechGuides is reader-supported. When you buy through links on our site, we may earn an affiliate commission. As an Amazon Associate I earn from qualifying purchases. Learn more
In manual mode, Hostinger AI Builder lets you add a published JavaScript snippet that blocks the right-click context menu or stops visitors from selecting text. Go to More (⋯) → Integrations → Custom code, paste the snippet, save, and update the website. The method only makes copying less convenient. Hostinger’s own support article says it is not a way to protect content, and the limits are covered below.
What this setting actually changes
The snippets run in the visitor’s browser. They cancel two specific browser events: the context menu that opens on right-click, and the start of a text selection. Nothing is removed from the page, and the text remains in the HTML that the browser downloads. That distinction matters for everything that follows.
Steps to add the snippet
- Open your website in the Hostinger AI Builder editor and confirm that the site is in manual mode. The steps below apply to manual mode, not to the AI-driven editing flow.
- In the site editor, click the More (⋯) menu, then choose Integrations.
- Open the Custom code field.
- Paste either the context-menu snippet or the text-selection snippet from the next section. You can add both, one after the other, if you want both behaviors.
- Save the changes, then update the website so the change is published. A change that is saved but not published will not affect visitors.
- Open the published site in a private browser window and test it. Right-click on body text and try to select a paragraph. If the behavior does not appear, check that you pasted the code into Custom code and that the site was updated.
Hostinger’s manual-mode guides separate two places for code. The Custom code field is used for scripts that load in the page head, while an Embed code element places code in the page body. For this feature, Hostinger’s copy-protection article specifies the Custom code field, so use that field rather than an Embed code element.
The two snippets
Blocking the right-click context menu
This snippet cancels the contextmenu event, so the browser’s right-click menu does not open on the page:
#1 Best Overall
<script>
document.addEventListener('contextmenu', event => event.preventDefault());
</script>
Preventing text selection
This snippet cancels the selectstart behavior, so visitors cannot begin highlighting text by dragging or double-clicking:
<script>
document.onselectstart = () => {
event.preventDefault();
}
</script>
Both blocks are reproduced exactly as Hostinger publishes them. Hostinger does not say which browsers they were tested in, so check them in the browsers your visitors use.
How the two snippets differ
| Snippet | What it stops | What it does not stop | Visitor friction |
|---|---|---|---|
Context menu (contextmenu) |
The right-click menu on the page | Selecting text, keyboard copy shortcuts, viewing page source, browser tools (Hostinger says visitors can inspect source or disable JavaScript; keyboard shortcuts are not addressed in the article) | Visitors who expect the right-click menu for normal browsing will find it missing |
Text selection (onselectstart) |
Starting a text selection by dragging or double-clicking | Right-click copy options, keyboard copy shortcuts, viewing page source, browser tools (keyboard shortcuts are not addressed in the article) | Visitors cannot highlight text for reading, searching, or translation tools, which is a broader interruption |
The text-selection snippet affects more normal reading behavior than the context-menu snippet, so it deserves more caution before you publish it.
Recommended Free Tools
Limits you should expect
Hostinger states plainly that the approach is not foolproof. Visitors who inspect the page source or turn off JavaScript can reach the text. Hostinger also describes the method as an annoying user experience and says it is not recommended for most websites. The snippets therefore work as deterrents, not as content security controls or copyright enforcement.
Rank #3
- Source access: the text is in the page HTML, so anyone who opens the source can read and copy it.
- JavaScript off: with JavaScript disabled, the snippets do nothing.
- Screenshots and browser tools: the snippets do not prevent screenshots, and they do not prevent reader or accessibility tools from reading the page.
- Usability: visitors who rely on right-click options, selection, or translation may find the site harder to use.
- Legal position: the snippets do not establish ownership or enforce copyright. Copyright protection is a separate matter, and Hostinger lists it only as an alternative approach.
Options Hostinger suggests instead
Hostinger’s support article mentions three alternatives without comparing their effectiveness or giving setup steps for them:
- Watermarking images, for photographs or graphics you need to protect from reuse.
- Server-side security, which keeps protected content off the public page until it is authorized.
- Relying on copyright protection, which depends on the rights you hold and the jurisdiction where you publish.
How to reverse the change
To undo the change, return to More (⋯) → Integrations → Custom code, delete the snippet you added, save, and update the website again. Then check the published page to confirm that right-click and selection work normally.
Verified details and dates
This walkthrough is based on Hostinger Support’s article titled “Hostinger AI Builder: How to disable copying or selecting website content in manual mode,” which was checked on 2026-10-04 and displayed “Updated 1 day ago” at that time. Hostinger’s related guides on customizing templates in manual mode and using manual mode were checked the same day. Interface labels and snippets can change, so compare the menu names with what your editor shows.
Outdated Drivers Are Slowing You Down
One free scan finds every outdated or missing driver and matches the right update for your exact hardware.Free scan · exact hardware matchPC Slower Than It Used to Be?
A free scan shows the junk files, broken settings and background clutter dragging Windows down - then fixes them in one click.Free scan · Windows 10 & 11The Hostinger article does not publish usage statistics, test results, or browser compatibility data for these snippets, so none are reported here.
Quick Recap
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.

