# Cloudflare Setup

Make sure you host your domain on **Cloudflare,** it's simply done by porting your name servers. If you're new to this for your agency, follow these guides

* [ ] [Your own domain](https://onwhatsapp.gitbook.io/quick-start/your-own-domain) (please use your **root domain**, ~~not a subdomain~~)
* [ ] [Enable SSL](https://onwhatsapp.gitbook.io/quick-start/enabling-ssl)

Assuming your root domain is now on Cloudflare, here's what you need to do and keep in mind:

1. Your root domain will host the white-labelled OnWhatsApp dashboard
2. Your subdomain will be used to house your website, for example, **<https://get.onwhats.app>**
3. Your customers will login to their dashboard from **<https://YOUR-DOMAIN.COM/login>**
4. For the above setup, we need to enable page rules on Cloudflare

Login to your Cloudflare account and tap **Page Rules**

![Login and click Page Rules](https://778314038-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MD-7IS7LJmyjHij60SY%2F-MSwv2lYvqUG1O1VfIvR%2F-MSwvxsoJxBo7gu1uisY%2Ftap-page-rules.png?alt=media\&token=bc6a6fe9-9a6e-4c73-95dc-5814b915d384)

Next, Click **Create Page Rule**&#x20;

![Create Rule](https://778314038-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MD-7IS7LJmyjHij60SY%2F-MSwv2lYvqUG1O1VfIvR%2F-MSx-UjRvztBrX4BEH3t%2Fcreate-rule.png?alt=media\&token=993c652a-da83-4a33-a9c9-77489b4c2a7b)

* Key in your domain name, do not put \* in the end, that'll make the app misbehave, so you enter just your root domain, **for example, onwhats.app/**

![Select Forwarding URL](https://778314038-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MD-7IS7LJmyjHij60SY%2F-MSwv2lYvqUG1O1VfIvR%2F-MSx03t4vqHB_jKA9J7w%2Fcreate-rule1.png?alt=media\&token=6fa0247e-2239-4a56-8bd6-ba1fd5b5d0d4)

* Click Then the settings are dropdown and select **Forwarding URL**

Next, select **Permanent Redirect (301)**

![Select Permanent Redirect (301)](https://778314038-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MD-7IS7LJmyjHij60SY%2F-MSwv2lYvqUG1O1VfIvR%2F-MSx0puAfhmYkDOThyci%2Fcreate-rule2.png?alt=media\&token=32df6ca1-1d5b-4122-9088-fa8d3b8f4da6)

Last but not the least, your destination URL should be a subdomain you set, this is where your landing page is, where your customers discover you.&#x20;

{% hint style="info" %}
We use get.onwhats.app you can feel free to use as you please and make sure you have your A Record for this done as per your webhost!
{% endhint %}

Your final settings should look something like this, though with your domain settings

![Final settings](https://778314038-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MD-7IS7LJmyjHij60SY%2F-MSwv2lYvqUG1O1VfIvR%2F-MSx1v4cBjtq7hK_Nhwm%2Fcreate-rule-final.png?alt=media\&token=7fb64b38-694b-4f58-b02a-df52d0d6e13d)

Now tap **Save.** Give it a couple of minutes and you're all set!
