# Deploy a website

Source: https://skro.eu/docs/deploy-website/how-to-deploy-website

Prepare your static website files, choose a domain, and deploy your website to AWS through Skro.

<Steps>

## Step 1. Create bucket and upload website [#step-1-create-bucket-and-upload-website]

1. Go to the **Websites** → **S3 Buckets** and click **Create**.

![website bucket 1](/images/docs/web-bucket-1.png)

2. Complete the form.

![website bucket 2](/images/docs/web-bucket-2.png)

- **Workspace** - Select your workspace.
- **Integration** - Select your AWS integration.
- **S3 Bucket Region** - Select the location where you want to upload your website. It does not affect your website distribution.
- **Website Name** - Type your website name.
- **Select ZIP File** - Your website must be compressed into **ZIP** file to upload it to Skro. ZIP file can contain the following files.

- index.html - **Mandatory file**
- error.html - **(Optional)**
- Image files can be **.jpg** **.jpeg** **.png** **.ico**
- Javascript files **.js**

This is an example of website file structure:

![website bucket 3](/images/docs/web-bucket-3.png)

3. Click **Create & Upload**.

4. Copy the **S3 Origin URL** to test, if you can see your website.

![website bucket 4](/images/docs/web-bucket-4.png)

## Step 2. Deploy website [#step-2-deploy-website]

1. Select your website and click **Deploy**.

![website deploy 1](/images/docs/web-deploy-1.png)

2. Select your domain and click **Deploy**. Then we will deploy your website to all available regions through AWS Cloudfront.

![website deploy 2](/images/docs/web-deploy-2.png)

2.1. To automatically distribute your website on your chosen domain, you'll need to select your domain provider integration. This will enable Skro to create a CNAME record for you, simplifying the process.

Automated verification are supported with **AWS (Route53)**, **Cloudflare** and **Namesilo**.

- [Cloudflare integration](/docs/deploy-website/cloudflare-integration)

- [Namesilo integration](/docs/deploy-website/namesilo-integration)

![website deploy 2](/images/docs/web-deploy-2-1.png)

3. Skro opens the **Deployments** view and you will see the deployment info.

![website deploy 4](/images/docs/web-deploy-4.png)

4. Select your **Deployment** and click **Check Status** to get your distributed website domain.

![website deploy 3](/images/docs/web-deploy-3.png)

## Step 3. Set CNAME record to your domain [#step-3-set-cname-record-to-your-domain]

1. Go back to **Namecheap**

2. Create a new **CNAME record** to your domain which points to the **Deployments Domain**, which in our example is **d1qbtel1ndj434.cloudfront.net**

- Host: **cloud**
- Value: **d1qbtel1ndj434.cloudfront.net**

![website deploy 5](/images/docs/web-deploy-5.png)

<Callout type="warn">

Typically, DNS changes take 5-15 minutes to propagate, but in some cases, they may take up to 48 hours.

</Callout>

3. Your site is now accessible via HTTPS using your custom domain.

## How to update my website? [#how-to-update-my-website]

1. If you want to upload a new version of your website, then simply go to **Websites** → **S3 Buckets** and select your website and click **Upload** icon.

2. Select a new version of your website (ZIP file) and click **Upload**.

![website bucket 5](/images/docs/web-bucket-5.png)

## How to delete my website? [#how-to-delete-my-website]

If you want to delete your website, then first you will need to delete **Deployments** for your website and after that you will be able to delete a website.

</Steps>

## Related guides [#related-guides]

<Cards>

<Card title="Website deployment on AWS" href="/docs/deploy-website/about-aws-deployment" />

</Cards>
