Client area
Menu

Build a Website or App with AI (Claude, Codex, Gemini) and Put It Online in Morocco

Build a website or app with AI and host it at Cap Connect

“Describe what you want, and the AI writes the code.” With Anthropic’s Claude, OpenAI’s Codex, Google’s Gemini or other tools, you can now build a website or an app in a few hours. This is often called vibe coding.

Explore our service: Web hosting

Once the code exists, one step is still missing, and the AI does not do it alone: putting it online with reliable hosting, a domain name and an SSL certificate. This guide shows how to publish a site or app built with AI at Cap Connect, including letting your AI connect to cPanel with an API token.

Building a website or app with AI: what really changes

AI assistants work in two ways. In a chat, you describe your project and the AI returns files to copy. With a coding agent (Claude Code, Codex, Gemini CLI or an editor such as Cursor), the AI reads your folder, edits files and runs commands for you.

Depending on your request, you may get:

  • a static site (HTML, CSS, JavaScript) or a site compiled with Vite, Astro or React;
  • a WordPress site or shop, a theme or a plugin;
  • a PHP, Node.js (Express, Next.js) or Python (Flask, Django, FastAPI) application.

AI speeds up creation, but you remain responsible for the result: review the code, test on mobile and keep your secret keys out of the project.

Which hosting for a site or app built with AI?

The right hosting depends on what the AI produced:

  • Business site, blog, static site or WordPress: choose cPanel web hosting, from 10 dhs excl. VAT per month (120 dhs per year). It includes a free SSL certificate, daily backups and SSH access. For WordPress, WordPress hosting adds WP Toolkit and LiteSpeed Cache.
  • Node.js, Python or PHP application: choose App Hosting, from 59 dhs excl. VAT per month in the first year (billed annually). It offers cPanel, SSH, Git, Cron, NVMe and LiteSpeed.
  • Docker, root access, always-on tasks or WebSockets: a VPS is a better fit.

Before ordering, check the Node.js or Python versions and your project’s dependencies. If in doubt, our team can check them with you.

Publishing your project on cPanel: three methods

1. The File Manager (simplest)

Ask the AI to produce the final site (the dist or build folder), zip it, upload it to public_html with cPanel’s File Manager and extract it. This suits static sites.

2. SSH and Git (for applications)

Connect over SSH, clone your Git repository, install dependencies, then register the application in cPanel’s Node.js or Python selector. Your coding agent can write and run these commands for you. It is the ideal method for updating the application as it evolves.

3. The cPanel API token (let the AI publish for you)

cPanel lets you create an API token: a key that authorises a program to act on your account without a password. Your coding agent can then send files straight to the hosting.

Connecting AI to cPanel with an API token: step by step

  1. Create the token. In cPanel, open the Security section, then “Manage API Tokens” (if the option is enabled on your account). Give it a clear name, set a short expiry date and copy it: it is shown only once.
  2. Keep it safe. Store it in an environment variable or a .env file excluded from Git. Never paste it into a conversation with an online AI or into your code.
  3. Call the cPanel API (UAPI). Here is an indicative example of uploading a file; adapt your cPanel address and path to your account:
curl -H "Authorization: cpanel YOUR_USERNAME:$CPANEL_TOKEN" \
  -F "dir=/home/YOUR_USERNAME/public_html" \
  -F "file-1=@dist.zip" \
  "https://YOUR_CPANEL_ADDRESS:2083/execute/Fileman/upload_files"
  1. Automate. Ask your coding agent to write a deploy.sh script that reads the token from the environment, uploads the files and checks that the site responds.
  2. Lock it down. Back up before the first deployment, read the script before running it, test on a subdomain first and revoke the token when you no longer need it.

Remember: an API token has the same powers as your cPanel account. Treat it like a password. For more details, see the official cPanel documentation or open a ticket with our support team.

Which domain name for your project: .ma or .com?

Your site needs an address. For a Moroccan audience, a .ma domain name builds trust, shows your local roots and helps local search visibility in Morocco. It is offered from 118 dhs excl. VAT per year, with instant activation, DNS management and redirects.

For an international audience, a .com, .net or .org domain name remains the classic choice, also from 118 dhs excl. VAT per year for the .com. You can also register both to protect your brand.

Once the domain is registered, point it to your hosting: the free SSL certificate then lets you publish the site over HTTPS.

Why Cap Connect is ready for AI-built projects

  • cPanel, SSH, Git and Cron: everything a coding agent needs to deploy.
  • Node.js, Python and PHP on App Hosting, with NVMe and LiteSpeed.
  • Free SSL and daily backups to publish with confidence.
  • Free migration of a cPanel account, completed within 24 hours of opening a ticket.
  • A local team based in Tangier, reachable by ticket, and clear prices in dirhams.

Prefer to delegate? Cap Connect can also build your website or develop your web application.

7 best practices before putting an AI-generated site online

  1. Review the code and remove keys, passwords and test data.
  2. Check dependencies: update them and remove the ones you do not use.
  3. Test on mobile, in several browsers and with real forms.
  4. Get the SEO basics right: a title, an H1, a description and clear links on every page.
  5. Add your legal notice and privacy policy.
  6. Enable HTTPS and keep backups before every update.
  7. Monitor the site after launch: errors, speed and availability.

Frequently asked questions

Here are answers to the most common questions about building a website or app with AI and hosting it in Morocco.

Can you build a website with AI without knowing how to code?

Yes, for a business site or a simple page: Claude, Codex or Gemini can generate the code from your description. You still need to review the result, test it on mobile and publish it on hosting. For an important project, get help.

Claude, Codex or Gemini: which AI should you choose to build a site?

All three can generate web code. The best choice depends on your project and the tool offered: chat, editor or command-line agent. Try the same request with two tools and keep the one whose code is clearest. The result publishes on standard cPanel hosting whichever tool you use.

Where can I host a site or app built with AI in Morocco?

Use cPanel web hosting (from 10 dhs excl. VAT per month) for a business, static or WordPress site, and App Hosting (from 59 dhs excl. VAT per month) for a Node.js, Python or PHP application. A VPS suits you if you need root access or Docker.

How do I publish an AI-generated site on cPanel?

Three methods: upload the zipped site to public_html with the File Manager, deploy with SSH and Git, or send the files through the cPanel API with a token. The File Manager is the simplest for a static site.

What is a cPanel API token and is it safe?

It is a key that lets a program, such as your coding agent, act on your cPanel account without a password. It is safe if you treat it like a password: short expiry, stored outside Git, never pasted into a chat, and revoked after use.

Can I host a Node.js or Python application built with AI?

Yes, if the application is compatible with cPanel’s Node.js or Python selector. App Hosting offers SSH, Git and Cron. Check versions and dependencies before ordering. For Docker or always-on services, choose a VPS.

How much does it cost to host a site built with AI in Morocco?

Web hosting starts at 10 dhs excl. VAT per month (120 dhs per year) and App Hosting at 59 dhs excl. VAT per month in the first year, billed annually. Add a domain name, from 118 dhs excl. VAT per year for a .ma. SSL is free.

Why choose a .ma domain name for a site built with AI?

A .ma domain signals a Moroccan site, builds trust with local visitors and suits local search visibility. It costs 118 dhs excl. VAT per year and activates instantly once your order is validated, subject to availability.

Is AI-generated code safe?

Not automatically. Review it, remove keys and passwords, update dependencies, test forms and keep a backup. AI speeds up the work, but checking is still your job.

Can Cap Connect migrate or build my project?

Yes. Migrating a cPanel account is free and completed within 24 hours of opening a ticket. To build a project, Cap Connect can also build your website or develop your web application.

Put this guide into practice

Web hosting

View plans →

Keep reading

Your preferences

Choose your region, currency and language.

Region
Language