How To Use Custom Domains In Bonsai

Article with TOC
Author's profile picture

Ronan Farrow

Mar 02, 2025 · 3 min read

How To Use Custom Domains In Bonsai
How To Use Custom Domains In Bonsai

Table of Contents

    How to Use Custom Domains in Bonsai

    Bonsai is a fantastic platform for hosting your applications, but leveraging its full potential often involves using a custom domain instead of the default Bonsai subdomain. This guide will walk you through the process of connecting your custom domain to your Bonsai application, ensuring a professional and branded online presence.

    Understanding the Process

    Before diving into the steps, it's crucial to grasp the underlying concepts. Connecting a custom domain to your Bonsai application involves configuring your DNS settings to point your domain to Bonsai's servers. This directs traffic intended for your custom domain to your deployed application. This process typically involves creating a CNAME record and potentially an A record, depending on your Bonsai setup and domain registrar.

    Key Terms to Know:

    • Domain Name System (DNS): The internet's phonebook. It translates human-readable domain names (like www.example.com) into machine-readable IP addresses.
    • CNAME Record: A Canonical Name record; it maps your custom domain to another domain name (Bonsai's).
    • A Record: An Address record; it maps your custom domain directly to an IP address.
    • Domain Registrar: The company where you registered your domain name (e.g., GoDaddy, Namecheap, Google Domains).

    Step-by-Step Guide to Connecting Your Custom Domain

    Here's a comprehensive, step-by-step guide:

    1. Obtain Your Bonsai Subdomain: First, deploy your application to Bonsai. Note the subdomain Bonsai assigns to your application. This will be crucial for the next step. It typically looks like your-app-name.bonsai.io.

    2. Access Your Domain Registrar's DNS Settings: Log in to your domain registrar's control panel. Find the section dedicated to DNS management, DNS records, or similar terminology. This varies depending on your registrar.

    3. Create a CNAME Record: This is typically the primary record needed. Create a new CNAME record with the following:

      • Name/Host: Usually www (for www.yourdomain.com), or @ (for yourdomain.com). Choose based on how you want to access your application.
      • Type: CNAME (Canonical Name).
      • Points to/Value: Your Bonsai subdomain (e.g., your-app-name.bonsai.io).
    4. (Optional) Create an A Record: Depending on your setup and requirements, you might need to add an A record. This is often necessary for email services or certain types of applications. You'll need to find the IP address associated with your Bonsai application; this information might be found in your Bonsai dashboard. Create an A record with the following:

      • Name/Host: Usually @ (for yourdomain.com).
      • Type: A (Address).
      • Points to/Value: The Bonsai IP address.
    5. Save Your DNS Changes: Save the changes you've made to your DNS records. This initiates the propagation process.

    6. Wait for Propagation: DNS propagation, the time it takes for your changes to take effect globally, can take anywhere from a few minutes to 48 hours. Be patient.

    7. Verify Your Custom Domain: Once propagation is complete, try accessing your application using your custom domain. If everything is correctly configured, your application should load perfectly.

    Troubleshooting Common Issues

    • DNS Propagation Issues: If your custom domain isn't working after a considerable amount of time, double-check your DNS settings for typos and ensure the changes have fully propagated. Use online DNS propagation checkers to monitor progress.

    • Incorrect CNAME/A Record: Carefully review the values you entered for your CNAME and A records to ensure they accurately match your Bonsai subdomain and IP address.

    • Firewall Restrictions: Certain network configurations or firewalls might block access to your application.

    • Bonsai Application Issues: If you're certain your DNS is correctly configured, double-check your Bonsai application for any problems preventing it from loading.

    By following these steps and troubleshooting potential issues, you can successfully connect your custom domain to your Bonsai application, enhancing your application's professionalism and brand recognition. Remember to consult Bonsai's official documentation for the most up-to-date information and specific instructions.

    Latest Posts

    Thank you for visiting our website which covers about How To Use Custom Domains In Bonsai . We hope the information provided has been useful to you. Feel free to contact us if you have any questions or need further assistance. See you next time and don't miss to bookmark.

    🏚️ Back Home
    close