> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://contentful.com/developers/docs/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://contentful.com/developers/docs/_mcp/server.

# UI extensions - Hosting

> How to host UI Extensions | Hosting through Contentful | Hosting through third party services, such as S3 or Heroku

> **Info**
>
> **Use the [App Framework](/extensibility/app-framework) for any new projects.** We recommend creating apps instead of UI extensions. [Read the app FAQ to learn why](https://www.contentful.com/help/contentful-app-framework-faq/).

UI Extensions are independent HTML5 applications loaded into an iframe. As every other static resource, they need to be hosted so the browser can fetch the file. Contentful support two types of hosting.

## Contentful hosted

The extension's source code is uploaded to Contentful as a bundled string where all local dependencies need to be inlined into one single file. Internal extensions are uploaded by using the `srcdoc` property and have a **limit of 512kb (uncompressed)**. Use internal hosting if you don't want to host anything on your own and can accept the drawbacks (need for a non-standard build, file size limitation).

> **Info**
>
> Internal hosting is not supported on Internet Explorer and Microsoft Edge as it depends on the iframe property [srcdoc](https://caniuse.com/#feat=iframe-srcdoc).

For example, the following CLI command

```bash
$ contentful extension create \
  --name MyExtension \
  --field-types Symbol \
  --srcdoc index.html
```

creates an extension of name `MyExtension` for the field type `Symbol`. The code of the extension is uploaded to Contentful using the `srcdoc` property.

## Third party hosted

The extension's source code is uploaded to a third party server by using the `src` property. Relative links in the root HTML are supported as expected. Any platform (such as S3, Heroku, personal corporate server, etc) is supported, provided it supports CORS policy and is available through **HTTPS**.

Use third party hosting when you want to be as flexible as possible with your development and deployment process.

For example, the following CLI command

```bash
$ contentful extension create \
  --name MyExtension \
  --field-types Symbol \
  --src https://www.example.com/extensions/myextension/index.html
```

creates an extension of name `MyExtension` for the field type `Symbol`. The code of the extension is third party hosted and hence its URI is provided as the `src` property.

## Next steps

* [Managing extensions via the CLI](/extensibility/ui-extensions/managing-a-ui-extension/)