How-to guide 8 min read

How to build a website with AI: Codex + Cloudflare

Buy your domain in Cloudflare, build with Codex, and publish through GitHub and Cloudflare Pages. Follow the setup with screenshots and copyable prompts.

Your website idea does not need to stay in a notes app. You can build it with Codex, keep the code in GitHub, and publish it on your own domain through Cloudflare.

This is the workflow behind ruivas.ai. I describe the outcome, review what Codex builds, and iterate. GitHub stores the code. Cloudflare Pages publishes it. Here is how to put that setup together, starting with the domain.

Buy your domain in Cloudflare

Use Cloudflare Registrar to buy the address people will use to find your website. The same Cloudflare account will manage your domain and website hosting.

  1. Create a Cloudflare account or sign in, and verify your account email.
  2. Open Domain Registration → Register Domains in the dashboard, or start with Cloudflare’s domain search.
  3. Search for your name, company, or product. Check the exact spelling and extension, availability, registration term, and renewal price.
  4. Choose an available domain, enter your registrant details, review the purchase, and complete checkout.
  5. Complete the registrant email verification when requested.

Checkpoint: your new domain appears in your Cloudflare account. Continue with this same account when you publish the site. See Cloudflare’s registration instructions.

Cloudflare domain search for yourbrand.com, showing availability and registration and renewal prices for suggested domains
Search directly in Cloudflare. Screenshot captured 28 October 2026. The name is an example; availability and prices change.

Open your website project in Codex

Follow OpenAI’s current quickstart: install the ChatGPT desktop app, sign in, and open a folder for your website. Choose Codex from the product selector to work with your codebase. Give it your goal and the relevant files.

Create a folder with a name you recognise, such as my-website. Put your brand references, approved photos, and existing copy there. You can start from an empty folder; a written brief is enough for a first version.

Product selector showing Codex selected
Product selector illustration captured from OpenAI’s official quickstart. Interfaces may change.

You do not need to add an AI chatbot to your website to build it with AI. In this walkthrough, Codex helps create the files; visitors receive an ordinary website.

Give Codex a brief with a clear goal

“Build me a website” leaves a lot to chance. Tell Codex who it is for, what visitors need to understand, and what they should do next. Give it real material: your services, your photos, your voice, and evidence you are happy to publish.

Here is a starting prompt. Replace the brackets before using it.

Your first website prompt
Build a website in this project folder.

Business/name: [your name or company]
Audience: [who the website is for]
Main goal: [book a call / request a quote / buy / subscribe]
Pages: [Home, About, Services, Contact]
Tone: [how you want to sound]
Visual references: [colours, websites, attached photos]
Primary call to action: [button text and destination]
Contact email: [your preferred public email]

Use the material I provide. Do not invent testimonials, client relationships, or performance numbers.

Keep the first version simple and ready to publish with Cloudflare Pages. Handle the technical choices for me and explain any decision that affects cost or what visitors can do.

Make it work on mobile and desktop, with readable text, accessible navigation, descriptive image text, and reduced-motion support.

Build the first version, start a local preview, and tell me what to review.

For ruivas.ai, the starting point is a personal brand website: keynotes, workshops, practical AI tools, and a clear discovery-call invitation. The stage photos inform the palette. The copy should sound like me. Those decisions matter as much as the code.

Ask for a small first version. A clear homepage and a working contact route are a useful foundation. Add a tools library, guides, or a workshop planner when they serve an actual purpose.

Preview it and make specific changes

Open the local preview Codex gives you. Read the page as a visitor: can you understand the offer quickly, find evidence, and take the next step?

  • Check a narrow screen: headings, menus, buttons, and images should fit.
  • Read the words: replace vague claims with useful details.
  • Click the links: navigation, booking, email, and social links need the right destinations.
  • Watch the motion: animation should support reading, and respect reduced-motion preferences.

Give feedback that names the section and the change. “Make it better” is much less useful than “The about photo crops too tightly; show more of the person and reduce its height on mobile.” You can attach a screenshot and point to the problem.

An iteration prompt
Review the current homepage on desktop and mobile.

Make the primary call to action easier to find, shorten repeated copy, and fix any heading or image alignment problems. Keep the existing brand colours and approved testimonials.

Show me the updated preview and explain the changes. Check that every contact link uses my preferred email address.

If your site has an enquiry form, tell Codex where submissions should arrive. Ask it to test delivery and show what visitors see after sending a message.

Save your website on GitHub

GitHub keeps your website project and a history of its changes. Cloudflare can use that saved project to publish updates.

Create a GitHub account if you need one, then ask Codex to help save your website there. Sign in and approve access when requested. If a step needs your input, ask Codex to walk you through it.

Save my website on GitHub
Help me save this website in my GitHub account.

Check that the website works and that no passwords, private files, or credentials will be uploaded.

Create or connect a repository for this website. Handle the Git commands and project setup. Ask me to sign in or approve access when needed.

Save the current version and give me its GitHub link.

Checkpoint: you have a GitHub link where you can see the saved website project.

Publish a preview with Cloudflare

Start by publishing to the preview address Cloudflare provides. You can review it before connecting the domain you bought.

Publish my website
Help me publish this website with Cloudflare Pages using my GitHub project.

Prepare the files and choose the publishing settings that match the project you built. Handle the technical configuration where you have access; guide me through any steps I need to complete myself.

Ask me to sign in or approve the GitHub connection when needed. If a setup screen needs a value, tell me exactly what to enter.

Publish to the Cloudflare preview address first. Open the result, check the pages and images, and test the main contact or booking link.

Give me the working preview URL.

If you are completing the connection yourself, open Workers & Pages → Create application → Pages in Cloudflare, choose to import a Git repository, and select your website project. Use the settings Codex provides for your project. You can share a screenshot of any screen where you get stuck.

Checkpoint: open the pages.dev link Codex gives you. You should see your website, with working photos and links. This site’s Cloudflare address is ruivas-ai.pages.dev.

Add your custom domain in Pages

In the same Cloudflare account where you bought the domain, open your Pages project and choose Custom domains → Set up a custom domain. Enter the domain you bought and follow the prompts to connect it to this website. See Cloudflare’s custom-domain instructions.

Example Cloudflare Pages project with the Custom domains tab and Set up a custom domain button
Example project shown in Cloudflare’s documentation. Use your own Pages project and domain.

Choose whether you want your main address to include www. Ask Codex to help make both versions open the same website. ruivas.ai uses the address without www.

Checkpoint: the custom domain shows Active in Pages and opens your website over HTTPS. Activation can take time; check the domain status if it is still pending.

Already own a domain? Follow Cloudflare’s instructions for connecting an existing domain. Tell Codex about any existing website or email service so it can help you preserve them during the move. The steps above assume you bought a new domain through Cloudflare.

Check the live website

Visit the HTTPS version of your domain. Try it on a phone as well as a laptop. Open a page directly, rather than only arriving through the homepage, and refresh it.

  • Does the homepage show the new version?
  • Do page URLs, photos, styles, and navigation work?
  • Does the booking or contact button reach the right destination?
  • If you have a form, does it report delivery accurately?
  • Do both the root domain and www behave as intended?
The live Rui Vas homepage with its AI is here, Panic is optional headline and stage photo
The result: ruivas.ai, built and maintained with this workflow. Screenshot captured 28 October 2026.

If something does not work, send Codex the URL, a screenshot, and a short description of what you expected. Ask it to diagnose the problem and guide you through the fix. If the preview works and your own domain does not, include both links.

Make your next change and publish it

For the next change, describe what you want, review the preview, and ask Codex to publish the approved result through the same GitHub and Cloudflare setup.

Your ongoing update prompt
Update this website: [describe the change].

Keep the existing design unless I ask to change it. Show me a preview and check the result on mobile and desktop.

Once I approve it, publish through our existing GitHub and Cloudflare setup. Open the live website and confirm that my change is visible and the affected links work.

Make changes in small batches so they are easy to review. If an update causes a problem, ask Codex to restore the previous working version and check the live site again.

You now have a website you can keep improving in conversation, with code history behind it and your own domain in front of it. Next, explore the tools I use, or plan a practical workshop to build something with your team.

Bring your questions.
Leave with a next step.

Want to apply this with your team? Let’s shape the right workshop or conversation.