All Collections
Website Builder
Website Elements
Website Builder: How to Embed Custom Code
Website Builder: How to Embed Custom Code

Learn how to embed custom code using Hostinger Website Builder

Austėja Baranauskaitė avatar
Written by Austėja Baranauskaitė
Updated over a week ago

Custom code allows you to add various third-party elements, features, and integrations to your website.

NOTE

  • To add custom code to the <head></head> part of your website's code, use the Custom code field in the website's integrations settings

Embed Custom Code to a Website

Within the builder, open the Add elements panel on the left, and drag and drop the embed code element to the desired place on your page:

Adding an embed code element to a website using Hostinger Website Builder

Click on the element to see more options: enter code, duplicate, change visibility, delete, resize, etc.:

An embed code element and its editing options in Hostinger Website Builder

Click on Enter code, insert your code, and click on Embed code:

Embedding custom code to the website

Finally, update your website for the changes to reflect online.

Troubleshoot

If there's a URL in your custom code:

  • Make sure to use HTTPS; HTTP links aren’t secure, and browsers often block them

  • Remove spaces from the URL

Bad example

<iframe src=" http://code.com " frameBorder="0" width="900" scrolling="no" height="900" height="900"></iframe>

Good example

<iframe src="https://code.com" frameBorder="0" width="900" scrolling="no" height="900" height="900"></iframe>

If you've inserted the correct code and updated the website, but no widget is visible online, try clearing your browser's cache.

If that doesn’t help, we highly recommend reaching out to the developers or support department of the platform from which you took the code for the widget.

Did this answer your question?