diff --git a/nbs/how_to/02_add_custom_domain.ipynb b/nbs/how_to/02_add_custom_domain.ipynb index c593bf4..11ff2d4 100644 --- a/nbs/how_to/02_add_custom_domain.ipynb +++ b/nbs/how_to/02_add_custom_domain.ipynb @@ -22,8 +22,14 @@ "On this page you will learn how to customize your app's domain in two ways:\n", "\n", "1. Custom pla.sh subdomain\n", - "2. Bring your own domain\n", - "\n", + "2. Bring your own domain" + ] + }, + { + "cell_type": "markdown", + "id": "63ea66e0", + "metadata": {}, + "source": [ "## Custom pla.sh subdomain\n", "\n", "When you deploy a Plash app for the first time, a `.plash` file is created in your project root directory. This file contains your app's configuration, including the app name which determines your subdomain:\n", @@ -53,16 +59,21 @@ "\n", "::: {.callout-tip}\n", "You cannot choose a `PLASH_APP_NAME` that has been taken by another user. If you do, you'll receive an error when you run plash_deploy.\n", - ":::\n", - "\n", - "\n", + ":::" + ] + }, + { + "cell_type": "markdown", + "id": "2ce6027a", + "metadata": {}, + "source": [ "## Using Your Own Custom Domain\n", "\n", "To use your own domain with your Plash app:\n", "\n", "1. Open the `.plash` file in your project directory\n", "2. Replace the `PLASH_APP_NAME` value with your full domain name\n", - "3. Set up a CNAME record with your DNS provider pointing to `pla.sh`\n", + "3. Set up DNS to point to `pla.sh` (see below)\n", "4. Redeploy your app with `plash_deploy`\n", "\n", "```bash\n", @@ -70,38 +81,38 @@ "export PLASH_APP_NAME='myapp.example.com'\n", "```\n", "\n", - "### Setting Up DNS Records\n", - "\n", - "You'll need to create a CNAME record with your DNS provider that points your domain to `pla.sh`. Here are quick guides for popular DNS providers:\n", + "### Setting Up DNS\n", "\n", - "#### Cloudflare\n", - "1. Log in to your Cloudflare dashboard\n", - "2. Select your domain\n", - "3. Go to the DNS tab\n", - "4. Add a CNAME record:\n", - " - Type: CNAME\n", - " - Name: Your subdomain (or @ for root domain)\n", - " - Target: pla.sh\n", - " - TTL: Auto\n", + "**For subdomains** (e.g., `app.example.com`): Create a CNAME record pointing to `pla.sh`.\n", "\n", - "For detailed instructions, see the [Cloudflare DNS setup guide](https://developers.cloudflare.com/dns/zone-setups/partial-setup).\n", + "**For apex/root domains** (e.g., `example.com`): Standard CNAME records won't work. You need a provider that supports CNAME flattening or ALIAS records:\n", "\n", - "#### Namecheap\n", - "1. Log in to your Namecheap account\n", - "2. Go to Domain List and click \"Manage\" next to your domain\n", - "3. Navigate to the \"Advanced DNS\" tab\n", - "4. Add a CNAME record:\n", - " - Type: CNAME Record\n", - " - Host: Your subdomain (or @ for root domain)\n", - " - Value: pla.sh\n", - " - TTL: Automatic\n", + "| Provider | Record Type |\n", + "|----------|-------------|\n", + "| Cloudflare | CNAME (auto-flattened at apex) |\n", + "| AWS Route 53 | ALIAS |\n", + "| Azure DNS | Alias |\n", + "| DNS Made Easy | ANAME |\n", + "| DNSimple | ALIAS |\n", + "| Namecheap | ALIAS |\n", + "| Porkbun | ALIAS |\n", "\n", - "For detailed instructions, see the [Namecheap CNAME setup guide](https://www.namecheap.com/support/knowledgebase/article.aspx/9646/2237/how-to-create-a-cname-record-for-your-domain/).\n", + "::: {.callout-tip}\n", + "We recommend **Cloudflare** for DNS—just create a CNAME at the apex and it handles flattening automatically.\n", + ":::\n", "\n", - "::: {.callout-note}\n", - "DNS changes can take up to 48 hours to propagate fully, though they often take effect much sooner.\n", + "::: {.callout-warning}\n", + "GoDaddy does not support CNAME flattening. Use a subdomain or switch DNS providers.\n", ":::\n", "\n", + "DNS changes can take up to 48 hours to propagate, though they often take effect much sooner." + ] + }, + { + "cell_type": "markdown", + "id": "d034f19f", + "metadata": {}, + "source": [ "## Verifying Your Custom Domain\n", "\n", "After setting up your custom domain and redeploying your app, you can verify it's working by:\n", @@ -111,13 +122,7 @@ ] } ], - "metadata": { - "kernelspec": { - "display_name": "python3", - "language": "python", - "name": "python3" - } - }, + "metadata": {}, "nbformat": 4, "nbformat_minor": 5 }