Limited-time offerPro & Max plans — 20% off

Save 20% on monthly and yearly billing.

View plans

Publishing guide

How to Publish a Codex Website

Codex can generate a complete static website — but once the code is ready you still need to put it somewhere people can open it. This guide covers your publishing options, the static-versus-dynamic distinction, and how to upload Codex output to Host HTML File for a shareable link.

Publishing Options After Codex Generates a Website

The right publishing tool depends on what Codex generated and what you need the published page to do.

Host HTML File — fast static preview link

Upload the static output from Codex as a ZIP archive. Host HTML File generates a shareable browser URL in seconds. No Git, no configuration, no server setup. Best for review links, client previews, and draft sharing.

Best for: Static HTML, CSS, JavaScript output

Codex Sites — integrated hosted deployment

Codex Sites is OpenAI's own publishing layer for Codex-generated projects. It provides persistent hosted URLs, custom domain support, and integrated site management within the Codex and ChatGPT ecosystem.

Best for: Full hosted website with lifecycle management

Vercel / Netlify — Git-based production hosting

Push the project to a Git repository and connect it to Vercel or Netlify. These platforms support build pipelines, environment variables, and custom domains. Best for production projects that need a full deployment workflow.

Best for: Framework projects and production sites

Static Websites vs Dynamic Applications

Before publishing, it helps to understand which type of project Codex produced.

Static website

A static website consists of HTML, CSS, and JavaScript files that a browser downloads and renders directly. There is no server processing the request — the files are served as-is. This is the output Host HTML File can publish.

  • index.html, styles.css, script.js
  • Images, fonts, and SVG assets
  • Client-side JavaScript interactions
  • No npm install required to view

Dynamic application

A dynamic application requires a server to process requests, run code, or access a database. The files cannot be opened directly in a browser — they must be run through a runtime environment. Host HTML File cannot serve dynamic applications.

  • —Requires Node.js, Python, or similar runtime
  • —Uses a database or API backend
  • —Contains server-side rendering code
  • —Needs npm install and a build process

If you are not sure which type Codex produced, ask it: "Is this a static website I can open directly in a browser without a server?" If the answer is yes, it is a candidate for Host HTML File.

How to Get Static Output from Codex

Codex can generate static output in several ways depending on what you asked it to build.

Single-file output

If Codex generated a single HTML file with inline CSS and JavaScript, copy the code from the chat, save it as index.html, and upload it directly to Host HTML File. No ZIP required.

Multi-file static project

If Codex generated separate HTML, CSS, and JavaScript files, collect them into a folder with index.html at the root. Create subfolders for images or fonts if the code references them. Then ZIP the folder contents (not the folder itself) and upload.

my-project/
├── index.html       ← must be at root
├── styles.css
├── script.js
└── images/
    └── hero.png

React or Vite project (build required)

If Codex generated a React or Vite project, you need to build it before uploading. Install dependencies and run the build command. The output folder (typically dist/ or build/) contains browser-ready static files. Zip the contents of that folder.

npm install
npm run build
# Then ZIP the dist/ folder contents

How to Upload to Host HTML File

01

Prepare the ZIP archive

Open your project folder. Select all the files and subfolders inside it — not the folder itself. Compress the selection into a ZIP archive so that index.html sits at the root of the archive.

02

Upload the archive

Go to Host HTML File, open the upload page, and select your ZIP file or drag it into the upload area. Host HTML File extracts the archive and preserves the relative folder structure including CSS, JavaScript, images, and fonts.

03

Copy and share the link

After processing, Host HTML File generates a browser URL. Copy the link and send it to anyone who needs to review the page. No account is needed on the recipient's end. A QR code is also generated for easy mobile sharing.

How to Handle CSS, JavaScript and Images

Host HTML File preserves the relative file structure of your ZIP archive, so asset paths work correctly — as long as the paths in your HTML are relative. Here is what to check:

Use relative paths in HTML

All references to CSS, JavaScript, and images should use paths relative to index.html. Replace any path starting with a leading slash (like /styles.css) with the relative version (styles.css or ./styles.css).

<!-- Correct -->
<link href="styles.css" rel="stylesheet">
<script src="js/app.js"></script>
<img src="images/hero.png">

Keep the folder structure intact

If index.html references images/hero.png, the images folder must exist at the same level as index.html inside the ZIP. The folder structure in the archive should mirror the paths used in the code.

my-project.zip
├── index.html
├── styles.css
├── js/
│   └── app.js
└── images/
    └── hero.png

How to Update a Published Codex Website

Host HTML File does not edit files in place. To update a published website, publish a new version:

Step 1

Return to Codex and request changes

Step 2

Download or copy the updated files

Step 3

Create a new ZIP with index.html at root

Step 4

Upload the new ZIP to Host HTML File

Each upload generates a new project with a new URL. Share the updated link with your reviewers when the new version is ready.

FAQ

Frequently Asked Questions

What kind of Codex output can Host HTML File publish?

Host HTML File publishes browser-ready static files: HTML, CSS, JavaScript, images, fonts, and SVGs. If Codex generated a self-contained static website, Host HTML File can host it. If the project requires a server, a database, or Node.js to run, Host HTML File cannot host it directly — the project must first be compiled or built into static output.

How do I know if my Codex project is a static site?

A static site consists only of HTML, CSS, and JavaScript files that a browser can open without any server processing. If the project contains a package.json, requires npm install, or references a backend server, it is not purely static. Ask Codex to generate a self-contained static version if you want to publish with Host HTML File.

My Codex project uses React or Vite. Can I publish it on Host HTML File?

Yes, but you need to build it first. Run npm run build or vite build to produce a dist/ or build/ folder containing static HTML, CSS and JavaScript. Upload the contents of that output folder (with index.html at the root) as a ZIP to Host HTML File. Server-side Next.js features are not supported.

What should be at the root of my uploaded ZIP?

The index.html file must be at the root of the ZIP, not inside a subfolder. Select all the files inside your project folder (not the folder itself) before compressing. This ensures Host HTML File finds the entry point immediately.

How do I update a published Codex website?

Go back to Codex, make the changes you need, export or download the updated static files, create a new ZIP archive with index.html at the root, and upload to Host HTML File. Each upload creates a new published project with a new URL.

Is Host HTML File a replacement for Codex Sites?

Host HTML File is a lightweight alternative for publishing static file output as shareable preview links. Codex Sites provides full hosted website deployment with persistent URLs and site management. Host HTML File is well-suited for review, testing, and draft sharing before a production deployment decision.

Ready to publish your Codex website?

Upload your static HTML, CSS, JavaScript and images as a ZIP archive. Host HTML File generates a shareable browser link in seconds — no Git, no server, no deployment pipeline.