HerdOS Custom Domain Setup

Use this after you register the final HerdOS domain.

1. Choose the production domain
   Example placeholders:
   - herdos.com
   - herdosfarm.com
   - herdos.app
   Recommended production split:
   - app.your-domain.com for the HerdOS web app
   - api.your-domain.com for the HerdOS API

2. Upload the HerdOS files
   Upload the contents of this folder to your hosting provider. The main entry file is:
   - index.html

3. Point the domain DNS to the host
   In your domain registrar DNS panel, use the records given by your hosting provider.
   Common setup:
   - Root domain: A records or ALIAS/ANAME to the host
   - www subdomain: CNAME to the host

4. Enable HTTPS
   Turn on SSL/HTTPS in the hosting provider dashboard before using HerdOS with workers or mobile devices.
   Production API traffic should also use HTTPS and set:
   - HERDOS_ENFORCE_HTTPS=true
   - HERDOS_CORS_ORIGIN=https://app.your-domain.com

5. If using GitHub Pages
   Rename CNAME.example to CNAME and replace the placeholder with your real domain.
   Commit the CNAME file beside index.html.

6. If using Netlify, Vercel, Cloudflare Pages, or similar hosting
   Add the real domain in the host dashboard, then copy the DNS records they provide into your registrar.

7. Keep paths relative
   HerdOS already uses relative links so it can run from your registered domain without hardcoded localhost paths.

8. Replace default provider URLs
   Do not present or launch from default URLs such as render.com, railway.app, fly.dev, or vercel.app.
   Point the app, API, mobile sync endpoint, and RFID middleware to your registered domain names.

Private production note:
For paid users, multi-device cloud sync, user accounts, and stronger security should be connected through a private backend API and database after the public domain is ready.
