Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions deploy/route53-cloudfront.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
- `/mintlify-assets/_next/static/*`
- `Default (*)` - Your website's landing page

All Behaviors must have the an **origin request policy** of `AllViewerExceptHostHeader`.
All Behaviors must have an **origin request policy** of `AllViewerExceptHostHeader`.

![CloudFront "Behaviors" page with 4 behaviors: `/docs/*`, `/docs`, `Default`, and `/.well-known/*`.](/images/cloudfront/all-behaviors.png)

Expand All @@ -39,13 +39,13 @@
3. For the Origin domain, input `[SUBDOMAIN].mintlify.dev` where `[SUBDOMAIN]` is your project's unique subdomain.

<Frame>
![CloudFront "Create distribution" page showing "acme.mintlify.dev" as the origin domain.](/images/cloudfront/origin-name.png)

Check warning on line 42 in deploy/route53-cloudfront.mdx

View check run for this annotation

Mintlify / Mintlify Validation (mintlify) - vale-spellcheck

deploy/route53-cloudfront.mdx#L42

Use 'Dev' instead of 'dev'.
</Frame>

4. For "Web Application Firewall (WAF)," enable security protections.

Check warning on line 45 in deploy/route53-cloudfront.mdx

View check run for this annotation

Mintlify / Mintlify Validation (mintlify) - vale-spellcheck

deploy/route53-cloudfront.mdx#L45

Use parentheses judiciously.

<Frame>
![Web Application Firewall (WAF) options with "Enable security protections" selected.](/images/cloudfront/enable-security-protections.png)

Check warning on line 48 in deploy/route53-cloudfront.mdx

View check run for this annotation

Mintlify / Mintlify Validation (mintlify) - vale-spellcheck

deploy/route53-cloudfront.mdx#L48

Use parentheses judiciously.
</Frame>

5. The remaining settings should be default.
Expand All @@ -59,10 +59,10 @@
![A CloudFront distribution with the "Origins" tab highlighted.](/images/cloudfront/origins.png)
</Frame>

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).

Check warning on line 62 in deploy/route53-cloudfront.mdx

View check run for this annotation

Mintlify / Mintlify Validation (mintlify) - vale-spellcheck

deploy/route53-cloudfront.mdx#L62

In general, use active voice instead of passive voice ('is hosted').

<Info>
If your landing page is hosted on Webflow, use Webflow's staging URL. It would look like `.webflow.io`.

Check warning on line 65 in deploy/route53-cloudfront.mdx

View check run for this annotation

Mintlify / Mintlify Validation (mintlify) - vale-spellcheck

deploy/route53-cloudfront.mdx#L65

In general, use active voice instead of passive voice ('is hosted').

If you use Vercel, use the `.vercel.app` domain available for every project.
</Info>
Expand All @@ -84,7 +84,7 @@
Behaviors in CloudFront enable control over the subpath logic. At a high level, we're looking to create the following logic:

- **If a user lands on your custom subpath**, go to `[SUBDOMAIN].mintlify.dev`.
- **If a user lands on any other page**, go the current landing page.
- **If a user lands on any other page**, go to the current landing page.

1. Navigate to the "Behaviors" tab of your CloudFront distribution.

Expand All @@ -105,21 +105,21 @@
</Frame>

<Info>
If `.well-known/*` is too generic, it can be narrowed down to 2 behaviors at a minimum for Vercel:

Check warning on line 108 in deploy/route53-cloudfront.mdx

View check run for this annotation

Mintlify / Mintlify Validation (mintlify) - vale-spellcheck

deploy/route53-cloudfront.mdx#L108

In general, use active voice instead of passive voice ('be narrowed').
- `/.well-known/vercel/*` - Required for Vercel domain verification
- `/.well-known/acme-challenge/*` - Required for Let's Encrypt certificate verification
</Info>

### Your subpath

Create a behavior with a **Path pattern** of your chosen subpath, for example `/docs`, with **Origin and origin groups** pointing to the `.mintlify.dev` URL (in our case `acme.mintlify.dev`).

Check warning on line 115 in deploy/route53-cloudfront.mdx

View check run for this annotation

Mintlify / Mintlify Validation (mintlify) - vale-spellcheck

deploy/route53-cloudfront.mdx#L115

Use parentheses judiciously.

- Set "Cache policy" to **CachingOptimized**.
- Set "Origin request policy" to **AllViewerExceptHostHeader**.
- Set Viewer Protocol Policy to **Redirect HTTP to HTTPS**

<Frame>
![CloudFront "Create behavior" page with a "Path pattern" of "/docs/*" and "Origin and origin groups" pointing to the `acme.mintlify.dev` URL.](/images/cloudfront/behavior-1.png)

Check warning on line 122 in deploy/route53-cloudfront.mdx

View check run for this annotation

Mintlify / Mintlify Validation (mintlify) - vale-spellcheck

deploy/route53-cloudfront.mdx#L122

Use 'Dev' instead of 'dev'.
</Frame>

### Your subpath with wildcard
Expand All @@ -143,10 +143,10 @@
Lastly, we're going to edit the `Default (*)` behavior.

<Frame>
![A CloudFront distribution with the "Default (*)" behavior selected and the Edit button emphasized.](/images/cloudfront/default-behavior-1.png)

Check warning on line 146 in deploy/route53-cloudfront.mdx

View check run for this annotation

Mintlify / Mintlify Validation (mintlify) - vale-spellcheck

deploy/route53-cloudfront.mdx#L146

Use parentheses judiciously.
</Frame>

1. Change the default behavior's **Origin and origin groups** to the staging URL (in our case `mintlify-landing-page.vercel.app`).

Check warning on line 149 in deploy/route53-cloudfront.mdx

View check run for this annotation

Mintlify / Mintlify Validation (mintlify) - vale-spellcheck

deploy/route53-cloudfront.mdx#L149

Use parentheses judiciously.

<Frame>
![CloudFront "Edit behavior" page with the "Origin and origin groups" input field highlighted.](/images/cloudfront/default-behavior-2.png)
Expand All @@ -154,7 +154,7 @@

2. Select **Save changes**.

### Check behaviors are set up correctly

Check warning on line 157 in deploy/route53-cloudfront.mdx

View check run for this annotation

Mintlify / Mintlify Validation (mintlify) - vale-spellcheck

deploy/route53-cloudfront.mdx#L157

In general, use active voice instead of passive voice ('are set').

If you follow the preceding steps, your behaviors should look like this:

Expand All @@ -164,7 +164,7 @@

## Preview distribution

You can now test if your distribution is set up properly by going to the "General" tab and visiting the **Distribution domain name** URL.

Check warning on line 167 in deploy/route53-cloudfront.mdx

View check run for this annotation

Mintlify / Mintlify Validation (mintlify) - vale-spellcheck

deploy/route53-cloudfront.mdx#L167

In general, use active voice instead of passive voice ('is set').

<Frame>
![CloudFront "General" tab with the "Distribution domain name" URL highlighted.](/images/cloudfront/preview-distribution.png)
Expand All @@ -172,9 +172,9 @@

All pages should be directing to your main landing page, but if you append your chosen subpath, for example `/docs`, to the URL, you should see it going to your Mintlify documentation instance.

## Connect with Route53

Check warning on line 175 in deploy/route53-cloudfront.mdx

View check run for this annotation

Mintlify / Mintlify Validation (mintlify) - vale-spellcheck

deploy/route53-cloudfront.mdx#L175

'Connect with Route53' should use sentence-style capitalization.

Now, we're going to bring the functionality of the CloudFront distribution into your primary domain.

Check warning on line 177 in deploy/route53-cloudfront.mdx

View check run for this annotation

Mintlify / Mintlify Validation (mintlify) - vale-spellcheck

deploy/route53-cloudfront.mdx#L177

Use 'capability' or 'feature' instead of 'functionality'.

<Note>
For this section, you can also refer to AWS's official guide on [Configuring
Expand Down