How to Fix "Error Rendering Content"

How to Fix "Error Rendering Content"

If you are setting up an External Integration assignment, you may see an error message immediately after entering your website URL. Terracotta prevents you from saving the assignment when it detects that your external website cannot be rendered in the LMS assignment.

Don't panic! Your website is likely working fine. There is probably a security setting on your web server—called a Header—that tells browsers: "Do not let anyone display this website inside a frame."

This guide explains how to confirm the issue and how to resolve it.


Step 1: Verify the Issue

Terracotta runs a check the moment you enter your URL, but it can be helpful to see exactly what is happening using a third-party tool. This confirms that the issue is with the website's settings, not with Terracotta.

  1. Navigate to https://iframetester.com/ (an external testing tool).

  2. Enter the URL of the website you are trying to use in Terracotta.

  3. Click Render Iframe.

The Result: If you see an empty box or an error message inside the tester window, your website is blocking iframe embedding. This confirms that you need to adjust your server settings before it can be used in Terracotta.


Step 2: The Solution

To fix this, the configuration of the server hosting your website needs to be changed to allow cross-origin embedding. This usually involves editing a specific configuration file on your web server.

⚠️ Warning: Before editing any server files, make a backup copy. If you make a typo in these files, your website might temporarily stop loading. Having a backup allows you to undo changes instantly.

Note: If you are using a hosted website builder (like Wix, Squarespace, or Google Sites), you might not have access to these settings. In that case, you may not be able to use that specific site with Terracotta.

Where to look

These settings are typically located in the root folder of your website files. Depending on what type of server you are using, look for one of the following files:

1. The .htaccess file (Most Common)

If your website is hosted on an Apache server (common for many university web hosts and shared hosting providers), these rules are often found in a hidden file named .htaccess.

  • What to do: Open the .htaccess file in a text editor.

  • What to look for: Search for lines that look like the examples below and delete them.

    Header always set X-Frame-Options "SAMEORIGIN" Header set Content-Security-Policy "frame-ancestors 'self'"

2. The web.config file

If your website is hosted on a Windows (IIS) server, the rules will be in an XML file named web.config.

  • What to do: Open the file and look for the <customHeaders> section.

  • What to look for: Find and delete lines that look like this:

    <add name="X-Frame-Options" value="SAMEORIGIN" />

3. The nginx.conf file

If your website uses Nginx, the headers are likely in the main configuration file (usually /etc/nginx/nginx.conf) or a site-specific config block.

  • What to do: Look inside the server { ... } block.

  • What to look for: Find and delete lines that look like this:

    add_header X-Frame-Options "SAMEORIGIN"; add_header Content-Security-Policy "frame-ancestors 'self'";

Summary of the Goal

You are looking for any code that sets X-Frame-Options or Content-Security-Policy. By removing these specific lines, you are telling the server: "It is okay to display this website inside other tools," which allows Terracotta to do its job.


Step 3: "I can't make these changes" (Email Template)

If you are a researcher or teacher, you might not have the ability to manage the web server yourself. In this case, you may need to ask your University IT department or your Web Administrator to make this change.

Copy and paste the email below to send to your support team:

Subject: Request to update Security Headers for [Insert Your Website URL]

Hello IT Team,

I am trying to use a website hosted by us ([Insert URL]) as part of an experiment within our Learning Management System using a tool called Terracotta.

Terracotta embeds our website inside the LMS interface using an iframe. Currently, I am unable to configure the assignment because the website's headers are blocking it from being rendered in an iframe.

Could you please update the server configuration to allow this page to be embedded in iframes?

Requested Changes:

  1. Please remove the X-Frame-Options header (if present).

  2. Please ensure the Content-Security-Policy does not block frame-ancestors.

The goal is to allow the website to be rendered via iframe in Terracotta, so that it can be seamlessly displayed to students in our LMS.

Thank you for your help!


Still having trouble?

If you have updated these settings, verified that the site works on iframetester.com, but are still receiving an error in Terracotta, please contact Terracotta support (support@terracotta.education).