---
description: How to avoid blockage of backend.northghost.com domain
---

# AWS CloudFront Distribution of the Platform URL

Sometimes backend.northghost.com domain gets blocked by certain resources. To avoid that and make our app available globally, we need to hide backend.northghost.com under an AWS CloudFront Distribution.

1. Select CloudFront from the list of services in your [AWS Console](https://aws.amazon.com/) or, simply type CloudFront into the AWS services search field on the main page.

![](https://3437387582-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M57yuAWriRSwZHosffd%2Fuploads%2Fgit-blob-c49ac8415dff756d18f41274f3ed57324bf4b3ca%2Faws_console.png?alt=media)

2\. Then select **Create Distribution**.

![](https://3437387582-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M57yuAWriRSwZHosffd%2Fuploads%2Fgit-blob-04c9f917189fc2ac7021382115f745938826f322%2Fcloudfront_distribution.png?alt=media)

3\. In the **Web** section select **Get Started**.

![](https://3437387582-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M57yuAWriRSwZHosffd%2Fuploads%2Fgit-blob-608cc3c144eb046a85d7ed01fa49f2cdfe1a5497%2Fcloudfront_web_section.png?alt=media)

4\. **Create Distribution** form:

A. **Origin Settings** part.

1. Type **backend.northghost.com** into the **Origin Domain Name** field.
2. Select **HTTPS Only** option in the **Origin protocol Policy**.
3. Leave the rest of the **Origin Settings** by default.

![](https://3437387582-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M57yuAWriRSwZHosffd%2Fuploads%2Fgit-blob-b5400322358b57c974c51d17be9ad9645b4b31b9%2Fcloudfront_origin_settings.png?alt=media)

B. Scroll down for **Default Cache Behavior Settings** part.

1. In **Viewer Protocol Policy** select **Redirect HTTP to HTTPS**.
2. In **Allowed HTTP Methods** select **GET, HEAD, OPTIONS, PUT, POST, PATCH, DELETE**.
3. In **Cache Based on Selected Request Headers** select **Whitelist**.
4. In **Whitelist Headers** add **Accept** and **Authorization** headers.
5. In **Forward Cookies** select **All**.
6. In **Query String Forwarding and Caching** select **Forward all, cache based on whitelist**.

![](https://3437387582-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M57yuAWriRSwZHosffd%2Fuploads%2Fgit-blob-bb869912fe338291aca86a86f7bb300e68e03536%2Fcloudfront_settings.png?alt=media)

C. Leave by default **Distribution Settings** part.

D.   Scroll down and hit **Create Distribution** button .

It takes AWS about 10 minutes to create a distribution. Once it is complete you can find your CloudFront Distribution by clicking on your newly created distribution from the list and looking up its domain name.

![](https://3437387582-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M57yuAWriRSwZHosffd%2Fuploads%2Fgit-blob-1a63c25710c1b6bc8fa7ab874ea21293cebd076a%2Fcloudfront_create_distribution.png?alt=media)

So next time, when you are using SDK, input newly generated distribution link as a base URL instead of backend.northghost.com. This will help to avoid blockage by 3rd parties resources.
