You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
To host your documentation at a `/docs` subpath using AWS Route 53 and Cloudfront, you need to configure your DNS provider to point to your Cloudfront distribution.
9
+
To host your documentation at a `/docs` subpath using AWS Route 53 and CloudFront, you need to configure your DNS provider to point to your CloudFront distribution.
10
10
11
11
## Proxies with Vercel deployments
12
12
@@ -32,19 +32,19 @@ You must create a custom origin request policy that forwards the `HOST` header a
32
32
33
33
You must include the `CloudFront-Viewer-Address` header in your origin request policy or cache policy headers configuration to forward the header to your origin.
34
34
35
-
## Create Cloudfront distribution
35
+
## Create CloudFront distribution
36
36
37
-
1. Navigate to [Cloudfront](https://aws.amazon.com/cloudfront) inside the AWS console.
37
+
1. Navigate to [CloudFront](https://aws.amazon.com/cloudfront) inside the AWS console.
38
38
2. Select **Create distribution**.
39
39
40
40
<Frame>
41
-

41
+

42
42
</Frame>
43
43
44
44
3. For the Origin domain, input `[SUBDOMAIN].mintlify.dev` where `[SUBDOMAIN]` is your project's unique subdomain.
45
45
46
46
<Frame>
47
-

47
+

48
48
</Frame>
49
49
50
50
4. For "Web Application Firewall (WAF)," enable security protections.
@@ -61,7 +61,7 @@ You must include the `CloudFront-Viewer-Address` header in your origin request p
61
61
1. After creating the distribution, navigate to the "Origins" tab.
62
62
63
63
<Frame>
64
-

64
+

65
65
</Frame>
66
66
67
67
2. Find your staging URL that mirrors the main domain. This is highly variant depending on how your landing page is hosted. For example, the Mintlify staging URL is [mintlify-landing-page.vercel.app](https://mintlify-landing-page.vercel.app).
@@ -75,26 +75,26 @@ You must include the `CloudFront-Viewer-Address` header in your origin request p
75
75
3. Create a new Origin and add your staging URL as the "Origin domain".
76
76
77
77
<Frame>
78
-

78
+

79
79
</Frame>
80
80
81
81
By this point, you should have two Origins: one with `[SUBDOMAIN].mintlify.app` and another with your staging URL.
82
82
83
83
<Frame>
84
-

84
+

85
85
</Frame>
86
86
87
87
## Set behaviors
88
88
89
-
Behaviors in Cloudfront enable control over the subpath logic. At a high level, we're looking to create the following logic.
89
+
Behaviors in CloudFront enable control over the subpath logic. At a high level, we're looking to create the following logic.
90
90
91
91
-**If a user lands on /docs**, go to `[SUBDOMAIN].mintlify.dev`.
92
92
-**If a user lands on any other page**, go the current landing page.
93
93
94
-
Navigate to the "Behaviors" tab of your Cloudfront distribution.
94
+
Navigate to the "Behaviors" tab of your CloudFront distribution.
Select the **Create behavior** button and create the following behaviors.
@@ -106,7 +106,7 @@ Create behaviors for Vercel domain verification paths with a **Path pattern** of
106
106
For "Cache policy", select **CachingDisabled** to ensure these verification requests pass through without caching.
107
107
108
108
<Frame>
109
-

109
+

110
110
</Frame>
111
111
112
112
<Info>
@@ -120,16 +120,16 @@ If `.well-known/*` is too generic, it can be narrowed down to 2 behaviors at a m
120
120
Create a behavior with a **Path pattern** of `/docs` with **Origin and origin groups** pointing to the `.mintlify.dev` URL (in our case `acme.mintlify.dev`).
121
121
122
122
- Set "Cache policy" to **CachingOptimized**.
123
-
- In "Origin request policy". Create an origin request policy named **VercelCloudFrontProxy**. That forward the `Origin` and `CloudFront-Viewer-Address` headers.
123
+
- In "Origin request policy", create an origin request policy named **VercelCloudFrontProxy**. That forwards the `Origin` and `CloudFront-Viewer-Address` headers.
124
124
125
125
<Frame>
126
-

126
+

127
127
</Frame>
128
128
129
129
- Set Viewer Protocol Policy to **Redirect HTTP to HTTPS**
130
130
131
131
<Frame>
132
-

132
+

133
133
</Frame>
134
134
135
135
### `/docs/*`
@@ -147,13 +147,13 @@ These settings should exactly match `/docs`. With the exception of the **Path pa
147
147
Lastly, we're going to edit the `Default (*)` behavior.
148
148
149
149
<Frame>
150
-

150
+

151
151
</Frame>
152
152
153
153
1. Change the default behavior's **Origin and origin groups** to the staging URL (in our case `mintlify-landing-page.vercel.app`).
154
154
155
155
<Frame>
156
-

156
+

157
157
</Frame>
158
158
159
159
2. Select **Save changes**.
@@ -163,22 +163,22 @@ Lastly, we're going to edit the `Default (*)` behavior.
163
163
If you follow the above steps, your behaviors should look like this:
164
164
165
165
<Frame>
166
-

166
+

167
167
</Frame>
168
168
169
169
## Preview distribution
170
170
171
171
You can now test if your distribution is set up properly by going to the "General" tab and visiting the **Distribution domain name** URL.
172
172
173
173
<Frame>
174
-

174
+

175
175
</Frame>
176
176
177
177
All pages should be directing to your main landing page, but if you append `/docs` to the URL, you should see it going to your Mintlify documentation instance.
178
178
179
179
## Connect with Route53
180
180
181
-
Now, we're going to bring the functionality of the Cloudfront distribution into your primary domain.
181
+
Now, we're going to bring the functionality of the CloudFront distribution into your primary domain.
182
182
183
183
<Note>
184
184
For this section, you can also refer to AWS's official guide on [Configuring
0 commit comments