Skip to content

Commit

Permalink
custom subdomain instructions added
Browse files Browse the repository at this point in the history
  • Loading branch information
yafimvo committed Mar 27, 2024
1 parent 46ffd0a commit 21c2903
Show file tree
Hide file tree
Showing 10 changed files with 47 additions and 22 deletions.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added doc/static/custom-domains/domains-section.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added doc/static/custom-domains/info-icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added doc/static/custom-domains/navigation-bar.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added doc/static/custom-domains/subdomain-dns.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added doc/static/custom-domains/subdomain-settings.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
69 changes: 47 additions & 22 deletions doc/user-guide/custom-domains.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,49 +21,73 @@ If you would like a custom `ploomberapp.io` subdomain, like `my-custom-app.ploom

### Adding a custom subdomain

To deploy an app at `subdomain.yourdomain.com`, you first need to ensure it's deployed and available (the **VIEW APPLICATION** button should be enabled)
To deploy an app at `subdomain.yourdomain.com`, you first need to ensure the main domain you want to link to (e.g., `yourdomain.com`) is registered properly.

There are 2 ways to register the main domain:

1. [Connect to a running app](new-custom-domain-with-app)
2. [Create a global domain that is not connected to any app](new-custom-domain-no-app)

Once we have the main domain registered, we can go to the application settings page by clicking on the **SETTINGS** button.

![](../static/custom-domains/view-application.png)


Next, in the **Custom domains** section, click the text field and you should see your new domain there. It means the domain is available, and you can host your application on a subdomain of it.

![](../static/custom-domains/subdomain-settings.png)


```{warning}
If your application is not ready and publicly available, the button will be disabled and you won't be able to connect a custom domain to it.
If you don't see your main domain in there, it means something went wrong and you probably won't be able to use a subdomain. In this case, please contact us via [contact@ploomber.io](mailto:contact.ploomber.io) or our public [slack channel](https://ploomber.io/community/)
```

Go to the application settings page by clicking on the **SETTINGS** button. Next, in the **Custom domains** section, enter your domain name and click **CONNECT**.

![](../static/custom-domains/custom-subdomain-section.png)
1. Select the domain, type your subdomain (e.g., `app.example.com`), and click connect

![](../static/custom-domains/subdomain-settings-selected.png)

A new section will display. **Disregard its contents**, and follow these instructions.
2. Once the subdomain is registered successfully, please complete the process by [updating your DNS records](update-dns-records)

Add the following records:
![](../static/custom-domains/subdomain-dns.png)

1. `CNAME` record: set `subdomain` as the host (e.g., if you want to serve from `subdomain.example.com` set `subdomain`) and set the value to `{yourapp}.ploomberapp.io`.
2. `CNAME` record: with the shown **CNAME name** and **CNAME value** (as displayed in the **SSL certification status** section, see below)

![](../static/custom-domains/ssl-cname-record.png)
(new-custom-domain-no-app)=
#### New custom domain without an app

To modify your DNS records, follow these instructions (they apply to Namecheap but they're similar for other DNS providers):
Users have the option to create custom domains without associating them directly with any specific application. This option allows users to host multiple applications under different subdomains, such as `app1.example.com`, `app2.example.com`, and `app3.example.com`, while the main domain, `example.com`, remains independent of any hosted application.

1. Log in to your [Namecheap account](https://www.namecheap.com/)
1. Go to `Account` section

2. Click `Domain List` tab and then click `Manage` button next to your domain
![](../static/custom-domains/navigation-bar.png)

![](../static/custom-domains/namecheap-domains.png)
2. In the `Domains` section, you can view your registered domains. Currently, there are no registered domains.
To add a new domain, click on `NEW DOMAIN` and wait for the popup.

3. Click `Advanced DNS`
![](../static/custom-domains/domains-section.png)

![](../static/custom-domains/namecheap-advanced-dns.png)
3. Type your main domain, e.g., `example.com` and click `CREATE`

4. Add the relevant DNS records, and click `Save all changed`.
![](../static/custom-domains/new-global-domain-popup.png)

4. Once it's done you should be able to see your new domain under `Domains`

```{important}
DNS record changes might take up to 48 hours to take effect. In the meantime, your application will be accessible from the `ploomberapp.io` URL
```
![](../static/custom-domains/domains-section-with-domain.png)

5. Update your DNS records

First, open the information panel by clicking this icon next to your domain: ![](../static/custom-domains/info-icon.png)

![](../static/custom-domains/global-domains-sidebar.png)

As you can see, the domain has been created, and there is no attached application.
To make the domain availble via SSL, we need to add one DNS record as described in the information panel.

Please follow these instructions on how to [update your DNS records](update-dns-records)


### Adding a custom domain
(new-custom-domain-with-app)=
#### Adding a custom domain

To deploy an app at `yourdomain.com`, you first need to ensure it's deployed and available (the **VIEW APPLICATION** button should be enabled)

Expand All @@ -84,7 +108,7 @@ There are two ways to connect a custom domain. Depending on where you want to st



#### Method 1: CNAME record
##### Method 1: CNAME record

After typing your domain and clicking on **CONNECT**, a window like this will display:

Expand All @@ -99,6 +123,7 @@ These are the three records you need to add:

![](../static/custom-domains/ssl-cname-record.png)

(update-dns-records)=
To modify your DNS records, follow these instructions (they apply to Namecheap but they're similar for other DNS providers):

1. Log in to your [Namecheap account](https://www.namecheap.com/)
Expand All @@ -122,7 +147,7 @@ You should be able to see something like this:
DNS record changes might take up to 48 hours to take effect. In the meantime, your application will be accessible from the `ploomberapp.io` URL
```

#### Method 2: Nameservers
##### Method 2: Nameservers

First, let's change the connection method to nameservers, by clicking `nameservers`.

Expand Down

0 comments on commit 21c2903

Please sign in to comment.