Back to blog

How to Publish a Website Built with AI (Vibe Coding)

By Marcos AlonsoCEO of OnlyDevs
Web Development11 min read read

With tools such as Lovable, Bolt, v0, Replit, Cursor or ChatGPT itself, anyone can now build a website by describing what they want, without knowing how to code. It has been nicknamed vibe coding: you explain the idea and the AI writes the code.

The trouble comes afterwards. The site looks perfect in the preview, but you don't know how to put it on your domain, the contact form doesn't send anything, and you wonder whether you need a legal notice or a cookie banner. This guide walks you through it step by step, without jargon.

First: what kind of website has the AI built?

Before choosing where to publish it, it helps to know what you have. There are two kinds of website, and the options differ quite a bit.

Static website: pages that look the same for everyone, such as a company site, a landing page or a portfolio. They are usually HTML, CSS and JavaScript files, or a React or Vite project that turns into those files when published. This is the most common result of AI-built sites and the easiest to publish.

Website with a server or database: if it has users who log in, an admin panel, payments or data that gets stored, it needs more than files. It might be a Next.js project with server functions, or an app connected to a database such as Supabase or Firebase.

If you're not sure, ask the AI you built it with: "Is this site static or does it need a server? Which command builds the version to publish?" It will tell you in seconds.

Option 1: publish from the tool itself

Lovable, Bolt, v0 and Replit have a Publish or Deploy button that puts the site online in a minute, at an address like yourproject.lovable.app. It's the quickest way to show it to people.

For a serious project it has two drawbacks. First, using your own domain usually requires a paid plan on that tool. Second, the site depends on that platform: if prices change or you stop paying, your site goes with it. If you choose this route, make sure you can download or export the code, usually by connecting it to GitHub, so you can take it elsewhere whenever you want.

Option 2: GitHub plus Vercel, Netlify or Cloudflare

This is what developers use, and it isn't as hard as it sounds. GitHub is where the code is stored; Vercel, Netlify and Cloudflare read that code and publish it. The advantage is that every time you change something on GitHub, the site updates itself.

1. Create a free GitHub account. Most AI tools have a button to connect the project to GitHub; if not, you can create a new repository and upload the files from the GitHub website. Make it private.

2. Create an account on the publishing platform, signing in with your GitHub account, and choose the option to import a project. Pick your repository.

3. The platform usually detects the project type (React, Vite, Next.js…) and fills in the settings. Click Deploy and within a minute or two your site will be live at a temporary address.

4. If publishing fails, copy the error message and paste it into the AI that built your site. Most of the time it will tell you exactly what to change.

An important point about Vercel: its free plan (Hobby) is for personal, non-commercial use only. If the site belongs to your company or a client, you need the Pro plan or another platform. Netlify and Cloudflare offer free plans that also cover low-traffic business sites; always check the current terms, as they change often.

If your site is static and you'd rather avoid GitHub altogether, there's a shortcut: with Netlify Drop you drag the folder with your site's files and it goes live. The catch is that every change means uploading it again by hand.

Connect your domain

The temporary address (yourproject.vercel.app, yourproject.netlify.app…) is fine for testing, but your business needs its own domain, such as yourcompany.com. If you don't have one yet, buy it from a registrar such as Namecheap, IONOS or Cloudflare itself; a .com usually costs a few euros or dollars a year.

On the platform where you published, find the domains section and add yours. It will tell you which DNS records to create, usually an A or CNAME record. Log in to your registrar's dashboard, open the DNS zone and create them exactly as shown, without deleting the email records if you already use email on that domain.

The change takes anywhere from a few minutes to a few hours to take effect. The security certificate (the padlock and https) is added by the platform automatically and for free. Finally, decide whether your site will use www or not and redirect one to the other, so it doesn't exist twice.

Forms: why yours doesn't send anything

This is the most common problem. The AI draws a lovely form, but often it's only the visual part: when you click Send, a thank-you message appears and the message goes nowhere. For it to reach your inbox you need something that receives it and forwards it to you. You have several options:

Netlify Forms: if you publish on Netlify, just add the data-netlify="true" attribute to the form tag. Netlify detects the form when it publishes, stores the submissions and emails them to you.

Form services such as Formspree or Web3Forms: you sign up, they give you an address or a key and you add it to the form. They work with any hosting and have free plans for a small number of messages a month.

Your own database or function: if your tool works with Supabase or Firebase, messages can be stored there and emailed with a function. It's more flexible, but also more technical.

Whichever you choose, add spam protection (a hidden anti-bot field or a captcha), a checkbox to accept the privacy policy, and run a real test before announcing the site: fill in the form yourself and check the email arrives, and doesn't land in your spam folder.

A time-saving tip: ask the AI to connect the form to the service you've chosen, for example "connect this form to Formspree using this address", and then test it.

Keys and passwords: what nobody should see

If your site uses external services (an AI, a database, a payment system), it will have access keys. Many tools leave them written inside the code, and if that code is in the part the browser downloads, anyone can see them and use them at your expense.

Secret keys belong in the platform's environment variables (Settings → Environment Variables on Vercel or Netlify), never in the code or in a public repository. Some keys are meant to be public, such as Supabase's anonymous key, but they are only safe if you have enabled the database's security rules. When in doubt, ask the AI: "Is any secret key exposed in this project?"

If the site belongs to a business or professional in the EU, and in Spain in particular, it must meet a few minimum obligations, whether you, an AI or an agency built it:

Legal notice: who is behind the site (name or company name, tax ID, address and contact details). In Spain this is required by the LSSI.

Privacy policy: what data you collect (for example, through the form), what for, and how people can exercise their rights. This is required by the GDPR.

Cookies: if you use Google Analytics, advertising pixels or other tools that set non-essential cookies, you need a banner that asks for consent before activating them, with the option to reject them as visible as the option to accept.

AI can help you with a first draft of these texts, but check them against your real details or with a professional: a legal notice copied from another website doesn't protect you.

After publishing: getting found on Google

Publishing your site doesn't mean it will show up on Google. The first step is to add your site to Google Search Console and submit the sitemap; that way Google knows it exists and warns you about any problems. And to find out how many people visit and what they do, set up Google Analytics 4.

Check the basics too: each page should have its own title and description, the site should load quickly on mobile, and the copy should clearly explain what you do and where. You can ask the AI to review each page's title and description.

Quick checklist before announcing your site

The site loads on your domain, over https, and the www and non-www versions lead to the same place.

The form works: you've tested it and the message reached you.

There are no secret keys in the code or in a public repository.

You have a legal notice, a privacy policy and, if needed, a cookie banner.

It looks good on mobile and every link and button goes where it should.

You've added the site to Search Console and submitted the sitemap.

What if it gets complicated?

Building a website with AI keeps getting easier; publishing it properly, with your domain, working forms, security and the legal side in order, still has its technical side. If you get stuck, at OnlyDevs we take the site you built with AI and get it published and working, or build it from scratch if you need more. Tell us what you have and we'll explain how we'd do it.

Related service

Web Development

We build custom websites, landing pages, corporate portals and web applications with the latest technologies.

View service

Subscribe to our newsletter

Get free tools, news and tips for your day-to-day