> For the complete documentation index, see [llms.txt](https://info.techup.live/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://info.techup.live/admin-instructions/tooling-and-software/cloudflare.md).

# Cloudflare

## Creating a Cloudflare account

Follow the instructions in this page below to create your Cloudflare account.

{% embed url="<https://developers.cloudflare.com/fundamentals/setup/account/create-account/>" %}

## Registering a Domain Name (also known as buying a domain name)

### 1. Login to Cloudflare Dashboard ([dash.cloudflare.com](https://dash.cloudflare.com/)) and click on Register Domains in the sidebar

<figure><img src="https://4000871720-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F3JeKot5J5CqiKNQnsgZV%2Fuploads%2FY1KgAHJEuX1Jgboky8Rz%2FScreenshot%202024-04-29%20at%209.45.09%E2%80%AFAM.png?alt=media&amp;token=890b71ac-9bd9-4c69-857e-510b589b8f59" alt=""><figcaption><p>Click on Register Domains to bring you to this page</p></figcaption></figure>

### 2. Type in a domain name of your choice and click purchase

<figure><img src="https://4000871720-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F3JeKot5J5CqiKNQnsgZV%2Fuploads%2FzIZxJ2fWHRJoShP8VtSb%2FScreenshot%202024-04-29%20at%2011.50.15%E2%80%AFAM.png?alt=media&amp;token=41c25f5f-47e5-4e75-88b7-f846b5a420bd" alt=""><figcaption><p>Enter a domain name and click on purchase</p></figcaption></figure>

### 3. Select a 1 year registration and fill in your registrant information

<figure><img src="https://4000871720-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F3JeKot5J5CqiKNQnsgZV%2Fuploads%2FhE7lzsdR5TvWdAs4Nx3p%2FScreenshot%202024-04-29%20at%2011.52.56%E2%80%AFAM.png?alt=media&amp;token=24d033bd-6101-4ef3-9cda-9334c32db61d" alt=""><figcaption><p>Select 1 year and fill in the registrant information section</p></figcaption></figure>

### 4. Select the payment method of your choice

<figure><img src="https://4000871720-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F3JeKot5J5CqiKNQnsgZV%2Fuploads%2Fkqqk8P6JvJsldFzQr4fK%2FScreenshot%202024-04-29%20at%2012.00.32%E2%80%AFPM.png?alt=media&amp;token=22d1405c-7d64-41f6-87d1-0aa7550d2580" alt=""><figcaption><p>Select your payment method</p></figcaption></figure>

### 5. Click on Complete Purchase to buy your domain name

<figure><img src="https://4000871720-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F3JeKot5J5CqiKNQnsgZV%2Fuploads%2FUYNKaUxCa8MtX4tDwgSq%2FScreenshot%202024-04-29%20at%2012.01.00%E2%80%AFPM.png?alt=media&amp;token=4f51bc1b-40e7-4d1f-a887-354dea88d0e0" alt=""><figcaption><p>Click on complete purchase </p></figcaption></figure>

### 6. Congrats you've just purchased your domain name!

<figure><img src="https://4000871720-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F3JeKot5J5CqiKNQnsgZV%2Fuploads%2FCWTNcDtBRw4VtwqjXAjq%2FScreenshot%202024-04-29%20at%2012.01.36%E2%80%AFPM.png?alt=media&amp;token=7c195c9a-b136-443a-82ca-a85b8e620cbb" alt=""><figcaption><p>You should see this screen once you have purchased your domain name</p></figcaption></figure>

## Linking my domain name to my web app (using the Sample Web App as an example)

{% hint style="info" %}
You should have already set up your Sample Web App before linking your domain name. If you have yet to do so, please follow the instructions here [Sample Web App](/programme-essentials/sample-web-app.md).
{% endhint %}

To link your domain name to the sample web app, there are three things you will need to do:

* Enable full SSL/TLS encryption on Cloudflare
* Setup Render to use a custom domain name for your Sample Web App
* Setup Cloudflare's DNS to point to the Sample Web App deployed on Render

### 1. Go to Cloudflare Dashboard ([dash.cloudflare.com](https://dash.cloudflare.com)) and click on the domain name you purchased

<figure><img src="https://4000871720-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F3JeKot5J5CqiKNQnsgZV%2Fuploads%2FTMLq4ZMESSzrw30c2zel%2FScreenshot%202024-04-29%20at%203.05.21%E2%80%AFPM.png?alt=media&amp;token=2f9b5d95-94d1-4867-9436-6c7f5905af76" alt=""><figcaption><p>Click on your domain name</p></figcaption></figure>

### 2. Click on the SSL/TLS tab in the sidebar

<figure><img src="https://4000871720-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F3JeKot5J5CqiKNQnsgZV%2Fuploads%2Fhjyh4o6V2Us01iqlwCPK%2FScreenshot%202024-04-29%20at%201.44.40%E2%80%AFPM.png?alt=media&amp;token=65678bf1-4363-4070-951f-ff0da23bd56c" alt=""><figcaption><p>Click on the SSL/TLS tab in the sidebar</p></figcaption></figure>

### 3. Set the SSL/TLS encryption mode to Full

<figure><img src="https://4000871720-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F3JeKot5J5CqiKNQnsgZV%2Fuploads%2Fcjufjsh4kBqmsgh0KRO3%2FScreenshot%202024-04-29%20at%201.55.43%E2%80%AFPM.png?alt=media&amp;token=70592db8-14b5-40d9-b7bf-c71aa28c4137" alt=""><figcaption><p>Select Full to change SSL/TLS encryption mode</p></figcaption></figure>

<figure><img src="https://4000871720-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F3JeKot5J5CqiKNQnsgZV%2Fuploads%2FajGunX9Gdet4XhzhAtJN%2FScreenshot%202024-04-29%20at%201.55.48%E2%80%AFPM.png?alt=media&amp;token=308769fe-e479-4ca3-ae4c-51fea0b34bec" alt=""><figcaption><p>Click on Confirm to continue</p></figcaption></figure>

<figure><img src="https://4000871720-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F3JeKot5J5CqiKNQnsgZV%2Fuploads%2F1dTfiohNed5Jvg03uC8N%2FScreenshot%202024-04-29%20at%202.02.43%E2%80%AFPM.png?alt=media&amp;token=239ee88a-3a3f-4b06-a925-f3ebbef52e91" alt=""><figcaption><p>Your SSL/TLS encryption mode should now be set to full</p></figcaption></figure>

### 4. Go to Render Dashboard ([dashboard.render.com](https://dashboard.render.com/)) and click on your web app (in this example the sample web app is selected)

<figure><img src="https://4000871720-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F3JeKot5J5CqiKNQnsgZV%2Fuploads%2F35PhlTLu1xGRClMXD20l%2FScreenshot%202024-04-29%20at%204.18.38%E2%80%AFPM.png?alt=media&amp;token=cd48d95d-b787-4e0a-8411-61ffd1c2e352" alt=""><figcaption><p>Select your web application on Render</p></figcaption></figure>

### 5. Click on Settings to Add a Custom Domain Name&#x20;

<figure><img src="https://4000871720-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F3JeKot5J5CqiKNQnsgZV%2Fuploads%2FMSVJhx2wkUMcbqc6dke2%2FScreenshot%202024-04-29%20at%204.18.50%E2%80%AFPM.png?alt=media&amp;token=b31141c3-337e-4fe7-8766-c692ac120a92" alt=""><figcaption><p>Click on Settings</p></figcaption></figure>

<figure><img src="https://4000871720-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F3JeKot5J5CqiKNQnsgZV%2Fuploads%2F861hrqoCQ3uAQ7bAFGDX%2FScreenshot%202024-04-29%20at%204.19.02%E2%80%AFPM.png?alt=media&amp;token=91641896-d9c1-439e-bdb4-bf58e69bf1bb" alt=""><figcaption><p>Scroll down to the section on custom domains </p></figcaption></figure>

<figure><img src="https://4000871720-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F3JeKot5J5CqiKNQnsgZV%2Fuploads%2FZXN1er6gncJTNujLfJr5%2FScreenshot%202024-04-29%20at%204.20.48%E2%80%AFPM.png?alt=media&amp;token=77541596-ecfb-4c06-99a8-5777552d8748" alt=""><figcaption><p>Enter your domain name and click save</p></figcaption></figure>

<figure><img src="https://4000871720-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F3JeKot5J5CqiKNQnsgZV%2Fuploads%2FjGdtC3TaVdd9aCXByBUe%2FScreenshot%202024-04-29%20at%204.20.55%E2%80%AFPM.png?alt=media&amp;token=ce741dd7-e132-4ba1-a5e1-e7edca0b23a9" alt=""><figcaption><p>You should see something similar, click on the copy icon to copy the onrender.com URL which will be used for the nest step</p></figcaption></figure>

### 6. Go to Cloudflare Dashboard ([dash.cloudflare.com](https://dash.cloudflare.com/)) and click on your domain name

<figure><img src="https://4000871720-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F3JeKot5J5CqiKNQnsgZV%2Fuploads%2FnnNEq0S7qWOAZU5ivApT%2FScreenshot%202024-04-29%20at%203.05.21%E2%80%AFPM.png?alt=media&amp;token=4ac014be-d949-4a6a-9fc8-1ce2d49d1539" alt=""><figcaption><p>Click on your domain name</p></figcaption></figure>

### 7. Click on DNS to go to the page to edit your DNS Records, then click on Add Record

<figure><img src="https://4000871720-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F3JeKot5J5CqiKNQnsgZV%2Fuploads%2Fj46QyaVl99zqDG4JyYDF%2FScreenshot%202024-04-29%20at%201.45.34%E2%80%AFPM.png?alt=media&amp;token=b3b7887a-9c7e-47dc-a641-c3646ffc472f" alt=""><figcaption><p>Click on DNS in the sidebar then click on Add Record</p></figcaption></figure>

### 8. Add a new DNS Record

<figure><img src="https://4000871720-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F3JeKot5J5CqiKNQnsgZV%2Fuploads%2FtQPKcDzMdPqouHGAsYH9%2FScreenshot%202024-04-29%20at%204.22.18%E2%80%AFPM.png?alt=media&amp;token=6e1481df-d2d5-4df9-bab7-95ab874106c3" alt=""><figcaption><p>Add a new CNAME record with the Target being the onrender.com URL you copied earlier in Step 5, then click Save</p></figcaption></figure>

### 9. Go back to your Render Dashboard and click on Verify

<figure><img src="https://4000871720-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F3JeKot5J5CqiKNQnsgZV%2Fuploads%2FhaK5wOFOfNx2dfUwZoiv%2FScreenshot%202024-04-29%20at%204.20.55%E2%80%AFPM.png?alt=media&amp;token=0d347806-f4a9-4c99-813d-a2fd18a71e9b" alt=""><figcaption><p>Click on Verify</p></figcaption></figure>

<figure><img src="https://4000871720-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F3JeKot5J5CqiKNQnsgZV%2Fuploads%2F1y0MoztEbWPM3tZqmw5T%2FScreenshot%202024-04-29%20at%204.23.57%E2%80%AFPM.png?alt=media&amp;token=4191432b-243f-4ec3-98b6-1f38efa7fdd4" alt=""><figcaption><p>It may take some time for the domain to be verified and for a certificate to be automatically generated</p></figcaption></figure>

<figure><img src="https://4000871720-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F3JeKot5J5CqiKNQnsgZV%2Fuploads%2FOWZvBaYzA8Ni3EShEQkj%2FScreenshot%202024-04-29%20at%204.32.43%E2%80%AFPM.png?alt=media&amp;token=257db9da-15a9-4bb5-8686-cf932fc559cc" alt=""><figcaption><p>Congrats! You have now set up a custom domain name for your app!</p></figcaption></figure>
