Skip to content

Commit 2be3fa7

Browse files
DSchauLekoArtspragmaticpat
authored
chore(docs): Add first batch of Cloud docs (#36218)
Co-authored-by: Dustin Schau <[email protected]> Co-authored-by: Lennart <[email protected]> Co-authored-by: Patrick Sullivan <[email protected]> Co-authored-by: pragmaticpat <[email protected]>
1 parent 4238142 commit 2be3fa7

24 files changed

+455
-21
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,89 @@
1+
---
2+
title: Adding a Custom Domain to Your Site on Gatsby Cloud
3+
description: Learn how to add a custom domain to your site on Gatsby Cloud
4+
---
5+
6+
## Introduction
7+
8+
Gatsby Cloud allows you to specify Custom Domains for your Gatsby websites. This guide provides the steps for applying Custom Domains to your sites on Gatsby Cloud.
9+
10+
## Prerequisites
11+
12+
Before you can add a custom domain, you'll need to be hosting with Gatsby Cloud. If you haven't already, [turn on Gatsby Hosting](https://support.gatsbyjs.com/hc/en-us/articles/360061641114).
13+
14+
## Directions
15+
16+
### 1. Add a domain
17+
18+
1. Go to Site Settings > Hosting.
19+
1. Click **"Add Domain"** above the domain list to start the process
20+
![Click Add Domain](../../images/click-add-domain.png)
21+
1. In the **"Please enter a domain"** field, add one of the following:
22+
23+
- your apex or root domain (this is your custom domain without the www. part, e.g. mysite.com)
24+
- your subdomain (e.g., www.mysite.com or store.mysite.com)
25+
![Enter your domain](../../images/hosting-domain-modal.png)
26+
27+
Whichever one you choose will become the primary domain for your site.
28+
29+
#### Redirect to the primary domain
30+
31+
If you add an apex domain, Gatsby Hosting will automatically add a redirect that points the www. subdomain to the apex domain. Similarly, if you add a www. subdomain, Gatsby Hosting will automatically add a redirect that points the apex domain to it. Read more about redirected domains in [Working with Redirected Domains](https://support.gatsbyjs.com/hc/en-us/articles/1500003051241).
32+
33+
### 2. Configure your domain name system (DNS)
34+
35+
Next you'll need to visit your 3rd party DNS registrar (e.g. GoDaddy, NameCheap, etc.) to add some DNS records. A DNS Record is an entry in a DNS with details about how to route a request for a given domain name.
36+
37+
#### Apex domain configuration
38+
39+
If you added an apex domain, you will need to add an Address Mapping Record (A Record).
40+
41+
1. Copy one of the IP addresses from the "Value" column for the A records shown next to your custom domain.
42+
1. In your DNS provider's domain settings, create an A Record for the IP address you chose.
43+
![Copy IP Address for A Record](../../images/copy-ip-address-for-a-record.png)
44+
45+
The A Record must point to one of the IP addresses shown for your site. It is only necessary to create an A Record for one of the IP addresses listed.
46+
47+
#### Subdomain configuration
48+
49+
If you added a subdomain, you will need to add a Canonical Name Record (CNAME). The CNAME record must point to the default domain for your site.
50+
![Configure a subdomain](../../images/configure-subdomain.png)
51+
52+
#### How to add DNS records for popular registrars
53+
54+
Here's documentation on adding DNS records for some popular name registrars:
55+
56+
- Go Daddy: [A Record](https://www.godaddy.com/help/add-an-a-record-19238) | [CNAME](https://www.godaddy.com/help/add-a-cname-record-19236)
57+
- Name.com: [A Record](https://www.namecheap.com/support/knowledgebase/article.aspx/319/2237/how-can-i-set-up-an-a-address-record-for-my-domain/) | [CNAME](https://www.namecheap.com/support/knowledgebase/article.aspx/9646/2237/how-to-create-a-cname-record-for-your-domain/)
58+
- NameCheap: [A Record](https://www.name.com/support/articles/115004893508-Adding-an-A-record) | [CNAME](https://www.name.com/support/articles/115004895548-Adding-a-CNAME-Record)
59+
- Google Domains: [A Record](https://support.google.com/a/answer/2579934?hl=en&ref_topic=2721296) | [CNAME](https://support.google.com/a/answer/47283)
60+
61+
## 3. Check DNS status
62+
63+
Once you've added your DNS record, click **"Check Status"** or refresh the page to check that your DNS record has been recognized by Gatsby Hosting.
64+
![Check DNS Status](../../images/check-domain-status.png)
65+
66+
If your domain fails to validate after 24 hours, try creating an A Record for one of the other IP addresses available instead.
67+
![Domain failed to validate](../../images/domain-validation-failed.png)
68+
69+
## 4. Generate SSL certificate
70+
71+
After the domain is validated, we'll generate a free SSL certificate via Let's Encrypt and automatically configure it. This whole process can take a few minutes to complete.
72+
![Generating SSL Certificate](../../images/generate-ssl-certificate.png)
73+
74+
**Note**: DNS records need to be fully propagated in order to properly verify the certificates. If not, SSL certification generation will fail.
75+
76+
## 5. Finish
77+
78+
Once your custom domain has the **"HTTPS On"** label next to it, you should be able to visit it to see your site live.
79+
![Confirm site is successfully connected](../../images/confirm-site-is-connected.png)
80+
81+
If you encounter errors related to the the connection not being secure, please allow a few minutes as it can take time for DNS changes to take effect and be detected by all browsers. Use this time to verify that you followed the above steps completely.
82+
83+
## Other considerations
84+
85+
If you see the following when you visit your custom domain, the site may still be building.
86+
![Site is still building](../../images/site-is-still-building.png)
87+
88+
Check the **"Deploys"** tab for your site to see the current status of your builds.
89+
![Latest build status](../../images/see-latest-build-status.png)

docs/docs/how-to/cloud/configuring-log-drains.md

+20-21
Original file line numberDiff line numberDiff line change
@@ -3,57 +3,56 @@ title: Configuring Log Drains on Gatsby Cloud
33
description: Learn how to connect Gatsby Cloud's hosting logs to third party log analytics providers like DataDog
44
---
55

6+
## Introduction
7+
68
Gatsby Cloud can deliver hosting logs to the 3rd party services (currently only [DataDog](https://www.datadoghq.com/)), which allows developers and marketers to review server side analytics, and accelerate the troubleshooting process when hosting layer errors occur.
79

810
## Prerequisites
911

1012
- The Log Drains feature is limited to enterprise plans in Gatsby Cloud, therefore this feature will only appear within site settings for sites within enterprise plans.
1113
- You must have an account with DataDog. Currently, Gatsby Cloud only supports integration with DataDog, but will introduce additional logging targets based on customer demand in the future.
1214

13-
## Enable Log Drains
15+
## Directions
16+
17+
### Enable log drains
1418

1519
1. [Log in](https://app.datadoghq.com/account/login) to your DataDog account
1620
1. [Add a new API Key](https://docs.datadoghq.com/account_management/api-app-keys/#add-an-api-key-or-client-token), giving it a name that will help you remember that this key is used for receiving logs from Gatsby Cloud.
1721

18-
**Note**: If you’re enabling Log Drains for multiple Gatsby Cloud sites, we recommend that you create a separate API key for each Gatsby Cloud site.
22+
**Notes**:
1923

20-
1. Copy the newly-created API Key
24+
- If you’re enabling Log Drains for multiple Gatsby Cloud sites, we recommend that you create a separate `API Key` for each Gatsby Cloud site.
25+
- Be sure you create an `API Key` in DataDog, not an Application Key.
26+
![Be sure to create an API Key, not an Application Key](../../images/log-drains-datadog-api-key.png)
27+
28+
1. Copy the newly-created `API Key`
2129
1. Take note of the region (["SITE" in DataDog terminology](https://docs.datadoghq.com/getting_started/site/#pagetitle)) for your DataDog account.
2230

2331
**Note**: Your DataDog region may appear as the subdomain when logged into DataDog
2432

2533
1. [Log in](/dashboard/login) to Gatsby Cloud
2634
1. Select the site whose logs you’d like to integrate with DataDog
2735
1. Access "Site Settings" for that site
28-
1. Select "Log Drains" in the left navigation
29-
36+
1. Select "Log Drains" in the left navigation
3037
![Log Drains Navigation Item](../../images/log-drains-nav-item.png)
3138

3239
**Note**: If you do not see Log Drains, then the selected site is not likely within an enterprise plan. [Contact us](/support/) if you have any questions.
3340

34-
1. Click Connect
35-
41+
1. Click Connect
3642
![Click Connect to configure log drains](../../images/connect-log-drains-1.png)
37-
38-
1. Select the appropriate region for your DataDog instance
39-
43+
1. Select the appropriate region for your DataDog instance
4044
![Select the appropriate region](../../images/select-region-3.png)
41-
4245
1. In DataDog, this is the value for [Site](https://docs.datadoghq.com/getting_started/site/#pagetitle)
43-
1. Enter the API key you created in DataDog from step 3
44-
46+
1. Enter the `API Key` you created in DataDog from step 3
4547
![Add your Log Analytics service's API Key](../../images/add-api-key.png)
46-
4748
1. Click Connect
48-
1. You will see a confirmation that DataDog is now connected
49-
49+
1. You will see a confirmation that DataDog is now connected
5050
![Connected confirmation message](../../images/connect-confirmation.png)
51-
5251
1. View the [Live Tail](https://app.datadoghq.com/logs/livetail) for this Gatsby site’s logs in your DataDog account to confirm that you’re now receiving logs from Gatsby Cloud
5352

5453
**Note**: It can take up to 10 minutes for your initial set of logs to appear
5554

56-
## Modify Log Drains
55+
### Modify log drains
5756

5857
1. Access your site’s "Site Settings" in Gatsby Cloud
5958
1. Navigate to "Log Drains" in the left-hand navigation
@@ -62,7 +61,7 @@ Gatsby Cloud can deliver hosting logs to the 3rd party services (currently only
6261
1. Update the settings accordingly
6362
1. Click Save
6463

65-
## Disconnect Log Drains
64+
### Disconnect log drains
6665

6766
1. Access your site’s "Site Settings" in Gatsby Cloud
6867
1. Navigate to "Log Drains" in the left-hand navigation
@@ -73,8 +72,8 @@ Gatsby Cloud can deliver hosting logs to the 3rd party services (currently only
7372

7473
## Troubleshooting
7574

76-
- After selecting the region and specifying my API key, I receive an error upon clicking Connect from Gatsby Cloud
77-
- Confirm that you’ve entered the DataDog API Key properly
75+
- After selecting the region and specifying my `API Key`, I receive an error upon clicking Connect from Gatsby Cloud
76+
- Confirm that you’ve entered the DataDog `API Key` properly
7877
- Confirm that you’ve selected the appropriate Region in Step 10
7978
- If all of these are correct, please [Contact us](/support/)
8079
- It’s been more than 10 minutes, and I still don’t see any logs in DataDog. What now?

0 commit comments

Comments
 (0)