<title>Installing mCaptcha on your website - mCaptcha</title>
<metaname="description"content="Interested in deploying mCpatcha? From deploying a self-hosted instance to installing the CAPTCHA on your website, this guide will have you covered!">
<metaname="twitter:title"content="Installing mCaptcha on your website">
<metaname="twitter:description"content="Interested in deploying mCpatcha? From deploying a self-hosted instance to installing the CAPTCHA on your website, this guide will have you covered!">
<metaname="twitter:site"content="@">
<metaname="twitter:creator"content="@">
<metaproperty="og:title"content="Installing mCaptcha on your website">
<metaproperty="og:description"content="Interested in deploying mCpatcha? From deploying a self-hosted instance to installing the CAPTCHA on your website, this guide will have you covered!">
<li><ahref="#4-install-mcaptcha-on-your-website">4. Install mCaptcha on your website</a></li>
<li><ahref="#5-configure-backend-to-authenticate-captcha-tokens">5. Configure backend to authenticate CAPTCHA tokens</a></li>
</ul>
</nav>
</div>
</nav>
<mainclass="docs-content col-lg-11 col-xl-9">
<h1>Installing mCaptcha on your website</h1>
<pclass="lead"></p>
<p>mCaptcha can protect your website from DDoS attacks. In this guide we’ll
explore how to install mCaptcha on your website. The end result will be
something like this, on your website:</p>
<figure>
<imgclass="img-fluid lazyload blur-up"data-sizes="auto"src="/docs/introduction/installing-captcha/mcaptcha-widget-installation-result_hub39801b2a229b4882fd00c2c83dd77fb_28299_20x0_resize_box_3.png"data-srcset="/docs/introduction/installing-captcha/mcaptcha-widget-installation-result_hub39801b2a229b4882fd00c2c83dd77fb_28299_800x0_resize_box_3.png 800w,/docs/introduction/installing-captcha/mcaptcha-widget-installation-result_hub39801b2a229b4882fd00c2c83dd77fb_28299_700x0_resize_box_3.png 700w,/docs/introduction/installing-captcha/mcaptcha-widget-installation-result_hub39801b2a229b4882fd00c2c83dd77fb_28299_600x0_resize_box_3.png 600w,/docs/introduction/installing-captcha/mcaptcha-widget-installation-result_hub39801b2a229b4882fd00c2c83dd77fb_28299_500x0_resize_box_3.png 500w"width="618"height="669"alt="A registration form with mCaptcha widget installed">
<noscript><imgclass="img-fluid"sizes="100vw"srcset="/docs/introduction/installing-captcha/mcaptcha-widget-installation-result_hub39801b2a229b4882fd00c2c83dd77fb_28299_800x0_resize_box_3.png 800w,/docs/introduction/installing-captcha/mcaptcha-widget-installation-result_hub39801b2a229b4882fd00c2c83dd77fb_28299_700x0_resize_box_3.png 700w,/docs/introduction/installing-captcha/mcaptcha-widget-installation-result_hub39801b2a229b4882fd00c2c83dd77fb_28299_600x0_resize_box_3.png 600w,/docs/introduction/installing-captcha/mcaptcha-widget-installation-result_hub39801b2a229b4882fd00c2c83dd77fb_28299_500x0_resize_box_3.png 500w"src="/docs/introduction/installing-captcha/mcaptcha-widget-installation-result.png"width="618"height="669"alt="A registration form with mCaptcha widget installed"></noscript>
</figure>
<p>For the purpose of this demo, we will be using
<ahref="https://demo.mcaptcha.org">demo.mcaptcha.org</a>, a demo instance running
in @realaravinth’s bedroom(for this same reason, it shouldn’t be used
for anything serious)</p>
<h2id="1-create-an-account-and-sign-into-the-mcaptcha-dashboard">1. Create an account and sign into the mCaptcha dashboard<ahref="#1-create-an-account-and-sign-into-the-mcaptcha-dashboard"class="anchor"aria-hidden="true">#</a></h2>
<p>Head over to <ahref="https://demo.mcaptcha.org/join">demo.mcaptcha.org</a> and
create an account. When ready, sign in.</p>
<h2id="2-create-new-site-key">2. Create new site key<ahref="#2-create-new-site-key"class="anchor"aria-hidden="true">#</a></h2>
<p>A <ahref="/docs/terminology/sitekey/">site key</a> is how a new CAPTCHA is configured within mCaptcha. To create
a new site key, click on “New Site” button in the dashboard.</p>
<figure>
<imgclass="img-fluid lazyload blur-up"data-sizes="auto"src="/docs/introduction/installing-captcha/new-sitekey-btn_hu4dc550a2e568d01f004e26fb8eb1b427_65746_20x0_resize_box_3.png"data-srcset="/docs/introduction/installing-captcha/new-sitekey-btn_hu4dc550a2e568d01f004e26fb8eb1b427_65746_900x0_resize_box_3.png 900w,/docs/introduction/installing-captcha/new-sitekey-btn_hu4dc550a2e568d01f004e26fb8eb1b427_65746_800x0_resize_box_3.png 800w,/docs/introduction/installing-captcha/new-sitekey-btn_hu4dc550a2e568d01f004e26fb8eb1b427_65746_700x0_resize_box_3.png 700w,/docs/introduction/installing-captcha/new-sitekey-btn_hu4dc550a2e568d01f004e26fb8eb1b427_65746_600x0_resize_box_3.png 600w,/docs/introduction/installing-captcha/new-sitekey-btn_hu4dc550a2e568d01f004e26fb8eb1b427_65746_500x0_resize_box_3.png 500w"width="1825"height="857"alt="mCaptcha dashboard with the 'new site key' button highlighted">
<noscript><imgclass="img-fluid"sizes="100vw"srcset="/docs/introduction/installing-captcha/new-sitekey-btn_hu4dc550a2e568d01f004e26fb8eb1b427_65746_900x0_resize_box_3.png 900w,/docs/introduction/installing-captcha/new-sitekey-btn_hu4dc550a2e568d01f004e26fb8eb1b427_65746_800x0_resize_box_3.png 800w,/docs/introduction/installing-captcha/new-sitekey-btn_hu4dc550a2e568d01f004e26fb8eb1b427_65746_700x0_resize_box_3.png 700w,/docs/introduction/installing-captcha/new-sitekey-btn_hu4dc550a2e568d01f004e26fb8eb1b427_65746_600x0_resize_box_3.png 600w,/docs/introduction/installing-captcha/new-sitekey-btn_hu4dc550a2e568d01f004e26fb8eb1b427_65746_500x0_resize_box_3.png 500w"src="/docs/introduction/installing-captcha/new-sitekey-btn.png"width="1825"height="857"alt="mCaptcha dashboard with the 'new site key' button highlighted"></noscript>
</figure>
<p>There are two options to create a new site key, easy and advanced. <strong>We
are going to use the easy mode in this tutorial.</strong> If you are interested
in learning more about the advance mode, please see <ahref="/docs/introduction/configuring-difficulty-factor/#advance-option">here</a>.</p>
<p>Easy mode asks a few basic statistics about your website and generates a
configuration that should work for your website. Currently, easy mode is
guided by assumptions on suitable difficulty factors to protect a
website but it will be fine-tuned as mCaptcha sees more deployment.</p>
<p>Configuration generated by easy mode can be tweaked later using the
advance mode, as you become more familiar with how mCaptcha works.</p>
</blockquote>
<p>Fill the form and submit it.</p>
<figure>
<imgclass="img-fluid lazyload blur-up"data-sizes="auto"src="/docs/introduction/installing-captcha/new-sitekey-easy-mode-filled_hu0c237370199481610ab31adaa9c5a5e6_30108_20x0_resize_box_3.png"data-srcset="/docs/introduction/installing-captcha/new-sitekey-easy-mode-filled_hu0c237370199481610ab31adaa9c5a5e6_30108_900x0_resize_box_3.png 900w,/docs/introduction/installing-captcha/new-sitekey-easy-mode-filled_hu0c237370199481610ab31adaa9c5a5e6_30108_800x0_resize_box_3.png 800w,/docs/introduction/installing-captcha/new-sitekey-easy-mode-filled_hu0c237370199481610ab31adaa9c5a5e6_30108_700x0_resize_box_3.png 700w,/docs/introduction/installing-captcha/new-sitekey-easy-mode-filled_hu0c237370199481610ab31adaa9c5a5e6_30108_600x0_resize_box_3.png 600w,/docs/introduction/installing-captcha/new-sitekey-easy-mode-filled_hu0c237370199481610ab31adaa9c5a5e6_30108_500x0_resize_box_3.png 500w"width="720"height="452"alt="mCaptcha dashboard with the 'new site key' form in easy mode, with details filled in">
<noscript><imgclass="img-fluid"sizes="100vw"srcset="/docs/introduction/installing-captcha/new-sitekey-easy-mode-filled_hu0c237370199481610ab31adaa9c5a5e6_30108_900x0_resize_box_3.png 900w,/docs/introduction/installing-captcha/new-sitekey-easy-mode-filled_hu0c237370199481610ab31adaa9c5a5e6_30108_800x0_resize_box_3.png 800w,/docs/introduction/installing-captcha/new-sitekey-easy-mode-filled_hu0c237370199481610ab31adaa9c5a5e6_30108_700x0_resize_box_3.png 700w,/docs/introduction/installing-captcha/new-sitekey-easy-mode-filled_hu0c237370199481610ab31adaa9c5a5e6_30108_600x0_resize_box_3.png 600w,/docs/introduction/installing-captcha/new-sitekey-easy-mode-filled_hu0c237370199481610ab31adaa9c5a5e6_30108_500x0_resize_box_3.png 500w"src="/docs/introduction/installing-captcha/new-sitekey-easy-mode-filled.png"width="720"height="452"alt="mCaptcha dashboard with the 'new site key' form in easy mode, with details filled in"></noscript>
<p>Submitting the form will take you to a page where site key configuration
can be viewed. “View deployment” link will display CAPTCHA widget with
the supplied configuration. Click on it and grab the widget link.</p>
<h2id="4-install-mcaptcha-on-your-website">4. Install mCaptcha on your website<ahref="#4-install-mcaptcha-on-your-website"class="anchor"aria-hidden="true">#</a></h2>
<p>Integration support is available for some frontend JavaScript
frameworks. To see full list of supported frameworks, please see
</span></span></code></pre></div><p>Please see here for a complete <ahref="https://github.com/mCaptcha/dos/tree/8f2b53ab46d64fa78a8300dc8ce9d78578ffce12/server">Flask example</a> and here for an <ahref="https://github.com/mCaptcha/dos/tree/8f2b53ab46d64fa78a8300dc8ce9d78578ffce12/rust-server/demo-server">Actix
Web example</a>.</p>
<p>Congratulations, mCaptcha is now integrated with your website!</p>
<pclass="edit-page"><ahref="https://github.com/mCaptcha/website/blob/master/content/docs/introduction/installing-captcha/index.md"><svgxmlns="http://www.w3.org/2000/svg"width="16"height="16"viewBox="0 0 24 24"fill="none"stroke="currentColor"stroke-width="2"stroke-linecap="round"stroke-linejoin="round"class="feather feather-edit-2"><pathd="M17 3a2.828 2.828 0 1 1 4 4L7.5 20.5 2 22l1.5-5.5L17 3z"></path></svg>Edit this page on GitHub</a></p>